Hello
With this code i init the uart, suposed with the baudrate 2400, but on the Microcode communication Tool it works correctly only if i select 9600.
Anyone know what is the problem?
Thanks for explanation
Best regards
Pedro
DEFINE OSC 16
INCLUDE "modedefs.bas"
INCLUDE "DT_INTS-18.bas" ' Base Interrupt System
INCLUDE "ReEnterPBP-18.bas" ' Include if using PBP interrupts
ASM
INT_LIST macro
INT_Handler RX_INT, _IntRx, PBP, yes
endm
INT_CREATE
ENDASM
@ INT_ENABLE RX_INT
' Initialize USART
TRISC = %10111111 ' Set TX (PortC.6) to out, rest in
SPBRG = 25 ' Set baud rate to 2400
RCSTA = %10010000 ' Enable serial port and continuous receive
TXSTA = %00100000 ' Enable transmit and asynchronous mode
Bookmarks