Go Down

Topic: Problem using arduino board to write data (Read 765 times) previous topic - next topic

lingshi2010

Hi all
I encounter problems while writing data using arduino board. I have written a simple progam for testing as followed:

Quote

void setup()
{
  Serial.begin(115200);
}

void loop()
{
  Serial.write(0xAA);
}



I use the max232 to convert the voltage level to rs232, and use the hyperterminal to observe the output. However, from the hyperterminal there are many "0" inserted to the output. How can these be solved?
Thanks.

PaulS

With no delays, that's probably writing data faster than hyperterminal can display it.

lingshi2010

I have tried adding 1 second delay and 5 seconds delay in the program, but there is still problem.

Coding Badly


Try a lower baud rate.  Ensure the two baud rates are the same.  Try a printable character.

lingshi2010


CrossRoads

hex AA = decimal 170
http://www.cs.utk.edu/~pham/ascii.html
look at the extended ascii table, maybe that is something hyperterminal cannot handle.
Try using Serial.print or Serial.println instead.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up