i2c on 40X2 vs frequency

BUSHBANDIT

New Member
hi
i am seeking clarification on the i2c operation on the 40X2.
i currently am using the linear technology ltc4151 to read voltages and current on an x2 DIP package on the i2c bus while running at a chip clock speed of 32mHz.
i have had this PCB cct working previously with the x1 variey but at a chip clock speed was 16mHz

i am sending the following setup and read commands on the x2 running at a chip clock speed of 32mHz.

hi2csetup i2cmaster, i2cLoadAddress, i2cslow_32, i2cbyte
hi2cin 0,(b1,b0,b3,b2,b5,b4,b6,b7)

where
Symbol i2cLoadAddress= %11001111 'I2C address of the load (output) TLC4151

but recieve only zero's in the returned registers.
Having read some of the other posts on the forum on i2c i am a little confused by the following thread.

http://www.picaxeforum.co.uk/showthread.php?t=13506&highlight=i2c

Should this command work? or
is the i2c not capable of running at 100k under the 32mhz chip frequency?
or has the i2c command functioning changed ?

cheers
Greg
 

hippy

Ex-Staff (retired)
I don't have an answer at this time but you can try operating your 40X2 at an internal clock speed of 8MHz and seeing if that works. That will help determine if it's a speed realted issue or hardware issue.
 

Technical

Technical Support
Staff member
The 40X2 can only use a 7 bit number (the other thread is for 20X2 part only).

The slow_32 setting should work as long as the linear part can handle the bus speed, but try at slower frequencies (e.g. 8MHz first).
 
Top