hi, i have a little notice about spi memory simulation. talk about writing to one and same address 0x00. first one in debug window. so, i make a simple code and some pictures to can be more clear, for what about i found. i know that is a little problem and in real pcb device will work fine, but need to be cool and good user and want this to bi fix
i will post some pictures, but know i have some limits of this and think to upload to my hosting in folder and give a link to it :)sorry about UPPER CASE but i know this phpbb software well and need to be upper case to have a ATTENTION about pictures
also IF i want to refresh debug window need to close project and make a new one, close and new one and then open currently project. i think a debug window need to be clear after stop and start simulation again. or have a some check box for user to choose is need to keep info from previous start or to be reset after every stop simulation
here have some code from main.c <>
Code: Select all
void main()
{ SPI_write_byte(eeprom_address_LOW,eeprom_byte_write);
__delay_ms(100);
eeprom_byte_write++;
eeprom_address_LOW++;
}
and some code from
Code: Select all
void SPI_write_byte(unsigned char address_LOW,unsigned char write_data)
{ SPI_CS = 0;
SPI_write(0x06); // WRITE ENABLE command
SPI_CS = 1;
SPI_CS = 0;
SPI_write(0x02); // write byte command
SPI_write(0x00); // write HIGH byte address
SPI_write(address_LOW); // write LOW byte address
SPI_write(write_data); // write DATA to address
SPI_CS = 1;
}
FIRST PICTURE
- 5LC512_eeprom_write.jpg (372.77 KiB) Viewed 305 times
SECOND PICTURE
- 4LC512_eeprom_write1.jpg (394.33 KiB) Viewed 305 times
THIRD PICTURE
- 3LC512_eeprom_write2.jpg (462.05 KiB) Viewed 305 times