4

Anyone have any tips to help troubleshoot turning a simple LED on connected through the MCP23017?

  • I've installed i2c-tools, and smbus.
  • Nothing in my blacklist.conf
  • Added i2c-dev to /etc/modules.
  • Wired up the same as this tutorial which is the same as Adafruits
  • Shows at 20 using i2cdetect -y 1
  • 99.9% sure the wiring is correct. (all done on a breadboard, so no solder to go wrong)
  • have tried 2 different chips, very doubtful its the chip itself

I've tried Adafruit's python scripts/libraries which run but nothing happens. Also have tried the following:

i2cset -y 1 0x20 0x00 0x80
i2cset -y 1 0x20 0x14 0x01

Nothing I do can get the light to turn on. I dont know a lot of whats happening with i2cset, is there a place I can look to see if its actually writing? After entering the command theres no feedback, just next line. Image of wiring, hopefully you can see what you need from it. The chip on the right isn't wired up. enter image description here

  • The fact that it appears on the bus is 99% of the battle. I suspect your connections. Could you post a photo? Are you powering from 3V3 or 5V? My piscope will let you view the bus activity. – joan Dec 17 '14 at 22:42
  • 3v. I'll work on a photo – KHibma Dec 17 '14 at 23:09
2

Have a quick look through breadboards.

The problem appears to be having the LEDs leads and resistor all connected in rank 23. All the 5 holes of each rank are connected together (but not to the same numbered rank on the other side of the board).

A solution is to move the non ground lead of the resistor and the cathode lead of the LED into rank 15 which is the only unused rank on your breadboard.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.