Shop Learn
mcp23008 Sourcing Voltage — Parallax Forums

mcp23008 Sourcing Voltage

paulleicesterpaulleicester Posts: 12
edited 2011-10-10 11:20 in General Discussion
Hey,

I do hope I have posted this in the right forum, if not apologies.

I have been playing around with the MCP23008. It seems absoloutly fine when it sinks. But its sourcing voltage apears to be very low.. around 0.5v. Does anyone have any suggestions on how i can pull this up to 3.3v. My tests consisted very simply of an LED and apropriate resistor.

My connections are as follows...

1. IO 0 of the Prop with Pullup (Might have been a pull down, not at home so cant remember)
2. IO 1 of the Prop with Pullup (Might have been a pull down, not at home so cant remember)
3. GND
4. GND
5. GND
6. +3.3
7.
8.
9. GND
10. LED --->|----/\/\/--- GND
11. LED --->|----/\/\/--- GND
12. LED --->|----/\/\/--- GND
13. LED --->|----/\/\/--- GND
14. LED --->|----/\/\/--- GND
15. LED --->|----/\/\/--- GND
16. LED --->|----/\/\/--- GND
17. LED --->|----/\/\/--- GND
18. +3.3v


Non of the LEDs light up, Yet if i reverse the LED and connect to +3.3 instead it is absoloutly fine and while I could use this as a sink, I would like my logic 1 to be 3.3v. Any ideas/suggestions?

Please note that the above example is just that and is not the full extent of this application, otherwise I would just use shift registers.

Many Thanks

Paul

Comments

  • LeonLeon Posts: 7,620
    edited 2011-10-10 04:47
    They should work, although the outputs are rather limited. The second app note (00972a.pdf) shows outputs driving LEDs connected to ground.
  • paulleicesterpaulleicester Posts: 12
    edited 2011-10-10 05:09
    Aye, I dont intend to be driving anything serious, But I worry that the logic levels are not going to be high enough to control logic on other IC's for example the 74HC595's Clock, data and latch (which I know can work as I have seen others do it)
  • paulleicesterpaulleicester Posts: 12
    edited 2011-10-10 05:14
    I guess its possible ive just wired it all up wrong :) Ill check things later just incase.
  • Clive WakehamClive Wakeham Posts: 152
    edited 2011-10-10 05:50
    This seems to an strange problem.

    According to the datasheet for MCP23008 it can source and sink 25mA each output pin.

    I wonder if your actually using a PCF8574 TI chip. These can only sink 25mA but only source 100uA...
    (I once used a different chip and was wondering why I could not get it to communicate. That is until I looked closely at the numbers on the top of the chip and realised I had a completely different chip with different wiring and I2C codes.....)
  • LeonLeon Posts: 7,620
    edited 2011-10-10 06:00
    25 mA is the maximum value. The outputs are actually very limited, as I mentioned.
  • paulleicesterpaulleicester Posts: 12
    edited 2011-10-10 06:23
    Yea, The current that can be sources/sunk is pretty low but I dont see that I will be needing any more than they can provide for the datalines and other things that this IC will be doing. Its more the voltage that Im worried about. I dont think that 0.5V will be recognised as a logical 1 on a lot of things. But alas I could be completly wrong. I think I need to check things over as to my circuitry incase Ive done something wrong or just plain silly.

    Cheers

    Paul
  • LeonLeon Posts: 7,620
    edited 2011-10-10 06:32
    Where do you get 0.5V as a logic high from? It's Vdd-0.6V IIRC.
  • paulleicesterpaulleicester Posts: 12
    edited 2011-10-10 06:58
    Yes, but thats my issue I am only getting 0.5v from a logic high on the 23008 instead of 2.7v which I what I would expect... there for I feel I am doing something completly wrong.
  • LeonLeon Posts: 7,620
    edited 2011-10-10 07:48
    It looks as though that is the case; I can't think of a reason for it, though. You could try the Microchip forum:

    http://www.microchip.com/forums

    There are likely to be more people there who are using the device. You could even raise a support ticket and talk to an engineer.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,001
    edited 2011-10-10 08:32
    My suspicions lie with software. Can you show us your Propeller code that writes to the chip to raise the output lines?

    -Phil
  • LeonLeon Posts: 7,620
    edited 2011-10-10 08:35
    It does look like they are in a low state, with only 0.5V on them.
  • Mark_TMark_T Posts: 1,981
    edited 2011-10-10 08:53
    The chip has internal pull-up resistors - perhaps its not driving the pins in output mode and you only see the pull-ups?

    From my reading of the datasheet you shouldn't expect it to source more 3mA when running at 5V supply, presumably a lot less at 3V3, something like 750uA is a good conservative guess.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,001
    edited 2011-10-10 08:59
    Mark_T,

    Good point. Looking at the DC Characteristics, there's no way that thing's gonna source enough current to drive an LED to maximum brightness.

    -Phil
  • paulleicesterpaulleicester Posts: 12
    edited 2011-10-10 11:20
    Well, apologies.. I was being totaly and utterly stupid.. I downloaded the i2c stuff from the object exchange and was using the MCP23016 Lib, which of course has different register addresses.... I was not setting a pin high, i was changing it to an input... how stupid of me!

    Maybe to make up for my stupidity I should write a driver specificly for this IC :)
Sign In or Register to comment.