LobotomyKid
Member
Hi all,
I'm trying to get my MCP23017 working with a teensy.
I've hooked it up on a breadboard, the wire scanner finds it on 0x20, so I'm assuming all my wiring is correct.
I see posts here and there where people put 2 4.7kO resistors between scl > teensy 19 and sda > teensy 18 but that didn't do anything for me.
Also tried 3.3v and 5v.
I wrote a very simple blink sketch to test it out. I haven't connected an LED, I'm just measuring voltage at the ports.
It's always in a low range. First I tried just one port but I just put it all in a loop so I could test all the ports.
I had it working before, including a button and rotary encoder but now I can't even get this to work.
I tried another chip, same result (scanner finds it, ports do nothing)
Did I fry both chips?
Any ideas?
Thanks a lot!
I'm trying to get my MCP23017 working with a teensy.
I've hooked it up on a breadboard, the wire scanner finds it on 0x20, so I'm assuming all my wiring is correct.
I see posts here and there where people put 2 4.7kO resistors between scl > teensy 19 and sda > teensy 18 but that didn't do anything for me.
Also tried 3.3v and 5v.
I wrote a very simple blink sketch to test it out. I haven't connected an LED, I'm just measuring voltage at the ports.
It's always in a low range. First I tried just one port but I just put it all in a loop so I could test all the ports.
Code:
#include <Wire.h>
#include "Adafruit_MCP23017.h"
Adafruit_MCP23017 mcp;
int led = 13;
void setup() {
while(!Serial);
Serial.begin (9600);
Serial.println("Start:");
pinMode(led, OUTPUT);
mcp.begin(0x20);
for(int i = 0; i < 16; i++) {
mcp.pinMode(i, OUTPUT);
}
}
void loop() {
for(int i = 0; i < 16 i++) {
mcp.digitalWrite(i, HIGH);
}
digitalWrite(led, HIGH);
delay(1000);
for(int i = 0; i < 16; i++) {
mcp.digitalWrite(i, LOW);
}
digitalWrite(led, LOW);
delay(1000);
}
I had it working before, including a button and rotary encoder but now I can't even get this to work.
I tried another chip, same result (scanner finds it, ports do nothing)
Did I fry both chips?
Any ideas?
Thanks a lot!
Last edited by a moderator: