Shop OBEX P1 Docs P2 Docs Learn Events
I2C issues on bs2px — Parallax Forums

I2C issues on bs2px

rjeffgarciarjeffgarcia Posts: 2
edited 2008-10-26 01:07 in BASIC Stamp
I am having an issue with I2C on a BS2px. I've tried both 1K and 4.7K pullups, tried both P0/P1 and P8/P9 ports, and am running out of ideas. I was able to test the board with my Cypress I2C debugger and it communicates just fine using that. However when I go back to the stamp then suddenly there is an issue. If it matters, the I2C device is a Microchip temp sensor. Here is the code that I'm using:
' {$STAMP BS2px}
' {$PBASIC 2.5}

' first declare the variables
tempx VAR Byte(3)
tempx2 VAR Word

Reset:
PAUSE 100
I2COUT 0, $90, 1, [noparse][[/noparse]$70]
PAUSE 2000 ' allow the device a chance to get started

MainLoop:
tempx(0)=0
tempx(1)=0
I2CIN 0, $91, 0,[noparse][[/noparse]tempx(0), tempx(1)]
PAUSE 500
I2CIN 0, $91, 0,[noparse][[/noparse]tempx2.HIGHBYTE, tempx2.LOWBYTE]

DEBUG CR, "first temp byte=",HEX tempx(0), ", second temp byte=",HEX tempx(1), " , F=", HEX4 tempx2
PAUSE 1500
GOTO MainLoop

Any suggestions are appreciated.

Thanks in advance!

Comments

  • rjeffgarciarjeffgarcia Posts: 2
    edited 2008-10-15 20:48
    Here's an update to the problem. It looks like the issue is somehow related to solder not bonding well with wire wrap. Although it Ohm'd out OK before, somehow switching to a soldered solution where the wires were not wire wrap wires "fixed" it. If anyone knows why wire wrap wires don't bond well with solder please feel free to educate me smile.gif
  • Carl HayesCarl Hayes Posts: 841
    edited 2008-10-26 01:07
    Wire-wrap wires (some of them) have a corrosion-inhibitor coating. In wire-wrap equipment they are wrapped so tightly that the sharp edges on the wire-wrap pin breach the coating to form a good connection -- analogous to IDC connectors. It takes a little more heat to tin them adequately when soldering.
Sign In or Register to comment.