vinodstanur
Advanced Member level 3
- Joined
- Oct 31, 2009
- Messages
- 751
- Helped
- 114
- Reputation
- 234
- Reaction score
- 114
- Trophy points
- 1,333
- Location
- Kerala (INDIA)
- Activity points
- 7,054
I am trying to read and write FLASH and EEPROM of an AVR (atmega8) via ISP.
I had programmed a PIC16F877A which accepts 8 bit data from UART (hyperterminal) and send it to AVR via SPI at reset zero...
I have successfully enabled the ISP mode by sending
cmd(0xac, 0x53, 0, 0); also verified the return byte.
Now I can write and read back the EEPROM without any problem..
for example,
cmd(c0,00,11,AB) writes AB at 11 of eeprom
Now I could read it by
cmd(a0,00,11,xx)
NO PROBLEM UPTO THIS...
Now,
when I am tying to write and read the FLASH, I am always gettign 0xff while reading,,,
I used command 60,68 to write and 20,28 to read (lower byte and higher byte respectively)
But ALWAYS READING 0XFF even if I modify it...
what may be the problem ?
I had programmed a PIC16F877A which accepts 8 bit data from UART (hyperterminal) and send it to AVR via SPI at reset zero...
I have successfully enabled the ISP mode by sending
cmd(0xac, 0x53, 0, 0); also verified the return byte.
Now I can write and read back the EEPROM without any problem..
for example,
cmd(c0,00,11,AB) writes AB at 11 of eeprom
Now I could read it by
cmd(a0,00,11,xx)
NO PROBLEM UPTO THIS...
Now,
when I am tying to write and read the FLASH, I am always gettign 0xff while reading,,,
I used command 60,68 to write and 20,28 to read (lower byte and higher byte respectively)
But ALWAYS READING 0XFF even if I modify it...
what may be the problem ?