Society of Robots - Robot Forum
Software => Software => Topic started by: VegaObscura on December 30, 2010, 01:14:02 AM
-
I've added UART to my $50 bot and it does a great job of sending information to my computer. I can easily read sensor values and output them to hyperterminal flawlessly. The problem is, I'm having a lot of trouble sending information in the other direction. I'm trying to use hyperterminal to send information to my bot and nothing I do seems to work. I think my problem is not in the bot or the code but rather in getting hyperterminal to send anything. If I have my bot to constantly send something and then I bridge RX and TX, the bot receives the information its sending. But no matter what I do, I can't get it to receive anything from hyperterminal.
I've read that all you have to do to send a character from hyperterminal is press a button and hit enter. The problem is nothing happens when I do that. TX on my UART module doesn't even flash.
Here's the code I'm using:
#include "interface.h"
void init (void);
u08 myReceivedByte;
int main()
{
init();
while(1)
{
if (uartReceiveByte(&myReceivedByte)) {
rprintf("Pressed: %d\n", myReceivedByte);
}
}
return 0;
}
UART gets initialized in interface.h. I have no idea what to try at this point. Everything works fine when I'm sending data from the bot to hyperterminal, and the bot works fine when I try a loopback by bridging rx and tx.
-
How have you configured flow control for your port in Hyperterminal? This should be set to NONE for basic comms. Sounds like yours may be set to Hardware?
-
Fixed. +1. Thanks.