I2C 16bit ADC expansion for WC8

I have done that, changing to single read on aip0 is 0xc1.  it produces the same result for me, with 8ms, or 2ms; I have tried up to 15ms.  something isn't right, there must be some reason that adding any delay at all causes the value to sometimes temporarily read zero.  without the delay it is fixed on 65335.

perhaps wiring or layout on the protoboard?  the bus pair from the board to the wc8 is only about 8", and I have the 0.1uf cap on the power.  my wc8 guide isn't entirely clear if the bus pullups are really on the board. I see some smd resistors next to the pin header.  I've also tried adding a pair of 10k, with no change in results

I still lack a few parts to get the wc32 mounted in its enclosure.  once they are here, I will fire it up with the same protoboard and see if things are any different
 
I2C bus pull up is on board.  We tested on hw rec 2.3.8 with other I2C devices we had tested before manufacture. I2C and SPI bus both working fine with known tested devices.
It must be some sequence.  Once we received the module, we will test and find out.
 
klaatu said:
ok, on standby here, sorta.  this has been on 2.2.2 board so far, 2.3.8 boards aren't here yet.
 
The pullups definately are there on 2.2.2 hardware revision too.
 
klaatu,
 
we still have not received the module yet.   just wonder do you have ADDR connected to ground on your module?
 
yep
 
klaatu said:
As far as the address, both cai support and the datasheet say that grounding the addr pin will make it 0x48, and that's where I started.  hex 48 is 1001000, adding the low zer0 bit for the write makes it 10010000 = 0x90
 
been away a few days, you still don't have the ADC, I'm still lacking some terminals strips and other hardware to get the wc32 enclosure mounted on the panel, and a few slow things from China, so nothing wired yet there, probably not until mid week ... heading back into the wild for awhile

thanks Ross, for confirming the pullups
 
 
Still no ADC there at cainetworks?  Been over five weeks now, that's some pretty slow economy shipping.  would you like me to send you one of mine?
 
We still have not received it yet. We have placed two orders from two different sellers. It must be on a slow boat from kinbarto.  One seller saying item should be here from July 30 through Sept 3. Another one says that item would be here from tomorrow till end of month. Give it couple more days,
 
During waiting, we have made few changes to the 2.2.2 board firmware to support DS1307 RTC from inside firmware.  It is being tested by couple users.  If your logic has time dependence, this will help when internet lost, it can still work pretty accurate.
 
I was reading the post about that chip.  it might have a use for a timed logic thing I have been considering.

but first I need to see this chip work, &/or one or more of a few others.  I have an i2c eeprom, and an i2c ram is nearly here.  I also have a few i2c16 bit bidirectional i/o.

but the wc32 remains unwired, as I attend to other duties as required.  all the parts are here, except a few screws and bolts, and laid out on a panel ready for a wiring session.  a lot more than just the wc32... terminal strips and cat5 boxes for the sensors, a relay box, kwh meter and breaker, a bank of outlets, etc.  six feet long to hold it all.  it's going to be done all at once and the block of time for it hasn't visited just yet
 
We just got the module.  Test with this PLC code with 2.2.2 board and 3.02.20 firmware
I can see the analog input is up and down changing.  Since analog inputs are floating, so that is probably correct reading
Code:
START    
	I2CWRITE 1 0 144 
	I2CWRITE 0 0 1 
	I2CWRITE 0 0 192 
	I2CWRITE 0 1 131 
	I2CWRITE 1 0 144 
	I2CWRITE 0 1 0 
	I2CWRITE 1 0 145 
	I2CREAD 0 0 VAR1 
	I2CREAD 0 1 VAR2 
END
 
On hw rev 2.2.2 board, the first pin on 8 pins jumper, near the 5 pin jumper, that is SCL, next one  is SDA.
Please also notice, this ADS1115 module has its pin out in different orders than most other I2C modules.
 
The above code only reads channel 0.  However, it seems when have channel 0 pin connected to ground, it will read 65536. When connects to 5V, it reads a smaller number.  In addition, the floating channel 1, 2, 3 seemingly have influence of the reading from channel 0.
 
Also, this is a 12 bit ADC, and reading back is 16 bit, so that it will need to shift down 4 bits using shift PLC commands
 
CAI_Support said:
Test with this PLC code with 2.2.2 board and 3.02.20 firmware
lol

I have 2.2.2 w/ v03.02.18b5, please note the rather long diatribe earlier about this.  I can't flash up to 3.02.20 yet, and I certainly won't until I get an md5 or sha1 hash from you for the firmware file you linked

This is the same code I am using, with it set to continuous=192 instead of singleread=193.  Actually I had tried both, but last you had suggested single.   Same thing on my board, FFFF.  And the pins are clearly labeled in both the wc user guide and on the ADC board.

I will try to squeeze in some time to try it on the wc32, but it won't be too soon yet, too much else still going on
 
CAI_Support said:
seems when have channel 0 pin connected to ground, it will read 65536. When connects to 5V, it reads a smaller number.  In addition, the floating channel 1, 2, 3 seemingly have influence of the reading from channel 0.
This sounds like things not being as good as they could be

I currently have my a0 in a voltage divider between a10K at 5v & a 2.2K at gnd, measures about 1.1v with the meter.  65535 in the wc8.  I've also tried w/ a1 at 5v, a2 at gnd, and a3 floating, they all read the same FFFF
 
Back
Top