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

Need more than 2 Uarts?

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



Joined: 18 Oct 2003
Posts: 35
Location: Brisbane, Australia

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

Need more than 2 Uarts?
PostPosted: Sat Oct 11, 2008 7:51 pm     Reply with quote

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

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

PostPosted: Mon Oct 13, 2008 12:06 pm     Reply with quote

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

View user's profile Send private message

Re: Need more than 2 Uarts?
PostPosted: Mon Oct 13, 2008 12:32 pm     Reply with quote

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

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

PostPosted: Mon Oct 13, 2008 1:08 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Oct 16, 2008 12:44 am     Reply with quote

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

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

PostPosted: Fri Oct 17, 2008 12:14 pm     Reply with quote

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

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

PostPosted: Sun Oct 19, 2008 12:27 am     Reply with quote

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....
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