i want to design a pcb board in which i will have 60 output pins,
i have arduino nano and i want to use ic2 (SCL , SDA ..., 5v, GND) to connect to those chips and control 60 pins
so i saw on some forums 4 x MCP23017 =64 pins or 8 x PCF8574=64 pins
are there more chips (but to controll them i need to use as less as possible pins on arduino)
and which one do u suggest?
b707
January 20, 2023, 5:00pm
2
Are you sure the Nano has enough speed and memory to handle 60 outputs?
You can use PCA9685 and PCF8575 with 16 output each.
I've not used one, but I think a DS2408 might be useful here. It's advertised as a 1-wire 8 channel addressable switch and the datasheet says you can control 8 independent I/O port pins from a single port pin.
You can't get fewer than 1 pin.
can i use 4 PCF8575 x 16 so ill have 64 out.
how can i controll multiple PCF8575 do they have unique I2C address or how is working
LarryD
January 20, 2023, 6:30pm
7
The Data Sheet tells all.
dougp
January 20, 2023, 6:41pm
8
arpa123:
i have arduino nano and i want to use ic2 (SCL , SDA ..., 5v, GND) to connect to those chips and control 60 pins
What are all these pins driving?
b707
January 20, 2023, 6:44pm
9
It I2c addresses are configurable
You can use this library:
/*
* mxUnifiedPCF8574
*
* The mxUnifiedPCF8574 library supports both the PCF8574 8-bit I/O expander, as well as the similar PCF8575 16-bit I/O expander.
* The PCF8574 is the same as the PCF8574A, except for the address range.
*/
#include <mxUnifiedPCF8574.h>
mxUnifiedPCF8574 unio = mxUnifiedPCF8574(0x27); // use the PCF874 I2C output expander on address 0x27
//mxUnifiedPCF8574 unio = mxUnifiedPCF8574(0x27, 2, 0); // on ESP8266 you can also use software I2C. the ESP-01 has only 4 pins available. If you don't use serial, you can use 1 (TX) and 3 (RX)
//mxUnifiedPCF8575 unio = mxUnifiedPCF8575(0x20); // use the PCF875 I2C output expander on address 0x20
//mxUnifiedPCF8575 unio = mxUnifiedPCF8575(0x20, 2, 0); // on ESP8266 you can also use software I2C, e.g. SDA=2, SDA=0. the ESP-01 has only 4 pins available. If you don't use serial, you can use 1 (TX) and 3 (RX)
// Please note that the pins on the PCF8574/PCF8575 are intended to be used for data.
// They cannot deliver much current. When connecting LEDs to the pins, they
// may not light up very brightly.
// The LCD backpack module has for that specific reason a transistor to drive
// the LCD backlight LEDs. See the pinout of the module below
This file has been truncated. show original
Keep in mind that the maximum current for each pin is 20 mA.
If you are going to control relays with LOW input I recommend to connect the relays to 2 ULN2803 and control the ULN with PCF.
system
Closed
July 19, 2023, 6:55pm
11
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.