i2c on PRO

Questions on control of serial busses
danlee58
Posts: 210
Joined: Thu Jan 17, 2013 2:29 am

Re: i2c on PRO

Post by danlee58 »

I have been able to get 0x08 from the I2C_STAT register after a START. I get 0xF8 after any other operation. I believe that the 2103 generates the ACK after the START, not the receiving part.

I am considering switching to a Super PRO, and using the 10 bit DAC. I can use the board space that the MAXIM MAX519 occupies for another function, and it will eliminate the need for the I2C operations. I was considering that for the next generation, but I wanted to do a Proof-of-Concept with the PRO.

I do have an Oscilloscope, but it's an older HP model, and takes a lot of bench space, but I think that I'll set it up today to look at those signals.

I have also been in touch with MAXIM about this. I'm waiting for a reply.



danlee58
Posts: 210
Joined: Thu Jan 17, 2013 2:29 am

Re: i2c on PRO

Post by danlee58 »

I tried to verify the signal levels today with a scope. I found that the Data & Clock lines do not drop below 2.0 Volts. The Clock only swings to 4.0 Volts. I removed the pull-ups, and the Data line drops to near ground, but the Clock line does not. The data line will trigger the scope, but I would need a Logic Analyzer to view the data. I need to disconnect the Clock line from the MAX519 pins to see if the clock is still between 2.0 & 4.0 volts.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: i2c on PRO

Post by basicchip »

Rather than a logic analyzer, just make your software loop on the i2c operation. With a WAIT(1) in the loop, so that it is easier to trigger on.

What are the PINSEL1 values for the controls of P17 and P18?

Are you sure of the value of the pull up resistor, the symptom you describe sounds like its value is very small like less than 100 ohms.

danlee58
Posts: 210
Joined: Thu Jan 17, 2013 2:29 am

Re: i2c on PRO

Post by danlee58 »

I disconnected the Pullups & disconnected the SDA & SCL lines from the MAX519. Then the Oscillation on the SCL line stopped. I was able to get a burst of data & clock from gound, instead of the 2 to 4 volt oscillation. I put it all back together again & I was actually able to set the output of the DAC, then it started Oscillating again.

I have PINSEL1 set to 0x014. The pullups measure about 2.15 K Ohms.

danlee58
Posts: 210
Joined: Thu Jan 17, 2013 2:29 am

Re: i2c on PRO

Post by danlee58 »

If I disconnect the 5 V power, then reconnect it the outputs of P17 & P18 go to VDD. If I push the reset, then P17 & P18 go to ground briefly, then jump to 1.7 Volts for SDA, & 2.5 Volts for SCL. SCL is Oscillating at that time.

I have pins P17 & P18 jumpered to IO12 & IO13 so they pass through the Header to the Shield. I have not set IO12 & IO13 in the code.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: i2c on PRO

Post by basicchip »

Without a schematic, all I can do is guess what is going on. If you are seeing an oscillation on an open drain output, that has to be caused by your pull up resistor or a wiring error to some other device. An open drain output can only pull down.

Assuming its the pull up that is driving it (the only thing that should be), then I'll bet you power supply is oscillating. So there is some issue in your 5v supply that you'll have to resolve.

danlee58
Posts: 210
Joined: Thu Jan 17, 2013 2:29 am

Re: i2c on PRO

Post by danlee58 »

I did have some power supply problems, but I was connected through J8. I changed back to my original connection through J4, and the oscillation stopped.

The problem seems to be with the Jumper from P17 to IO13. When I disconnect that connection the signal on P17 looks correct. I have no shield board in the circuit, only the jumpers.

I changed the connection from P17/IO13 to P17/IO9. I still have a problem. I need to make a direct connection from P17 & P18 to the MAX519 without going through the IO.

I think that pulling the IO to 5 Volts, even though it's Tri-State forward biases a diode.

basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: i2c on PRO

Post by basicchip »

There is no diode to forward bias on an open drain output, though there would be one if you connect to one of the other IOs that is push pull. Even in that case you can tie those lines to 5V through a resistor with no issues.

How are you powering the shield?

If you apply voltage to J4 then the 7805 at U1 will apply power to the shield through J1, so if you are applying power there as well, that is a conflict. The intention of U1 is to power the shield from an unregulated supply coming in on J4. If you have a regulated 5V source, then connect the 5V to the shield and allow that to power the PRO through J1.

Rather than playing 20 questions, how about posting some block diagrams?

danlee58
Posts: 210
Joined: Thu Jan 17, 2013 2:29 am

Re: i2c on PRO

Post by danlee58 »

Circuit.pdf
(589.97 KiB) Downloaded 965 times
this is the curcuit. It's simple, but I cannot get the LPC2103 and MAX 519 communicating.

I am going to drop back 10 and punt on this. I'll order a Super PRO, and use the 10 bit DAC. That will give me room for another ULN2103. I have some LEDs to drive. The NTE1434 is a Comparator in a SIP package.

This just reads some sensors, and sets some Solnoids, except for one device that is Current controlled. The Interrupt supplies timing for the operations.

Post Reply