hi Jon,
did you
1. add COMCON1=0 at the begining of your program
2. add PAUSE 100 at the begining (PWRT of MCP23016 need 72ms
3. test CLK (pin 9) to see if oscillator work at about 1 MHZ
4. use %0100000 instead of %01000000 (one zero less) for
your address (that's what the datasheet says)
5. add PAUSE 10 after each I2CWRITE
6. write same to IODIR0 and IODIR1 registers
7. Use DEFINE I2C_SLOW 1 (but your device is suppose to
support fast I2C)
the datasheet is indeed not to clear (like every microchip datasheet) but as i think you may need to latch your outputs. Try to do it at the begining
I2CWRITE %0100000,$02,[$FF,$FF] ; LATCH OLAT0
I2CWRITE %0100000,$03,[$FF,$FF] ; LATCH OLAT1
i hope this will help.
let me know
Mister_e
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks