Maker Pro
Maker Pro

ATMEGA16 USART problem

Hi, i am using ATMEGA16 microcontroller with external crystal frequency 12 MHz. when i am running the code of USART, i does't get any data on hyperterminal, plz help me out..
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Are you using the arduino environment?

Have you chosen or compiled a bootloader designed for 12MHz? I believe the code gets and uses the clock speed to set things like delays and UART settings. (I'd have to check that, but you do need to set things up correctly so the code knows the actual clock speed)
 

Harald Kapp

Moderator
Moderator
Welcome to the forum.

We need more information to be able to help.
Post the relevant sections of your code (Initialization of the µC and UART code)..
Also show how you connect the ATmega to the PC (RxD TxD crossed?)
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
You can check the clock with a dumb 1 second interval led blink.

It might sound dumb, but In every project I build with a microcontroller I include at least 2 things:

1) a programming header
2) A LED controlled by the microcontroller.

The first code I load simply flashes the LED. You'd be surprised how much it tests (Well, Olive2222 might not be)
 
I always design a project with an 'I'm alive' LED. If I have spare outputs, I always add a couple of status LEDs too.

The LED output(s) can also be a stand in for a debug output. Good to have if you have a timing issue, or an interupt latency problem. Using a scope you can see everything from Serial fault codes to timing pulses.
 
Top