Hi all, I have a problem using the secondary I2C module, with I2C_hardware library. My PIC18F44J11 revision has a bug on the first I2C module (RC3, RC4), it generates some glitches on RB4 and RB5 (behavior mentioned in DS80435 erata). Unfortunetely on RB4 and RB5 I have connected the LCD data lines, so every attempt to write on I2C1 it messing up all LCD display. The best option I saw (except disabling LCD every time I'm writing on I2C) is using the secondary I2C. However so far I wasn't able to make it work.
I have modified the I2C_hardware library to match the I2C2 registers, but trying to write on a MAX5382 fails, the program is freezing. var bit r procedure max5382_write ( byte in address, byte in data ) is ; MAX538xL address=0b_0110_0000=0x60 ; MAX538xM address=0b_0110_0010=0x62 ; MAX538xN address=0b_0110_0100=0x64 ; MAX538xP address=0b_0110_0110=0x66 ; MAX538xx shutdown address=0b_0110_0xx1=0x61 i2c2_start r = i2c2_transmit_byte ( address ) -- write address/shutdown byte r = i2c2_transmit_byte ( data ) -- write data byte i2c2_stop end procedure Someone tested the actual i2c_hardware library on the secondary I2C with success? thx for any further ideeas. Vasile -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
