Hello friends,
I am trying to use 12F1822 usart but all i am getting on PC terminal is gibbrish.
in simulation it works fine.
Can someone pls tell me whats wrong here.
Thanx in advance.
cheers
mastero
AllDigital
TRISA = %00011000
PORTA = 0
Dim i As Byte
Symbol led = PORTA.5
UART1_Init 19200
WaitMs 100
led = 1
UART1_Write "START", CrLf
loop:
UART1_Get i
If UART1_Data_Ready > 0 Then
UART1_Write "Number: ", #i, CrLf
Toggle led
WaitMs 50
Endif
Goto loop
I am trying to use 12F1822 usart but all i am getting on PC terminal is gibbrish.
in simulation it works fine.
Can someone pls tell me whats wrong here.
Thanx in advance.
cheers
mastero
AllDigital
TRISA = %00011000
PORTA = 0
Dim i As Byte
Symbol led = PORTA.5
UART1_Init 19200
WaitMs 100
led = 1
UART1_Write "START", CrLf
loop:
UART1_Get i
If UART1_Data_Ready > 0 Then
UART1_Write "Number: ", #i, CrLf
Toggle led
WaitMs 50
Endif
Goto loop