PCF8574N inverted outputs? - General Discussion - Netduino Forums
   
Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

PCF8574N inverted outputs?


  • Please log in to reply
5 replies to this topic

#1 Imi3est

Imi3est

    New Member

  • Members
  • Pip
  • 4 posts

Posted 18 October 2012 - 08:20 PM

Hi! I have a netduino plus which is connected to a PCF8574N via i2c. I am driving leds with the IC but I dont understand the output levels. When I Send out 0xFF the leds are on. When I send out 0x00 they are off. But my leds are connected to 5V in the following way: +5V------+LED-------330Rresistor------P8574output pin I checked the documentetion of 8574 and "as I understand it" it sets its output to 5V when I send out a true Value. So the leds should turn on if I send out 0x00 (GND). Where is the mistake?

#2 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 19 October 2012 - 03:43 AM

Hello. I'd check both the wiring and the program again. I think the mistake should be somewhere. Cheers
Biggest fault of Netduino? It runs by electricity.

#3 Nobby

Nobby

    Advanced Member

  • Members
  • PipPipPip
  • 70 posts

Posted 19 October 2012 - 06:55 AM

You haven't made a mistake but have accidentally hooked it up the right way :) http://www.datasheet...o1rgkyk7ucy.pdf is the datasheet for the IC. If you go to page three you can see the circuit diagram for the output pins and the driver logic. There's two MOSFETs driving the output and they call that a totem-pole driver. With the way you've hooked it up, current flows from the 5V rail, down through the LED and resistor and then into the IC pin. The totem pole has bi-directional current flow capabilities and the current flows into the IC when the bottom MOSFET is switched on. Current flows through the MOSFET and then into GND(ground). The I/O register has an inverter which turns the MOSFET on when it's logic level is zero so that your software logic matches up with the circuit configuration. This is usually how you drive LEDs and 7 segment displays and the ICs are commonly refered to as the "sinks". Of course, you can hook it up so that current flows out of the IC, through the LED -> resistor -> GND by simply changing your circuit configuration. The switching logic levels will be opposite to how you have them already though.

#4 Dr Who

Dr Who

    Advanced Member

  • Members
  • PipPipPip
  • 261 posts
  • LocationNYC

Posted 22 October 2012 - 05:43 PM

Hi!

I have a netduino plus which is connected to a PCF8574N via i2c. I am driving leds with the IC but I dont understand the output levels. When I Send out 0xFF the leds are on. When I send out 0x00 they are off. But my leds are connected to 5V in the following way:
+5V------+LED-------330Rresistor------P8574output pin

I checked the documentetion of 8574 and "as I understand it" it sets its output to 5V when I send out a true Value.
So the leds should turn on if I send out 0x00 (GND).

Where is the mistake?


Hello!
No mistake here. As I understand this part, it is working as advertised. But why that part number as opposed to the PCF8574A?

However are we talking about original Phillips/NXP parts here? Or second-source ones from TI?

Also please present your code, and if possible a schematic drawing.

Doctor Who
"This signature does not exist!"

#5 Imi3est

Imi3est

    New Member

  • Members
  • Pip
  • 4 posts

Posted 23 October 2012 - 05:10 PM

Hi! Thanks for the anwers. I talked with "Noom" user on the chat and he gave me an I2C library for handling pcf8574. The leds works fine with it so my program was bad. The wires were good as Nobby said. Unfortunately my previous code lost (corrupt file) so I don't know what was the mistake. Now it works fine.(except interrupt handling) Thanks again!

#6 neslekkim

neslekkim

    Advanced Member

  • Members
  • PipPipPip
  • 350 posts
  • LocationOslo, Norway

Posted 23 October 2012 - 06:14 PM

there is a litle bit differences between those two, the adresses: Datasheet for the N : http://www.ti.com/li...ink/pcf8574.pdf and the A: http://www.ti.com/li...nk/pcf8574a.pdf based on dates for the datasheets, it seems like the N is newer than the A..

--
Asbjørn





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.