I'm new in the forum.
A few days ago I decided to get this dsPic30 family and I started with MikroBasic with fast results.
But now, playing with UART, I totally stucked receiving data. I can send bytes but I'm totally uncapable for receive it.
I mounted a RS-232 interface connected to my PC. Removing the Pic and connecting Tx pin to Rx pin I can receive the echo in myPC. This means that the RS-232 interface is running properly.
I tryed to send data with UART_Write_Char() and works perfect.
But I never received a byte using UART_Read_Char()
Anyone knows if there is a limitation with MikroBasic and dsPic30F2011 ?
Maybe this Pic works in Rx inverted mode?
Here, the simple code to echo myPC:
Many thanks!
Code: Select all
program Test
dim rx1 as word
main:
Uart1_Init(9600)
while TRUE
if Uart1_Data_Ready = 1 then
rx1 = Uart1_Read_Char()
Uart1_Write_Char(rx1)
end if
wend
end.