View previous topic :: View next topic |
Author |
Message |
dk-info
Joined: 13 Apr 2009 Posts: 5 Location: Melbourne, Florida
|
Multiple serial ports on one PIC18F8722 |
Posted: Fri Oct 16, 2009 12:45 pm |
|
|
I have an application where I need to control five low bandwidth devices using an RS-232 interface.
I haven't tried it, but how many "soft" UARTS can be programmed on a '8722? I only have to access the serial devices every second or so, at a very low bandwidth (1200 Baud).
Is it reasonable to invoke the "#use rs232() five times? What are the resource consequences?
Thanks
David |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Fri Oct 16, 2009 11:47 pm |
|
|
As mentioned in the other thread, multiple software uarts is a no-win situation.
PIC24's come with up to 4 uarts.. then you'd have to add an external 4th.
I hooked an octal uart up to a 18F97J60 recently and got it to work - but it needs a lot of optimization.
A PIC24 would have been better for that too.. the customer wanted to try the 97J60 first though..
It can be done - but it's not pretty. :D
-ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Sun Oct 18, 2009 4:04 am |
|
|
bkamen wrote: | As mentioned in the other thread, multiple software uarts is a no-win situation. |
I disagree. 5 low speed software UARTS all at a constant baud rate is a walk in the park but not using the #use RS232 mechanism.
5 serial ports at 1200 baud could be implemented using high priority interrupts and a single timer. High priority to leave low priority to other functions. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
|