View previous topic :: View next topic |
Author |
Message |
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
example code for DUAL EUSART using streams |
Posted: Fri Feb 20, 2009 9:52 am |
|
|
about to undertake a project that requires two 38.4k RS232 channels, and i plan on using 18f8722.
some example code for uart stream channel setup would be invaluable, but a search of CCS compiler supplied doc and examples - and of old posts on this forum got nothing.
i'd be grateful for a link to any source code that clarifies the dual uart setup for streams procedure.
i think i'm for sure OK on using printf() and kdhit() - streamwise
its the pesky setup for the hardware that is unclear |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Fri Feb 20, 2009 9:13 pm |
|
|
so since i'm basically fast-polling and dealing with only short sequences ( that the fifo can accomodate ) no INTS
#use delay(clock=32000000) // defining the clock for Mr. compiler
#use rs232(baud=19200, xmit=PIN_C6,rcv=PIN_C7,ERRORS,UART1,STREAM=COMM)
#use rs232(baud=38400, xmit=PIN_G1,rcv=PIN_G2,ERRORS,UART2,STREAM=CARD)
then match the #use RS232 statements to a defined hardware UART pin set and Mr. compiler handles that too.
thats all there is to it huh ?
why do i feel that the CCS compiler is nicer and better than i deserve?
thanks for the lead PCM !!!! |
|
|
|