Author |
Message |
Topic: Protothreads on CCS |
lightydo
Replies: 4
Views: 10144
|
Forum: General CCS C Discussion Posted: Wed Jun 18, 2014 6:24 am Subject: Protothreads on CCS |
In CCS a short is defined as 1 bit while the programmers of this library assumed it to be 8 bit or larger.
This can be fixed by replacing all 'short' types by standard 'int' or use the #type directiv ... |
Topic: checking for multiple interrupts in #INT_DEFAULT |
lightydo
Replies: 10
Views: 15417
|
Forum: General CCS C Discussion Posted: Tue Jun 17, 2014 7:09 am Subject: checking for multiple interrupts in #INT_DEFAULT |
The key difference is INT_RA only affects the IOC while INT_DEFAULT affects more interrupts than just the IOC, so you can sometimes introduce bugs into places where you didn't mean to using INT_DEFAU ... |
Topic: Protothreads on CCS |
lightydo
Replies: 4
Views: 10144
|
Forum: General CCS C Discussion Posted: Tue Jun 17, 2014 2:12 am Subject: Protothreads on CCS |
Has anyone successfully ported Protothreads to CCS?
http://dunkels.com/adam/pt/
I am always getting : Error#51 A numeric expression must appear here
on PT_WAIT_UNTIL(pt, ..); |
Topic: checking for multiple interrupts in #INT_DEFAULT |
lightydo
Replies: 10
Views: 15417
|
Forum: General CCS C Discussion Posted: Tue Jun 17, 2014 1:16 am Subject: checking for multiple interrupts in #INT_DEFAULT |
Why not use #int_ra instead of #int_default?
That appears to be the int handler for IOC on the pic12F683
You'll still have to do masking, but that is normal for IOC since the hardware forces tha ... |
Topic: checking for multiple interrupts in #INT_DEFAULT |
lightydo
Replies: 10
Views: 15417
|
Forum: General CCS C Discussion Posted: Mon Jun 16, 2014 7:25 am Subject: checking for multiple interrupts in #INT_DEFAULT |
You can't use any old IO bit you fancy to generate an interrupt, only those that have dedicated hardware for the purpose, i.e. interrupt inputs and ports with the interrupt on change facility, general ... |
Topic: checking for multiple interrupts in #INT_DEFAULT |
lightydo
Replies: 10
Views: 15417
|
Forum: General CCS C Discussion Posted: Mon Jun 16, 2014 1:46 am Subject: checking for multiple interrupts in #INT_DEFAULT |
Key thing is that if you let the compiler work out the interrupts, it does all the work.
INT_DEFAULT is called if you don't have any 'handler' interrupt defined.
However when the compiler is han ... |
Topic: checking for multiple interrupts in #INT_DEFAULT |
lightydo
Replies: 10
Views: 15417
|
Forum: General CCS C Discussion Posted: Sun Jun 15, 2014 5:26 am Subject: checking for multiple interrupts in #INT_DEFAULT |
maybe just a quirk or I missed it but....
#if defined(__PCM__)
doesn't have an
#endif
maybe the compiler gets 'confused' ?
Did a previous version work 100% for you?
also..
this line ... |
Topic: checking for multiple interrupts in #INT_DEFAULT |
lightydo
Replies: 10
Views: 15417
|
Forum: General CCS C Discussion Posted: Sun Jun 15, 2014 2:50 am Subject: checking for multiple interrupts in #INT_DEFAULT |
HI,
using CCS 5.026 (latest) - ALERT: newbie, first project ever on PIC
got this odd behavior in my #INT_DEFAULT (see code below)
if the RX INT code is placed first, the RX works fine and I g ... |
|