Reading the I2C data from this IC

SteveSFX

Well-known member
Your first step is the Wire library Scanner example. This will confirm the wiring is good and give you the address. You'll need that address for the next parts.

According to the datasheet, this chip needs 2 bytes of configuration. I believe you can use the master_writer example. It sends 6 bytes, so edit it to only send 2 bytes. Also edit to use the address you learned from Scanner. Take your best guess at the config from the datasheet info. Unless you understand every word of the datasheet, you'll probably end up doing some trial and error to find a config which suits your needs.

To read, you'll probably be able to use code from the master_reader example. As with writer, edit the code to only request 2 bytes and use the address from Scanner.
 
There seems to be a library out there for the MAX11609 part.
Perhaps it's helpful. But you will need to change the I2C address from 0x33 to 0X34 in file AllAboutEE_MAX11609.h .

Paul
 
Thanks Paul. I have ordered one and I will see how we go.

I am using this to read simple pots. Nothing exciting.
But do you think one of these would work for reading a TFT touchscreen? I have 4x analogue pins assigned to my 2.4" TFT screen and releasing those pins as well would be very handy.

If yes, I believe they also make an 8 channel version of this chip.

Something else to maybe try? My only thought is it might be laggy (with my rubbish coding!)
 
Seems like this chip should work for reading resistive touchscreen signals. But if you have an existing library that uses ordinary analogRead(), maybe that code is easy to modify, or maybe it's quite complicated and tough to change. How people design libraries can vary quite a lot.

I should mention the test fixtures that test every Teensy 4.0 and Teensy 4.1 have the 12 bit version of this ADC chip. Originally I used the option for the internal clock. Usually it worked, but sometimes it would give completely wrong results. Changing to using the I2C clock has been extremely reliable, using 400 kHz speed. I believe the text fixture PCB has 1K pullup resistors for SDA and SCL.
 
I will have a go at getting the pots to work, then attempt the TFT screen
Thanks again for the advice
 
Don't know what TFT and/or what touchscreen you might have, but rather than having to go down the "roll-your-own" path for the touch processing, you might consider adding a touchscreen overlay on your display which has a built-in controller (such as <this> one, which is the capacitive touchscreen attached to the RA8875 800x480 TFT touchscreen display that I use in many of my projects). With such a pre-made assembly, it might be much quicker to be able to use an existing library (in this case, the driver for the FT5206 touch controller IC) for your touchscreen processing.

Food for thought . . .

Mark J Culross
KD5RXT
 
Back
Top