Sunday, August 4, 2013

The Mask is Off By One

A common software mistake, off by one errors happen occasionally. Indexing starting at 0 instead of one, you got ten things, so the last on is 9, not 10. What about hardware, you go pins, and they are numbered, or sometimes labeled. Dang it, wouldn't you know it, the labels on the board were off by one.

If you look at those labels, you can see the ground and 3.3V labels and that is where I am connected. Trouble is, if you look on the board this shield plugs into, the labels are off by one.

Starting with the pin labeled 5.0V on the shield, that is connected to RESET on the MEGA128 board that I am using. The next pin, is labeled  3.3V, but the traces in front of it are connected to the 5V. The next pin, labeled GND but the trace in front of it is really 3.3V. See these two pictures.

I believe I may have cooked my chip. All I could get out of the code was a 0. Over and over again. I should check the other writing to make sure I am connected to the proper pins. 


I have a spare MAX31855, so I am not totally dead in the water yet. I want to connect it to the right voltage, incase it does a shutdown on over voltage, and not leak smoke only. (I never saw any smoke).

Unsoldering the chip may be possible as well.

I really am trying, I just kept fiddling with the software, until tonight when I checked the voltage. (trust me the software is monkey see monkey do. I am using the SPI library included with the Arduino code.

I am an idiot. The 50, 51, 52 ... pins at the end start with 2 ground pins. I didn't count. So it is completely wired wrong. I need to take another whack at that part before I get around to calling my chip bad.

I am blaming it on being out of hardware practice. Can you take 5 years off from something and pick it up in a weekend.

Ever be so dumb yourself?

I re-did the connections. I am, using the ICSP header for both the SCLK and MISO. I've got it connected to 3.3V and it seems to be outputting data. 0 with nothing connected and some random data when the thermocouple is connected.

I've found the Adafruit libraries for the MAX31855, and want to try them, but am out of time for tonight. I'll get to looking at them another evening when I have more time. 

No comments:

Post a Comment