Hi, This is what the manual explained how you turn on the tx/rx. By zeroing RCSTA and TXSTA you should stop the uart.
12.1.2.1 Enabling the Receiver The EUSART receiver is enabled for asynchronous operation by configuring the following three control bits: • CREN = 1 • SYNC = 0 • SPEN = 1
12.1.1.1 Enabling the Transmitter The EUSART transmitter is enabled for asynchronous operations by configuring the following three control bits: • TXEN = 1 • SYNC = 0 • SPEN = 1
Do the following test read the RCSTA register and the TXSTA as soon you initialized the micro and them after you start the uart. This will tell us how the status register it is set before and after .
dim tmp_1 as byte dim tmp_2 as byte
tmp_1 = TXSTA serout s_out ,i9600 ,[" TXSTA = ",dec tmp_1, 13 ] tmp_2 = RCSTA serout s_out ,i9600 ,[" RCSTA = ",dec tmp_2, 13 ]
Also you can try do something like this : TXEN = 0 : SYNC = 0 : SPEN = 0 CREN = 0 : SYNC = 0 : SPEN = 0
Regards. tauro0221
|