PCF8574 Example…..


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237

    Default PCF8574 Example…..

    Hi… Thank you for reading.

    I am experimenting with some Texas PCF8574's and a pic (16f688). All is good.

    My questions;

    My outputs are all sinking…i.e. 0's. Is there a way of outputting 1's (Source) when true without using external transistor ?

    Although I have managed to read and write to and from the device…. can I split the 8 bits. 4 read and 4 write for example.

    Do I aways have to write a 1 to the inputs before a read.

    Thank you for reading and understanding.

    Andy

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,389


    Did you find this post helpful? Yes | No

    Default Re: PCF8574 Example…..

    Is there a way of outputting 1's (Source) when true without using external transistor ?
    according to my data sheet the Io source current is 300uA where the Io sink current is 25mA , is 300uA enough ? if not no

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: PCF8574 Example…..

    Why yes you do, The device reads the condition of the output pins, Therefore if you were to set all of the pins low, so as to be sinking current, the readback data would be 00000000. If you want to readback say 4 of the pins that are connected as inputs, you would always mask the output byte with the appropriate input pins set to true. say you want the upper 4 bits to be used as inputs and the lower 4 to be used as outputs, you would always send the output byte masked with 1111 in the upper bit positions by ORING it with %11110000 just before sending it to the device. Then when reading the the device you would mask off the output bits by ANDING the returned byte with %11110000. I have used these I/O expanders for years and they word very well.
    Dave Purola,
    N8NTA
    EN82fn

  4. #4
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: PCF8574 Example…..

    Hi David

    I am a hardware engineer so talk simple to me... :-)
    Maybe an example would help me... If can get it to do what I want will move over to the 16Bit version 8 in 8 out.

    Also a radio ham G7IIF

    Thank you for help

    73 de Andy

Similar Threads

  1. Pic12f675 + Pcf8574 + Lcd
    By Bostjan in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 4th November 2016, 17:54
  2. troubles using more than one PCF8574
    By maus in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 28th July 2007, 19:37
  3. pcf8574
    By gabi mihai in forum PBP Wish List
    Replies: 2
    Last Post: - 15th March 2007, 20:10
  4. PCF8574 library - Proteus
    By pgsabel in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th May 2005, 09:09
  5. Pcf8574
    By larryt in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th December 2004, 21:24

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts