Using Harware And Software Uart For Pic
Posted 02 November 2012 - 10:35 AM
I think that answer has a generic question that aplies to all compilers.
If you are using the (E)USART hardware, you are restricted to the hardware defined pins, don't forget that some PICs have function steering on I/O pins.
If you are bit-banging communications (software implemented protocol) you can use any generic digital I/O pins.
Posted 02 November 2012 - 07:00 PM
In my old project i used hardware usart to read GPS ( EM406A ) with dedicaded PINS, then i use 2° usart, software, to read BarCodeReader (other casual pins) and 3° software usart to communicate with SIM908. (other casual pins). Paul
Posted 04 November 2012 - 11:07 AM
SEROUT pin,baudrate, text
SERIN pin,baudrate ,text
if i select pin of harware uart it work wirh hardware uart
if i select every all pin i have 1,2,3,4... software uart
Can i doo the same with sourceboostC ?
Posted 05 November 2012 - 12:34 PM
Yes, it can be done.
As I never used them, I'm not sure if the available lib functions are suitable for it, I mean the same functions for both hardware and software USART.
In a worst case scenario, you might be able to use the lib functions for one type of USART and write your own for the other type.
BTW: Besides looking in the available libs, don't forget to look at the "example code" page at the Sourceboost site, you might find some contributed code and links that can be useful
Edited by JorgeF, 05 November 2012 - 12:42 PM.
Reply to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users