i2c general call not working

NVHLVNOP

Member
Hi it's me again after a few years of inactivity. A while back I was trying to communicate with the AS1115 LED driver thru i2c (thread here). You all helped me out a lot and we found that even though the device address was %0000000x, we would only be able to communicate with it if we used HI2CSETUP I2CMASTER, %00000001, I2CSLOW, I2CBYTE. Using %00000000 as the address would not work. Now, the new PicAXE editor 6 is out and it will not allow the read/write bit to be set. It must be zero for the compiler to accept it. I'm trying to use the general call address %00000000 to communicate, but the code gets hung up and will not go any further than this command. I verified this with the following:

Code:
SERTXD ("Issuing I2C general call...")
HI2CSETUP I2CMASTER, %00000000, I2CSLOW, I2CBYTE 'prepare for data transfer with LED controller.  Bit0 is ignored, 
SERTXD ("Issuing command to AS1115 to self-address itself...")
HI2COUT (%00000110) 'use the self-adressing feature of the LED controller
PAUSE 100
'SERTXD ("Setting up to talk to AS1115 on its new address...")
HI2CSETUP I2CMASTER, %00000010, I2CSLOW, I2CBYTE 'set up to talk to the LED controller with its new address
'SERTXD ("Issuing various commands to AS1115...")
HI2COUT 0x0C, (0x01) 'reset registers
HI2COUT %00001001, (0x3F) 'decode mode
HI2COUT %00001010, (8) 'set AS1115 brightness
HI2COUT %00001011, (3) 'set AS1115 LED controller to display digits 0 thru 3.
The serial terminal shows "Issuing I2C general call...", but then gets hung up and doesn't show anything else. If I comment out the entire AS1115 code block I posted above, then the program continues to run and does what it is supposed to. Any ideas why the i2c command changed? How can I get my device working again?

Thanks!
 

hippy

Technical Support
Staff member
While you cannot specify %00000001 directly, you can possibly step round that by using -

b0 = %00000001
HI2CSETUP I2CMASTER, b0, I2CSLOW, I2CBYTE
 

NVHLVNOP

Member
Thanks. The editor accepted that. I'm still unable to communicate with the chip. I'll try out a few more things as I'm not sure if it is connected properly or perhaps got fried at some point.
 
Top