[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] ATtiny 25/45/85 support
From: |
Joerg Wunsch |
Subject: |
Re: [avr-libc-dev] ATtiny 25/45/85 support |
Date: |
Tue, 31 May 2005 11:57:53 +0200 |
User-agent: |
Mutt/1.4.2.1i |
As David Carr wrote:
> Is there a list of all SIG_* somewhere?
The avr-libc doc is supposed to have an exhaustive list of all names.
Alas, I recently noticed we are rather inconsistent in the naming.
> Also, where does
> the number in _VECTOR(#) come from?
It corresponds to the vector order in the datasheet, except the
datasheet starts numbering base 1 at the reset vector, while we start
base 0 at the reset vector (which is omitted), i.e. base 1 at the
first actual interrupt.
> Lastly, how is _VECTORS_SIZE calculated?
(last vector # + 1) * sizeof(vector slot)
Adding 1 takes care of the reset vector slot. The slot size depends
on the device, it's 4 for the large devices, 2 for the small ones.
Remember the Atmel datasheet counts in 16-bit words, while we do count
everything in bytes.
> Also, when I looked at how the EEPROM SFRs are defined in io.h I
> noticed that there are few differences between the EECR bits of the
> tiny45 and the EECR bits in io.h. Should I have an #ifdef block
> there to choose the correct set of EECR bit #defines or should we
> just move these defines into the device specific io headers?
See for example for the ATmega169 (which has been the first MCU with
the EEPROM devices in a different location): #undef the old values,
and define them to what is needed.
Sigh, we *really* need (partial) per-device libs.
> I noticed some errors (misnamed bits) in the register summary of the
> 25/45/85 datasheet, is this common?
Please report them to address@hidden Yes, alas, it occasionally
happens there are some errors in these documents. After all, we all
know how development works: marketing announces the availability of a
new device, and once it's eventually ready (a couple of months later
:), everything that's not considered to be crucial is rushed out of
the door...
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)