I’m trying to implement a custom uart interface using pros. As a simple test I have
void initializeIO() {
usartInit(uart1, 9600, SERIAL_8N1);
}
and
void operatorControl() {
while (true)
{
fputc('2', uart1);
delay(25);
}
}
All that I see getting sent across is garbage and only about one character every few seconds.
I’ve checked that the baud rates are the same on both ends and that Tx/Rx wiring is correct.
Not sure if I’m missing something about how to use the uart ports in the code or if it’s a hardware issue . . .
Barin
January 3, 2018, 10:55pm
2
Highwayman:
I’m trying to implement a custom uart interface using pros. As a simple test I have
void initializeIO() {
usartInit(uart1, 9600, SERIAL_8N1);
}
and
void operatorControl() {
while (true)
{
fputc('2', uart1);
delay(25);
}
}
All that I see getting sent across is garbage and only about one character every few seconds.
I’ve checked that the baud rates are the same on both ends and that Tx/Rx wiring is correct.
Not sure if I’m missing something about how to use the uart ports in the code or if it’s a hardware issue . . .
Is the issue somehow related to encoding settings? I know accessing the terminal on a computer requires a specific setting …
I’m not particularly familiar with the specifics of UART though, so I may be completely wrong.