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

Multiple UART + Interrupts

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



Joined: 12 Dec 2005
Posts: 50
Location: Curitiba - Brazil

View user's profile Send private message Send e-mail

Multiple UART + Interrupts
PostPosted: Wed Jul 19, 2006 7:15 am     Reply with quote

It is possible to have multiple UARTs in any PIC MCU, even if your MCU does not have a hardware UART because then you have a software UART, isnīt it ?
Also, if I use the hardware UART I can use an interrupt to receive data ( #INT_RDA ). Will #INT_RDA also work for software UART ?
If yes, how do I receive the data for multiple UARTs ? How do I differentiate each of the UARTs to receive data ?

Thanks in advance.
Pasini
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: Wed Jul 19, 2006 7:32 am     Reply with quote

Some PICs (typically the 68 pin packages and above) have 2 hardware UARTS. You can have software UARTS. If you use the CCS compiler you will be able to create half duplex UARTs via the #yse rs232 directive (they can send, or receive but not both simultaneously).

You can emulate full duplex UARTS in software including interrupt support. This requires use of 1 or more times and possibly external interrupt pins depending on what performance level you are trying to achieve.

For example, one one of my projects I have a PIC18F452 @ 40MHz runnning one hardware UART and two software UARTs simultaneously at 115Kbps full duplex as well as other peripherals such as a USB controller. However this is VERY resource intensive. (Shamelessplug follows) If you are interested in purchasing the source code for some SW UART full duplex drivers then check out the software page on my web site.
_________________
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