Post your best Lua script examples here

User avatar
By trackerj
#50025 Step-by-step Tutorial for programming the new ESP8266 PCF8575 - 16 Bit I/O Port Expander Board.

Part 1: Initalisation and Writing data on the 16Bit I/O Port.



Related Article : http://www.esp8266-projects.com/2016/06/p1-pcf8575-remote-16-bit-io-expander.html
User avatar
By trackerj
User avatar
By piersfinlayson
#55848 I didn't notice you say in the video - but this is presumably the NXP version, as opposed to the TI (you say so in your HTML article I know the addresses differ for the PCF9574 between NXP and TI but think they're pretty similar otherwise. (I'm au fait with the TI but not the NXP.)

Also worth flagging somewhere prominent that this chip only sources tiny amounts of current - certainly the 20mA capacity in the data sheet is for sinking current. (Looks to be 300uA source capacity on the NXP.)
User avatar
By trackerj
#55857
piersfinlayson wrote:I didn't notice you say in the video - but this is presumably the NXP version, as opposed to the TI (you say so in your HTML article I know the addresses differ for the PCF9574 between NXP and TI but think they're pretty similar otherwise. (I'm au fait with the TI but not the NXP.)

Also worth flagging somewhere prominent that this chip only sources tiny amounts of current - certainly the 20mA capacity in the data sheet is for sinking current. (Looks to be 300uA source capacity on the NXP.)


In the related article from above is provided the proper Datasheet link directly from NXP. So yes, it is NXP one. Basically they are the same thing.

All the PCF8574/5 series are using the same topology, they have 8 or 16 quasi-bidirectional ports.
So yes, they both can sink upto 25mA per port but cannot source the same. I explained in detail how is working a quasi-bidirectional port (you can see it as a fancy-named open-collector one if you want) and how to use it, in a previous related article and also explained how to use such a port also for data input in the 4x4 Keyboard Matrix driver example one.