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 CCS Technical Support

18F4550 + SPI + RS232

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



Joined: 08 Dec 2006
Posts: 125
Location: Texas

View user's profile Send private message

18F4550 + SPI + RS232
PostPosted: Thu Jan 14, 2010 11:09 am     Reply with quote

I hadn't done this before and I'd like to know if there are any problems with the SPI and Hardware RS232 sharing the RX line (RC7 is RX and SDO), especially since I will be using both. RS232 will be a Modbus Slave and I don't need things causing problems.

Anything to look out for? Suggestions, tips....

Thanks,
Richard
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jan 14, 2010 4:49 pm     Reply with quote

Presumably your Modbus Rx line is coming out of a MAX232-type chip,
so the Rx pin on the PIC is being driven. You can't just disable the UART
in the PIC and enable the hardware SPI, because then you would have
the SDO pin fighting the MAX232 signal. Now, you could get a MAX242
or similar chip, that has tri-statable Rx outputs. Then you could only
enable that output when the PIC's hardware UART is enabled (and the
SPI module is disabled). This would require an extra i/o pin on the PIC
to control the tri-state control input on the MAX242.
rwskinner



Joined: 08 Dec 2006
Posts: 125
Location: Texas

View user's profile Send private message

PostPosted: Fri Jan 15, 2010 2:01 pm     Reply with quote

Thanks, I was afraid of that. I'll use SW SPI on a different set of pins then.
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