Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

WinAVR-20080610 header Bug?

WinAVR-20080610 header Bug?

2008-09-21 by Bruce Parham

All,

I just installed Studio 4.14 and WinAVR 20080610 on my home machine for
a personal project I have in mind using an ATmega324P. I've never used
WinAVR before so I've been doing a lot of reading to get up on the curve
and, while reading through some of the header files, I found something
puzzling. 

At the bottom of the iomxx4.h header file, where the interrupt table is
defined, the last three vectors, for the second usart, are omitted for
'644P CUPs. Looking over the 164/324/644 datasheet, I can't find any
difference in I/O structure among the parts. In particular, all three
seem to have two USARTS so why is the vector table different? 

Is this a bug or should I keep reading?

Bruce

Re: WinAVR-20080610 header Bug?

2008-09-21 by Don Kinzer

--- In AVR-Chat@yahoogroups.com, "Bruce Parham" <obparham@...> wrote:
> Is this a bug or should I keep reading?
I don't see that in my copy.  Perhaps I edited it but I don't recall 
doing so.

The definitions for the vectors of the second UART are contained in 
the "else" part of a conditional where the initial test is for the 
mega644 (non-P version).  Consequently, they will be present when 
compiling for the mega324P and mega644P.

#if defined(__AVR_ATmega644__)

# define _VECTORS_SIZE 112

#else /* !defined(__AVR_ATmega644__) */

/* USART1, Rx Complete */
/* USART1 RX complete */
#define USART1_RX_vect			_VECTOR(28)
#define SIG_USART1_RECV			_VECTOR(28)

/* USART1 Data register Empty */
/* USART1 Data Register Empty */
#define USART1_UDRE_vect		_VECTOR(29)
#define SIG_USART1_DATA			_VECTOR(29)

/* USART1, Tx Complete */
/* USART1 TX complete */
#define USART1_TX_vect			_VECTOR(30)
#define SIG_USART1_TRANS		_VECTOR(30)

# define _VECTORS_SIZE 124

#endif /* defined(__AVR_ATmega644__) */

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

Re: WinAVR-20080610 header Bug?

2008-09-21 by Bruce Parham

--- In AVR-Chat@yahoogroups.com, "Don Kinzer" <dkinzer@...> wrote:
>
> --- In AVR-Chat@yahoogroups.com, "Bruce Parham" <obparham@> wrote:
> > Is this a bug or should I keep reading?
> I don't see that in my copy.  Perhaps I edited it but I don't recall 
> doing so.
> 
> The definitions for the vectors of the second UART are contained in 
> the "else" part of a conditional where the initial test is for the 
> mega644 (non-P version).  Consequently, they will be present when 
> compiling for the mega324P and mega644P.
> 
> #if defined(__AVR_ATmega644__)
> 
> # define _VECTORS_SIZE 112
> 
> #else /* !defined(__AVR_ATmega644__) */
> 
> /* USART1, Rx Complete */
> /* USART1 RX complete */
> #define USART1_RX_vect			_VECTOR(28)
> #define SIG_USART1_RECV			_VECTOR(28)
> 
> /* USART1 Data register Empty */
> /* USART1 Data Register Empty */
> #define USART1_UDRE_vect		_VECTOR(29)
> #define SIG_USART1_DATA			_VECTOR(29)
> 
> /* USART1, Tx Complete */
> /* USART1 TX complete */
> #define USART1_TX_vect			_VECTOR(30)
> #define SIG_USART1_TRANS		_VECTOR(30)
> 
> # define _VECTORS_SIZE 124
> 
> #endif /* defined(__AVR_ATmega644__) */
> 
> Don Kinzer
> ZBasic Microcontrollers
> http://www.zbasic.net
>
Don,

Oops, my bad! No P - and, sure enough, the '644 only has one.
Guess I need ro read with more care.

I've been away from AVR's for three or four years. The last 
project I did used a '128 with the Imagecraft compiler so I 
have a lot of catchup ground to cover...

Thanks.

Bruce

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.