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

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

Re: [avr-gcc-list] Student Needs Help With GCC Test 7 (UART) and the ATM


From: Peter Bosscha
Subject: Re: [avr-gcc-list] Student Needs Help With GCC Test 7 (UART) and the ATMEGA 128.
Date: Fri, 08 Mar 2002 07:43:28 +0200

Hi,

Check what vector you're using in your SIGNAL
The MEGA128 (iom128.h) does not have a define for SIG_UART_TRANS &
SIG_UART_RECV.
Instead use  SIG_UART0_TRANS & SIG_UART0_RECV

The sneaky bit is that because of the nature of the #define, the
compiler cannot/does not check the actual address you're using inside
the SIGNAL. Using the original defines as in GCCTEST7 results in you
interrupt vector not being filled.

Have fun,

Peter


>>> John Branthoover <address@hidden> 03/07/02 05:42PM >>>

Hello All,
     I am a student at Point Park College working on
my senior project.  I amattempting to use the UART on
the Atmega 128 with an STK500/501 starter kit with no
success.  

     I have successfully compiled and programmed a
8515 with the GCC test program #7.  I have also
compiled and programmed the Atmega 128 with GCC test
program #2.

     When I attempted to compile GCC test program #7
for the Atmega 128,  I get  a number of errors such
as:

`UDR' undeclared
`UCR' undeclared
`UBRR' undeclared

     Now I know that some of the register names have
changed because of the extra UART and new functions. 
I have changed the uart.c file as follows:

UDR was changed to UDR0
UCR was changed to UCSR0B
UBRR was changed to UBRR0L

     I also edited the uart.h file to change the clock
system frequency from 4.0 MHz to 3.69 MHz.  This is
the frequency that AVR Studio 3.53 is set at.

     The files now compile with no errors but I still
can not get the UART on the Atmega 128 to function.

     Does any on out there have any Ideas or some
sample code the would explain what I am doing wrong? 
Any information that you can give me will be greatly
appreciated.  Thank you for your time and have a nice
day.


__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/ 
avr-gcc-list at http://avr1.org 

avr-gcc-list at http://avr1.org



reply via email to

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