I have done a few successful PICAXE projects, although my programming skills are not particularly good.
I am now wanting to do an i2c project for work. So far, everything is looking good, except for getting the i2c driven 12 bit ADC working. I have bought a Linear Technology LTC2305 demo board, to simplify construction with small SMD devices. (I only want one copy of this project.)
I am using a 28X1 on my own (soldered) proto board. I have used it in the past, and it works fine. For this project, I have the 2x16 LCD module working from this proto board. I have 4k7 resistors on the board as the pull-up resistors for SCA and SDA lines. There will be only one i2c device on the bus.
I now have a scope at home and I cannot see any activity on the SCL and SDA lines. SCL remains hi, and SDA is lo.
I have questions about how the LTC2305 should be addressed- but first I would like to see some (any!) activity on the SCL and/or SDA lines. At this stage, I am suspecting that I am not setting up the i2c bus properly.
I am confused between what seems to be two sets of i2c commands: i2c slave, i2cwrite, i2cread, and a larger set of hi2cin; hi2cout and the hi2csetup- master and slave. What is the differences functionally?
Here is the simple code I have been trying:
start:
i2cslave %1101011, i2cslow, i2cbyte
writei2c %1101011,(%1000100)
pause 10
readi2c %1101011, (w0, w1)
pause 1000
goto start
end
%1000100 is for configuring the ADC- unipolar, channel 0 etc.
1101011 is the generic address for the LTC2305 mentioned in the datasheet.
The LTC2305 has two address pins, giving 8 possible states. (Pins can be hi, lo or floating.) An earlier part of the datasheet gives a table of addresses using just these pins. These pins are both jumpered lo, and the corresponding address in this table is 0001000. Replacing 1101011 with 0001000 makes no difference.
Any comments, suggestions etc. would be most welcome.
Thank you
I am now wanting to do an i2c project for work. So far, everything is looking good, except for getting the i2c driven 12 bit ADC working. I have bought a Linear Technology LTC2305 demo board, to simplify construction with small SMD devices. (I only want one copy of this project.)
I am using a 28X1 on my own (soldered) proto board. I have used it in the past, and it works fine. For this project, I have the 2x16 LCD module working from this proto board. I have 4k7 resistors on the board as the pull-up resistors for SCA and SDA lines. There will be only one i2c device on the bus.
I now have a scope at home and I cannot see any activity on the SCL and SDA lines. SCL remains hi, and SDA is lo.
I have questions about how the LTC2305 should be addressed- but first I would like to see some (any!) activity on the SCL and/or SDA lines. At this stage, I am suspecting that I am not setting up the i2c bus properly.
I am confused between what seems to be two sets of i2c commands: i2c slave, i2cwrite, i2cread, and a larger set of hi2cin; hi2cout and the hi2csetup- master and slave. What is the differences functionally?
Here is the simple code I have been trying:
start:
i2cslave %1101011, i2cslow, i2cbyte
writei2c %1101011,(%1000100)
pause 10
readi2c %1101011, (w0, w1)
pause 1000
goto start
end
%1000100 is for configuring the ADC- unipolar, channel 0 etc.
1101011 is the generic address for the LTC2305 mentioned in the datasheet.
The LTC2305 has two address pins, giving 8 possible states. (Pins can be hi, lo or floating.) An earlier part of the datasheet gives a table of addresses using just these pins. These pins are both jumpered lo, and the corresponding address in this table is 0001000. Replacing 1101011 with 0001000 makes no difference.
Any comments, suggestions etc. would be most welcome.
Thank you