View previous topic :: View next topic |
Author |
Message |
New-hand Guest
|
how make 2 source to connect PIC18F452 with rs232 ? |
Posted: Thu Oct 12, 2006 9:45 am |
|
|
help me!! |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Thu Oct 12, 2006 10:13 am |
|
|
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
|
|
Posted: Thu Oct 12, 2006 5:48 pm |
|
|
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
|
|
Posted: Thu Oct 12, 2006 7:09 pm |
|
|
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!! |
|
|
|