ATMEGA16 Simulation

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

Hi,

I am using Codevision AVR-C, and AVR Studio 4.05

When I load the COF file into AVR Studio to start a project, I select the ATMEGA16 device from the list. However, once the simulator has loaded if I now go to Debug|AVR Simulator options, it has selected ATMEGA169, in the device description it is described as an ATMEGA16 though! Further down the list is the ATMEGA16, which I select from the list, but then, 16MHz is not in the list of clock frequencies! The highest is 12MHz, and the next option goes back to 4MHz. If I type in 16MHz, it seems to accept it, but then I get a warning saying that the frequency is faster than the device can handle!

:((

Furthermore, when I come to simulate the code. When I get to a a While(1) {} in the main code, it resets back to zero :((

aaaaand, I also now notice that the simulator modifies UCSRC when I
write to UBRRH which it shouldn't do either! :S thats not too handy!

Thats all for now ;)

Regards,
Brian Sidebotham.
( Off to try Studio 3.55 )

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

Using Studio 3.55 has fixed this problem. Studio 3.53 still had the resetting bug. However studio 3.55 does not deal with UBRRH and UCSRC correctly, so everytime I modify UCSRC I have to go and manually change UBRRH. It ignores the top bit which should select which register I'm writing too at that hardware address.

Still, can simulate it now :)