UART Not Working In ATmega8.

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear Sir,
My Circuit run Perfectly in Protues.

but in practicality not working :(  

 

what can i do?

Attachment(s): 

শূন্য  - The ZeRo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Of course it doesn't work - you're missing a few parts.
Crystal
Capacitors
Max232 for rs232

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

No such thing as an internal crystal - there is an internal rc oscillator that is not too stable.
Just like the millions before you that have had the same problem - what baud rate and what are your fuses set to?
Have you verified how fast your AVR is running?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

If you are serious about using UART then don't mess about. Buy a baud rate friendly crystal and two capacitors to accompany it.

 

But if you are to stick with the internal 8MHz your fuses have selected then at least read out the 8MHz calibration value and load it into OSCCAL when the code starts so it will at least be closer to 8MHz.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Your wasting your (and our) time trying to do serial comm with out an accurate clock source!  Add a xtal and two caps, set the fuses and be happy.

 

 

Jim

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

14.7456MHz is a good crystal for a 16MHz avr. Try half that for 8MHz? Or get a newer mega88 that will run on a faster clock. Mega8 is ok for research, experimenting.

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

8 Mhz rc will work correctly with 9600, the only thing to do is crossing TXD/RXD, and of course ttl-level serial converter.

Last Edited: Thu. Jun 11, 2015 - 05:43 PM