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

#use rs232 on pins other than rx and tx

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



Joined: 28 Aug 2007
Posts: 99
Location: New Zealand

View user's profile Send private message

#use rs232 on pins other than rx and tx
PostPosted: Sat Apr 12, 2008 3:02 pm     Reply with quote

I am wanting to send data to a computer from a pic16F877a but also be able to send an int16 reference to a pic16F628a.

So the question is if RX and TX are being used for the communication between Master PIC and PC how can i communicate between Master and Slave PIC?
KU5D



Joined: 10 Feb 2008
Posts: 46
Location: Asheville, North Carolina

View user's profile Send private message

PostPosted: Sat Apr 12, 2008 5:45 pm     Reply with quote

I've not worked with the 877 but I think it'll do software uarts. Do the following:

#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS, stream=PC)
#use rs232(baud=4800, xmit=PIN_D7, rcv=PIN_D6,stream=PIC)

Set your pins for the software uart according to your hardware, and set the baud rates for what you want. If you're using interrupts on your comm ports, the software uart is a bit different, but this should get you started.
_________________
Confidence is the feeling you have right before you fully understand the situation...
umka



Joined: 28 Aug 2007
Posts: 99
Location: New Zealand

View user's profile Send private message

PostPosted: Sat Apr 12, 2008 9:36 pm     Reply with quote

cheers KU5D I will try that and see how it goes
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