Hi,
I am currently using PIC16F873A, MPLAB 8.46, UIC00B programmer/debugger and HI TECH compiler.
Below are few lines at the very beginning of main() where I trying to read and write data eeprom of PIC. I am using debug mode to step in each line and "watch" EEADD and EEDATA. However, something wrong when step into eeprom_write(): it stepping target few times and the arrow stop at some other line - in this case I2C_stop() (refer attachments EEPROM_WRITE_1 & EEPROM_WRITE_2).
can anyone help to explain this?
void main(void)
{
unsigned char rec_data[2];
unsigned char ee_mux_no = 0;
unsigned char address = 0;
unsigned char address2 = 1;
unsigned char value = 171;
ee_mux_no = eeprom_read(address);
eeprom_write(address,value);
ee_mux_no = eeprom_read(address2);