--- Torsten Mohr <[EMAIL PROTECTED]> 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 AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list