Atmega128 UART / RS232 test code

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

I use 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.



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?



Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.