Atmega128 UART / RS232 test code

This bunch of code can be used to test UART or RS232 (depending on your circuit).

I use https://sites.google.com/site/terminalbpp/ as a windows terminal.

Compile and flash this code and your microcontroller will tell you that its running via UART. You can then send it a request (ending with a character return) and it will respond with the baud rate register value (just used as an example).

The archives below have all the source code that you will need to get basic UART running on your ATmega128.

2011-AVRUART.zip

2011-AVRUART.tar

 

Advertisements

2 thoughts on “Atmega128 UART / RS232 test code

  1. Craig,

    Did you cable the uart tx and rx pins on the atmega128 to a db-9 connector or did you need to use a level shifter?

    Mike

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s