simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] Adding ATmega1281


From: Petr Hluzín
Subject: Re: [Simulavr-devel] Adding ATmega1281
Date: Tue, 31 Jan 2012 22:36:34 +0100

On 31 January 2012 21:53, Joerg Wunsch <address@hidden> wrote:
> Ahoj Petre,
>
>> I guess ATmega1281 will be similar to ATmega128.
>
> Well, let's say "mostly upwards compatible".
>
>> AVR097 says: "ATmega128 and ATmega1281/2561 are designed to be a pin
>> and functionality compatible sub family.".
>
> Yes, compatible, but not identical.
>
> In particular, the timers have been much extended, compared to
> previous AVRs.
>
> I don't know about the state of simulated peripherals, but all the
> timer blocks of newer AVRs are mostly the same.  So if you've got one
> implementation already for another more recent AVR, that could be
> reused.  Otherwise, if there's no modern timer around already, the
> ATmega1281 implementation has to be the first one to create it, but
> then, all other recent AVRs could clone it.  There are a lot more of
> PWM modes available in the modern timer blocks.

What are the more recent AVRs?
Is there a list/table where people can see which devices have new peripherals?

Is there a comparison of the new and old timers?
I tried to search application notes, unsuccessfully.

I think I saw a generation identifier in some peripheral description
in Atmel XML files, but I cannot verify it since they are not
downloadable separately. (I do not want to risk breaking my VS SP1 by
installing AVR Studio 5.)

>
>> TIMSK register changed for timers 1 and 3
>
> There's now one TIMSKn register (and one TIFRn register) per timer,
> rather than one or two per device.
>
>> and that timers 0 and 2 are
>> completely swapped (I guess those guys at Atmel were smoking pot at
>> the time),
>
> Probably not.  Otherwise, things you once realized to be mistakes
> could never be fixed.
>
> Starting with the era of the ATmega1281, the diversity that once used
> to be among the various AVR types got vastly unified.  Turning timer 2
> to be the general RTC-aware timer is part of that story.

I am interested in knowing more. Is there a overview of AVR history?

>
> Don't know whether simulavr simulates the watchdog timer; if so, the
> watchdog implementation of the modern AVRs is another major change.
> The most important change is that the watchdog now cannot be disabled
> unless the WDRF bit in MCUCSR has been explicitly cleared by the
> application.  Also, the watchdog is now capable of generating an
> interrupt rather than only triggering a reset.

We implement the WDT, but I think only the limited version. See
http://git.savannah.gnu.org/cgit/simulavr.git/tree/src/hwwado.cpp

-- 
Petr Hluzin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]