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

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

RE: [avr-gcc-list] PEN on atmega128


From: Trampas
Subject: RE: [avr-gcc-list] PEN on atmega128
Date: Sat, 4 Jun 2005 23:38:17 -0400

Remember the Atmega128 does not use the SPI pins for the ISP it uses the
Rx/Tx pins of the UART. 

Regards,
Trampas 
  
 

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
Parthasaradhi Nayani
Sent: Saturday, June 04, 2005 10:25 PM
To: Torsten Mohr; address@hidden
Subject: Re: [avr-gcc-list] PEN on atmega128



--- Torsten Mohr <address@hidden> wrote:

 
> i wonder if anybody ever successfully used an
> ATMega128?  I always
> assumed that.

We have been using ATMega128 without any problems for
more than a year. We use the SPI bus to program the
chip with AVRISP. On some occations used JTAG
programmer. 
 
> Has anything changed in the specs?
> 
> Does anybody else experience problems with this
> chip?
> 
> Regarding PEN, as it is not on the programming
> connector i think
> it just has to be either low or high, but can not be
> changed during
> programming, right?

Though I dont have the schematics right now, AFAIK,
ISP uses RESET, MISO,MOSI and the SS pins only. PEN is
to be left un-connected.


> 
> I found out that after disconnecting the power i can
> do exactly one
> step of either:
> 
> - erase
> - program
> - verify
> 
> Now i got the problem that the program does not do
> what i
> expect it to do:
> 
> 
> int main(void) {
>   volatile unsigned int i;
>   volatile unsigned char p = 0;
> 
>   WDTCR = 0x1f;
>   WDTCR = 0x00;
> 
>   DDRD = 0xFF;
>   PORTD = 0x0f;
> 
>   DDRB = 0xFF;
>   PORTB = 0x0f;
> 
>   do {
>     PORTB = p++;
> 
>     //    while (PINB & 0x01);
> 
>     //    for(i = 0; i < 100; i++);
> 
>   } while(1);
> 
>   return 0;
> }
> 
> Is there an obvious error in it?  I can't see the
> pattern 0x0f on Port D
> and all pins on Port B are near 0 V.

To test this program, set optimization to 0 in make
file (O = 0).

> 
> There is no external crystal soldered on the board,
> it should start and
> run anyway, right?

Yes it will work if you enable the internal osc of the
chip.

regards
Nayani P



                
__________________________________ 
Discover Yahoo! 
Use Yahoo! to plan a weekend, have fun online and more. Check it out! 
http://discover.yahoo.com/


_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list






reply via email to

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