So, back to the basics.
If not 65kHz is correct, then what should it be?
If I change the device address from $40 to something else for ex. $45 it will throw the program to the error label. That behavior sounds "healthy", doesn't it?
By CONFIGs you mean? See post #1
The crystal is 12MHz
DEFINE OSC 48
The SDA,SCL pins are connected correctly to pins 33,34 + 2x 2k2 pull-ups
Using also Microchip USB HID bootloader v2.2
I2Creg = OLAT1 : I2Cbyte = $ff : gosub writeioextender: pause 20
I2Creg = IODIR1 : I2Cbyte = $ff : gosub writeioextender: pause 20
The current test loop is here:
Loop:
gosub getbattery
if onoffpressed = 1 then powerout = 0
I2Creg = GP1 : gosub readioextender' to IOEbyte
pause 20
lcdout cmd,home3, dec battery/10, ".",dec battery//10,"V ", dec w/100," ", _
dec onoffpressed,cmd,home4, hex2 IOEbyte," "
goto Loop
Bookmarks