avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] ATTiny2313 GCC Support?


From: Theodore A. Roth
Subject: Re: [avr-gcc-list] ATTiny2313 GCC Support?
Date: Wed, 24 Mar 2004 08:52:19 -0800 (PST)


On Tue, 23 Mar 2004, Bob Paddock wrote:

>
> What do I need to do to use the ATTiny2313 with GCC?  I'm currently using
> the
> WinAVR Sept./2003 release.  I assume I need to create at least a iotn2313.h
> include I/O file, is there anything else?
>
> PCINT vector #12 is new, it is a PortChange IRQ.  Do I need to write some
> kind
> of SIGNAL() handler for it, or is just defining the new vector table
> sufficient?
>
>  From AVR091.pdf app. note:
>
> Changes to Interrupt Vector
>
> The interrupt vector table of the ATtiny2313 differs from the one of
> AT90S2313. These changes mainly consist of addition of new interrupt
> vectors.
>
> Register Name AT90S2313 Register Name ATtiny2313
> USR UCSRA
> UCR UCSRB
> UBRR UBRRL
>
> Changes to Interrupt Vectors
>
> Vector No. Program Address AT90S2313 ATtiny2313
> 1 0x0000 RESET RESET
> 2 0x0001 INT0 INT0
> 3 0x0002 INT1 INT1
> 4 0x0003 TIMER1 CAPT1 TIMER1 CAPT
> 5 0x0004 TIMER1 COMP1 TIMER1 COMPA
> 6 0x0005 TIMER1 OVF1 TIMER1 OVF
> 7 0x0006 TIMER0 OVF0 TIMER0 OVF
> 8 0x0007 UART RX USART0 RX
> 9 0x0008 UART UDRE USART0 UDRE
> 10 0x0009 UART TX USART0 TX
> 11 0x000A ANA_COMP ANALOG COMP
> 12 0x000B PCINT
> 13 0x000C TIMER1 COMPB
> 14 0x000D TIMER0 COMPA
> 15 0x000E TIMER0 COMPB
> 16 0x000F USI START
> 17 0x0010 USI OVERFLOW
> 18 0x0011 EE READY
> 19 0x0012 WDT OVERFLOW

It's probably simplest to start with the io2313.h file and just modify
it for to generate the iotn2313.h file. You'll need to change avr/io.h
to allow it to include the new iotn2313.h file.

In addition to that, you need to modify the configure.in script to have
it build the libs for the tiny2313.

That should be about it for avr-libc (except for updating the docs ;-).
I also think that there will need to be some changes in gcc too (to
allow it to recognize the "-mmcu=attiny2313" option.

If you could generate the iotn2313.h header and send it to the
avr-libc-dev list, I can do the rest of the changes for avr-libc
(unless you want to give it a try).

Ted Roth

_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list


reply via email to

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