Author |
Message |
Topic: 18F46K22 - unknown SFR SSPCON/SSPSTAT |
picnic
Replies: 2
Views: 5178
|
Forum: General CCS C Discussion Posted: Mon Jul 02, 2012 10:28 am Subject: 18F46K22 - unknown SFR SSPCON/SSPSTAT |
Thanks for that, probably a good job the compiler complains then as moving from the PIC16 to 18 probably means the register accesses being made in the code should be reviewed. Shame it allowed it to s ... |
Topic: 18F46K22 - unknown SFR SSPCON/SSPSTAT |
picnic
Replies: 2
Views: 5178
|
Forum: General CCS C Discussion Posted: Mon Jul 02, 2012 9:19 am Subject: 18F46K22 - unknown SFR SSPCON/SSPSTAT |
I've had the following 2 lines in my code since the year dot
#byte SSPCON = GETENV("SFR:SSPCON")
#byte SSPSTAT = GETENV("SFR:SSPSTAT")
Since v4.1 ... |
Topic: Help with 18F46K22 not exiting sleep on TIMER1 overflow |
picnic
Replies: 2
Views: 6050
|
Forum: General CCS C Discussion Posted: Wed Jan 04, 2012 5:53 am Subject: Help with 18F46K22 not exiting sleep on TIMER1 overflow |
I'm trying to use a single rising edge on TIMER1 (RC0) to trigger a TIMER1 overflow interrupt and to wake the PIC from sleep. The code below works as I'd expect on a 16F887 (different include and fuse ... |
Topic: Wake up |
picnic
Replies: 3
Views: 5058
|
Forum: General CCS C Discussion Posted: Fri Dec 30, 2011 3:47 am Subject: Wake up |
CCS supply a sample program that demonstrates one way of doing this, look for EX_WAKEUP.C
What method are you hoping to use to wakeup? |
Topic: Does #elif work as intended |
picnic
Replies: 4
Views: 6991
|
Forum: General CCS C Discussion Posted: Wed Dec 28, 2011 11:49 am Subject: Does #elif work as intended |
I like your thinking, the example in the help though is
#IFDEF id
code
#ELIF
code
#ELSE
code
#ENDIF
which makes no sense (as there is no condition for the #elif) bu ... |
Topic: Does #elif work as intended |
picnic
Replies: 4
Views: 6991
|
Forum: General CCS C Discussion Posted: Wed Dec 28, 2011 11:18 am Subject: Does #elif work as intended |
A
#ifdef WIBBLE
only requires that WIBBLE be defined, can be 0 or any other value
If you try a
#elif WIBBLE
the following code is not included if WIBBLE is defined as 0, it's OK with 1
... |
Topic: Sleep interrupted by Portb, can I find out sleep time left? |
picnic
Replies: 3
Views: 6116
|
Forum: General CCS C Discussion Posted: Thu Dec 22, 2011 2:54 am Subject: Sleep interrupted by Portb, can I find out sleep time left? |
That was my conclusion but I had hoped I had missed something. Thanks. |
Topic: PIC18F46K22 Compiler Problem? |
picnic
Replies: 3
Views: 7958
|
Forum: General CCS C Discussion Posted: Thu Dec 22, 2011 2:53 am Subject: PIC18F46K22 Compiler Problem? |
Thanks for the help guys |
Topic: PIC18F46K22 Compiler Problem? |
picnic
Replies: 3
Views: 7958
|
Forum: General CCS C Discussion Posted: Wed Dec 21, 2011 10:06 am Subject: PIC18F46K22 Compiler Problem? |
I've been trying to use the Weak Pull-up feature of Port B, I got erroneous results. Examining the ASM output showed the compiler using the wrong register value for the port_b_pullups() call.
Als ... |
Topic: Sleep interrupted by Portb, can I find out sleep time left? |
picnic
Replies: 3
Views: 6116
|
Forum: General CCS C Discussion Posted: Wed Dec 21, 2011 9:58 am Subject: Sleep interrupted by Portb, can I find out sleep time left? |
I'm doing the age old thing of going to sleep and using the WDT to wake up PIC. I count n goes and then trundle off and do something useful.
I've now had to add a change on port B event to wake fro ... |
Topic: Can't get Timer 1 to count RC0 input |
picnic
Replies: 2
Views: 6351
|
Forum: General CCS C Discussion Posted: Wed Nov 23, 2011 10:43 am Subject: Can't get Timer 1 to count RC0 input |
You are a gentleman and a scholar Little bit of reading around the FCMEN and playing around and now T1 is now counting for me. Thank you very much.
The trick for anyone else who stumbles across ... |
Topic: Can't get Timer 1 to count RC0 input |
picnic
Replies: 2
Views: 6351
|
Forum: General CCS C Discussion Posted: Wed Nov 23, 2011 4:54 am Subject: Can't get Timer 1 to count RC0 input |
I'm using a PIC18F46K22 and trying to count the RC0 input using Timer1 but it doesn't count. Changing the code to use T1_INTERNAL does create a count so the program seems sound except for actually tal ... |
Topic: Where is SIOW.EXE? |
picnic
Replies: 10
Views: 25294
|
Forum: General CCS C Discussion Posted: Fri Oct 10, 2008 8:09 am Subject: Where is SIOW.EXE? |
In the end I didn't download the demo as the propaganda states SIOW is not supplied as part of the demo. I'll try it.
I also didn't appreciate that it's simply a terminal emulator, I sort of assume ... |
Topic: Where is SIOW.EXE? |
picnic
Replies: 10
Views: 25294
|
Forum: General CCS C Discussion Posted: Fri Oct 10, 2008 3:05 am Subject: Where is SIOW.EXE? |
Thanks for the replies, appears I've fallen in to the old trap of not realising what I haven't got until too late :( Sadly the utility is not supplied with the demo so I'm unable to fully use that exa ... |
Topic: Where is SIOW.EXE? |
picnic
Replies: 10
Views: 25294
|
Forum: General CCS C Discussion Posted: Thu Oct 09, 2008 7:56 am Subject: Where is SIOW.EXE? |
I have PCM V4.076 and been looking at the Bootloader Examples. In the Appendix on Example Programs the manual states "The SIOW.EXE program included in the program directory may be used..."
... |
|