ATMEGA168PA USART problem

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

Hi all,

We have been using ATMEGA168A devices in one of our products and recently the supplier sent ATMEGA168PA devices. When we tried a simple USART program the baud rates are not matching. Programmed baud rate is 38400 but data comes correct at 4800. What could be wrong? Seen the data sheet but Can't find any difference in baud rates. Thanks for the help.

 

Nayani

Parthasaradhi Nayani

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

The clock divider comes set at 8, so the cpu frequency is 1/8 of what you think it is. Either clear the clkdiv8 fuse or set the system clock pre-scaler.

Regards,
Steve A.

The Board helps those that help themselves.

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

Thank you very much. Problem solved.

Parthasaradhi Nayani