TucsonDon
Member
I am trying to setup a rtc using I2C but am having issues in getting it to work. I used the code that was generated by MPLab 4.01 code config. Using on an EasyPICv7 board with a PIC18F46K22 and mikro click rtc.
If I run the code with the debugger I can see on the scope (picture) that it starts but when I pause the program after no further activity the pc is at line 663 of the i2c1.c file (while(i2c1_state != S_MASTER_IDLE); )
I don’t think that the master is getting an acknowledgment but unsure as to why.
I have tried to provide all the info but if I missed something forgive me.
If I run the code with the debugger I can see on the scope (picture) that it starts but when I pause the program after no further activity the pc is at line 663 of the i2c1.c file (while(i2c1_state != S_MASTER_IDLE); )
I don’t think that the master is getting an acknowledgment but unsure as to why.
I have tried to provide all the info but if I missed something forgive me.