Author |
Message |
Topic: Wont show compiler version |
mtsoule
Replies: 4
Views: 11049
|
Forum: General CCS C Discussion Posted: Thu Feb 09, 2017 10:38 am Subject: Wont show compiler version |
well, that's interesting.. notice the screenshot on my previous reply.. it shows a backslash even though I put in a forward slash.. |
Topic: Wont show compiler version |
mtsoule
Replies: 4
Views: 11049
|
Forum: General CCS C Discussion Posted: Thu Feb 09, 2017 10:13 am Subject: Wont show compiler version |
I tried running it straight from command line..
[img]
https://dl.dropboxusercontent.com/u/96822246/ccs.jpg
[/img]
if I tried the switch +v nothing happens, is I try /+v I get the above scree ... |
Topic: Wont show compiler version |
mtsoule
Replies: 4
Views: 11049
|
Forum: General CCS C Discussion Posted: Thu Feb 09, 2017 9:42 am Subject: Wont show compiler version |
before updating from 4.125 to 5.068, I was able to click on (Windows 7 x64) Start -> All Programs -> PIC-C -> Complier Version
and a little windows would pop us telling me the version for ... |
Topic: Using printf to convert int to octal |
mtsoule
Replies: 4
Views: 12513
|
Forum: General CCS C Discussion Posted: Wed Feb 01, 2017 12:40 pm Subject: Using printf to convert int to octal |
That was the first thing I did was consult the manual. and there was no mention of octal, so I assumed it did not support it.
However, I had to at least try the old C types, and not surprisingly i ... |
Topic: Using printf to convert int to octal |
mtsoule
Replies: 4
Views: 12513
|
Forum: General CCS C Discussion Posted: Wed Feb 01, 2017 11:51 am Subject: Using printf to convert int to octal |
My goal is to convert an int to octal, I know I can use printf to convert to hex.
But when I try the below code, it will not compile,
*** Error 115 "main.c" Line 158(37,45)& ... |
Topic: Putting ASM in to C |
mtsoule
Replies: 5
Views: 16444
|
Forum: General CCS C Discussion Posted: Fri Oct 14, 2016 2:14 pm Subject: Putting ASM in to C |
AWESOME!! Learn something new every day!!
any ideas on the multiple defines?
for example, I have to define "PORTE,3" for ASM, because otherwise, it expects a comma.
the unlimate goa ... |
Topic: Putting ASM in to C |
mtsoule
Replies: 5
Views: 16444
|
Forum: General CCS C Discussion Posted: Fri Oct 14, 2016 10:51 am Subject: Putting ASM in to C |
Device: PIC18F87K22
Compiler: 4.125
I am trying to put a few, time critical, statements into my program, so I am using ASM.
A few statements are not compiling, just wondering the proper syntax ... |
Topic: Problem with float math - period to freq |
mtsoule
Replies: 15
Views: 25410
|
Forum: General CCS C Discussion Posted: Sun Jul 31, 2016 5:48 am Subject: Problem with float math - period to freq |
you are correct, they are not what I would expect..
here is what I did:
temp=CCP_CAPTURE_RE;
printf("RE temp: %lu \r\n", temp); //then print this
temp=CCP ... |
Topic: Problem with float math - period to freq |
mtsoule
Replies: 15
Views: 25410
|
Forum: General CCS C Discussion Posted: Sat Jul 30, 2016 5:43 pm Subject: Problem with float math - period to freq |
Yes, i understand about not resetting the timers, and in my last code i am not resetting but using the delta, and realized that i CAN in fact use timer1 for all my frequency inputs.
You are correct ... |
Topic: Problem with float math - period to freq |
mtsoule
Replies: 15
Views: 25410
|
Forum: General CCS C Discussion Posted: Sat Jul 30, 2016 9:53 am Subject: Problem with float math - period to freq |
Code:
#define CCP_CAPTURE_DIV_4 6
#define CCP_CAPTURE_DIV_16 7 |
Topic: Problem with float math - period to freq |
mtsoule
Replies: 15
Views: 25410
|
Forum: General CCS C Discussion Posted: Sat Jul 30, 2016 8:49 am Subject: Problem with float math - period to freq |
Ttelmah, Thanks for your help.. I have taken your idea (not your code) and applied it to mine and it works well!!
int32 cpp5a, cpp5_ov, cpp5_old, cpp5_org, cpp5_out, a, b, c;
float d,e,f;
//--- ... |
Topic: Problem with float math - period to freq |
mtsoule
Replies: 15
Views: 25410
|
Forum: General CCS C Discussion Posted: Fri Jul 29, 2016 9:43 am Subject: Problem with float math - period to freq |
when CCP5 interrupts, the timer value at the instant of the edge, has been recorded into CCP5.
According to the manual, Timer1 is recorded in to CPPx during interrupt. my ultimate goal is to r ... |
Topic: Problem with float math - period to freq |
mtsoule
Replies: 15
Views: 25410
|
Forum: General CCS C Discussion Posted: Fri Jul 29, 2016 9:07 am Subject: Problem with float math - period to freq |
I copied and pasted Ttelmah's code and the result was:
Freq = 0.023364
|
Topic: Problem with float math - period to freq |
mtsoule
Replies: 15
Views: 25410
|
Forum: General CCS C Discussion Posted: Fri Jul 29, 2016 9:05 am Subject: Problem with float math - period to freq |
Yes, 20MHz crystal. which I figured was:
input freq is apporx 549Hz
Fosc = 20Mhz
Fosc/4 = 5MHs (0.2uS)
my counts was 14627 add 2 timer 3 overflows (65536*2= 131.072)
131072+14627 = 145699
... |
Topic: Problem with float math - period to freq |
mtsoule
Replies: 15
Views: 25410
|
Forum: General CCS C Discussion Posted: Fri Jul 29, 2016 8:38 am Subject: Problem with float math - period to freq |
this is actual hardware output.
I am working in MPLAB, but using the CCS compiler plugin. yes, I want to zero the timer, this way on the next interrupt, I will get the correct number of counts betw ... |
|