1. How can I specifically assign the command setup_uart to ether the hardware uart1 or uart2 in my 18F87J10?
2. How are the RX/TX buffers of the uarts flushed?
Thx & rgds
Urs
Ttelmah Guest
Posted: Sat Aug 11, 2007 8:10 am
When you use #use RS232, it allows you to assign a stream 'name', to a particular UART (selected by the pins). You then use this name in setup_uart to say which UART is being referred to.
Read the characters...
The buffers wake up 'empty'. The output buffer empties itself as characters are sent. The input buffer is emptied as you read it. If you are using extended 'software' buffering, then it is up to your code to initialise these to the empty state.
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