View previous topic :: View next topic |
Author |
Message |
rprodrigues
Joined: 06 Mar 2008 Posts: 14
|
Using both SPI and EUSART HW modules in PIC18F4550 |
Posted: Thu Jul 31, 2008 12:36 pm |
|
|
Hi all,
I do need to use both the SPI and EUSART hardware modules in PIC18F4550, but, as one may notice by seeing its datasheet, the EUSART and SPI (SSP) modules share the pin RC7 (RX/DT/SDO).
I am a little bit lucky since I don't need to use both modules at the same time, and I plan to interchange between them on-the-fly.
So, here are some questions for the experts:
- Is it possible to use them, one per time, by enabling/disabling each one;
- Is it possible to enable/disable EUSART and SPI modules by means of CCS functions?
Thank you in advance,
rprodrigues |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Aug 01, 2008 4:48 pm |
|
|
This thread discusses the problem:
http://www.ccsinfo.com/forum/viewtopic.php?t=29028
Note that the register addresses given in treitmey's sample code are
for the 16F PICs. The addresses for the 18F PICs are different.
Look in this section of the 18F4550 data sheet to find the correct register
addresses for your PIC:
Quote: | TABLE 5-1: SPECIAL FUNCTION REGISTER MAP FOR PIC18F2455/2550/4455/4550 DEVICES |
|
|
|
rprodrigues
Joined: 06 Mar 2008 Posts: 14
|
|
Posted: Sat Aug 02, 2008 7:29 am |
|
|
PCM programmer wrote: | This thread discusses the problem:
http://www.ccsinfo.com/forum/viewtopic.php?t=29028
Note that the register addresses given in treitmey's sample code are
for the 16F PICs. The addresses for the 18F PICs are different.
Look in this section of the 18F4550 data sheet to find the correct register
addresses for your PIC:
Quote: | TABLE 5-1: SPECIAL FUNCTION REGISTER MAP FOR PIC18F2455/2550/4455/4550 DEVICES |
|
Thank you!!! |
|
|
|