CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Using both SPI and EUSART HW modules in PIC18F4550

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
rprodrigues



Joined: 06 Mar 2008
Posts: 14

View user's profile Send private message

Using both SPI and EUSART HW modules in PIC18F4550
PostPosted: Thu Jul 31, 2008 12:36 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Aug 01, 2008 4:48 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Aug 02, 2008 7:29 am     Reply with quote

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!!!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group