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

how make 2 source to connect PIC18F452 with rs232 ?

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







how make 2 source to connect PIC18F452 with rs232 ?
PostPosted: Thu Oct 12, 2006 9:45 am     Reply with quote

help me!!
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Thu Oct 12, 2006 10:13 am     Reply with quote

Use the hardware UART for the high speed port and a software UART for the low speed port.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Thu Oct 12, 2006 5:48 pm     Reply with quote

If the two sources are never active at the same time you can use a NAND gate to combine them into one UART. Put the NAND gate on the TTL line
between the RS232 level shifter and the PIC.

If you do use the hardware UART for the high speed port and a software UART for the low speed port then the processor will be busy the whole time the low speed port is recieving. That may cause the hardware UART buffer to overflow. If you reverse them the CPU won't be busy for so long.
_________________
The search for better is endless. Instead simply find very good and get the job done.
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Thu Oct 12, 2006 7:09 pm     Reply with quote

Code:
If you reverse them the CPU won't be busy for so long.


It depends. This is a limitation of the CCS software UART implementation not of software UARTS in general.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
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