Hemi345
Senior Member
Good morning,
I built a module with one of these ICs and am having trouble getting anything out of it.
The programming guide is at: https://www.silabs.com/documents/public/application-notes/AN332.pdf
On page 207, it states the I2C address when SEN pin = 0, is 0010001b. When SEN = 1, the address is 1100011b.
I have SEN pulled high, so I've tried 11000110 as the address (also tried 00100010 just in case).
On page 64, it details the power on command. Looks like I need to send 2 bytes. Here's what my code looks like:
Does my power on command look correct?
When I try to get the chip revision info, all I get is 255 for each value.
I just had a thought. If I don't tell it to receive all 15 response bytes, would I get the '255' value for the first eight?
Should I change the GetRev command to receive all 15 even I only want to see what the first eight are?
Not near the project at the moment to give it a try. Just curious for ideas on things to try tonight.
BTW, I have an RTC and EEPROM on the same PCB that the PICAXE 20X2 is on and can confirm I2C comms work fine with them, so I believe my wiring is all correct.
Thanks.
I built a module with one of these ICs and am having trouble getting anything out of it.
The programming guide is at: https://www.silabs.com/documents/public/application-notes/AN332.pdf
On page 207, it states the I2C address when SEN pin = 0, is 0010001b. When SEN = 1, the address is 1100011b.
I have SEN pulled high, so I've tried 11000110 as the address (also tried 00100010 just in case).
On page 64, it details the power on command. Looks like I need to send 2 bytes. Here's what my code looks like:
Code:
#picaxe 20x2
#terminal 9600
#no_data
pause 2000
hi2csetup I2CMASTER, %11000110, i2cfast, i2cbyte
sertxd("Power on",13,10)
'first byte: CTSi disabled,GPO2 disabled, boot normally, use XO, FM rec
'sec byte: opmode = analog audio outputs
hi2cout 0x01,(%00010000,%00000101)
pause 1000
sertxd("GetRev:")
hi2cin 0x10,(b1,b2,b3,b4,b5,b6,b7,b8)
sertxd("1:",#b1,"2:",#b2,"3:",#b3,"4:",#b4,"5:",#b5,"6:",#b6,"7:",#b7,"8:",#b8,13,10)
When I try to get the chip revision info, all I get is 255 for each value.
I just had a thought. If I don't tell it to receive all 15 response bytes, would I get the '255' value for the first eight?
Should I change the GetRev command to receive all 15 even I only want to see what the first eight are?
Code:
sertxd("GetRev:")
hi2cin 0x10,(b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15)
sertxd("1:",#b1,"2:",#b2,"3:",#b3,"4:",#b4,"5:",#b5,"6:",#b6,"7:",#b7,"8:",#b8,13,10)
BTW, I have an RTC and EEPROM on the same PCB that the PICAXE 20X2 is on and can confirm I2C comms work fine with them, so I believe my wiring is all correct.
Thanks.