View previous topic :: View next topic |
Author |
Message |
burnsy
Joined: 18 Oct 2003 Posts: 35 Location: Brisbane, Australia
|
Need more than 2 Uarts? |
Posted: Sat Oct 11, 2008 7:51 pm |
|
|
Hi There,
I'm currently working on a project where I have about 4 serial devices (1 swipe reader, 1 VGA controller, 1 GSM module and a serial keypad)connected to my 16F877 based controller board.
To achieve it, I use the onboard UART and 3 x 16F687s, each one of them acting as a UART via the SPI interface. Its less expensive than a MAX3100 and reliable. The 16F687's can even provide additional I/O.
I wrote this code long ago, and was wondering if anyone is interested in me posting it in the code section. If it's useful, let me know and I will. _________________ This is the last code change until its ready.... |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Mon Oct 13, 2008 12:06 pm |
|
|
It would be interesting to see your code – distributed architectures are fun.
BTW, NXP now makes I2C UARTS - SC16IS752. They are cheaper than MAX3100, they are dual, they use I2C, which saves pins. _________________ Read the label, before opening a can of worms. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
Re: Need more than 2 Uarts? |
Posted: Mon Oct 13, 2008 12:32 pm |
|
|
burnsy wrote: | I wrote this code long ago, and was wondering if anyone is interested in me posting it in the code section. If it's useful, let me know and I will. | I'm interested.
kender wrote: | BTW, NXP now makes I2C UARTS - SC16IS752. They are cheaper than MAX3100, they are dual, they use I2C, which saves pins. | Additional:
- The NXP chips are better available (Maxim samples are fast, quantities of 100+ can take up to 3 months).
- The NXP chips are easier to write software for (the MAX3100 has a strange interrupt logic that's incompatible to the PIC). |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Mon Oct 13, 2008 1:08 pm |
|
|
It is always interesting to see how other solutions are built.
Another option is to use 1 x PIC24FJ64GA004 (40 pin) and 1 x PIC24FJ64GA002 (28 pin) to replace all 4 PIC16F in this scenario. These PIC24Fs have mappable I/O (about time) with each giving you two UARTS and two SPI ports. This also gives you a lot more RAM and PGM memory and enhanced peripherals.
This would deliver a lower cost solution with smaller PCB footprint. Of course you then need a compiler upgrade :-) _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
donquixote
Joined: 21 Jul 2008 Posts: 15 Location: Shanghai, China
|
|
Posted: Thu Oct 16, 2008 12:44 am |
|
|
Is it possible to use the PIC24F128GA106 in the multi-uart solutions?
I am working on the design with 3 UARTs which migrated from PIC16F873A.
Thanks. _________________ Don Quixote |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Fri Oct 17, 2008 12:14 pm |
|
|
donquixote wrote: | Is it possible to use the PIC24F128GA106 in the multi-uart solutions?
I am working on the design with 3 UARTs which migrated from PIC16F873A.
Thanks. |
Definitely. Hopefully you can easily adapt burnsy's code. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
burnsy
Joined: 18 Oct 2003 Posts: 35 Location: Brisbane, Australia
|
|
Posted: Sun Oct 19, 2008 12:27 am |
|
|
Well, there's a few good suggestions there that I'll be looking into myself.
I like the I2C solution by NXP, although being old-school I would really still like to use 5V and through-hole parts.
I might try the PIC24F128GA106 as that seems like a good alternative, but yep, I would have to buy a new compiler ;).
The solution I came up with the multiple 16F687s is one designed years ago when the 16F687 became available, but was never utilized. Recently, I was asked to design a new project with multiple uarts, and I dug the pcb out of the store-room and continued writing for it. I have some code written for the 16F877A and 18F4520s, either used as a master processor, and of course the 16F687s as slaves. I do like using the SPI as opposed to the I2C in this application as the processor overhead is minimal, and is all interrupt driven.
I'll be finishing the code over the next week or two. I'll post as soon as I can and include circuits etc.. _________________ This is the last code change until its ready.... |
|
|
|