GPIO-1 and GPIO-3. Can I use them?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
onlize
Normal user
Posts: 44
Joined: 12 Aug 2017, 03:44

Re: GPIO-1 and GPIO-3. Can I use them?

#11 Post by onlize » 22 Mar 2018, 16:39

Great, thank you very much. I will try it when I receive this device.

onlize
Normal user
Posts: 44
Joined: 12 Aug 2017, 03:44

Re: GPIO-1 and GPIO-3. Can I use them?

#12 Post by onlize » 22 Mar 2018, 23:58

Shardan wrote: 22 Mar 2018, 16:33 The input port number depends on the address you've chosen with A0...A2. If you have set A0-A3 to "0" or "Off", this is chip address 0,
so input pins for the setup in ESPEasy are pins 1 ... 8 (so called "Port Range")
If you set for example A0 = 0, A1 = 1 and A2 = 0 you selected the chip address 2. Port range will be 17 ... 24 then.
Does it mean that example has a mistake? They have Port 1 and IDX/Var is 22, but in your explanation IDX/Var 22 (17-24) would be with the port 2, not port 1. Am I correct? Or maybe I do not understand it.

Thank you.

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: GPIO-1 and GPIO-3. Can I use them?

#13 Post by toffel969 » 23 Mar 2018, 13:43

onlize wrote: 22 Mar 2018, 23:58
Shardan wrote: 22 Mar 2018, 16:33 The input port number depends on the address you've chosen with A0...A2. If you have set A0-A3 to "0" or "Off", this is chip address 0,
so input pins for the setup in ESPEasy are pins 1 ... 8 (so called "Port Range")
If you set for example A0 = 0, A1 = 1 and A2 = 0 you selected the chip address 2. Port range will be 17 ... 24 then.
Does it mean that example has a mistake? They have Port 1 and IDX/Var is 22, but in your explanation IDX/Var 22 (17-24) would be with the port 2, not port 1. Am I correct? Or maybe I do not understand it.

Thank you.
Port number and IDX are not related.

In the example in the wiki:

The 3 adress bits (A0-A2) of the PCF chip are all set to 0.
This means the chip will have the I2C-Adress 0x20 and the port range is 1-7.

If the adress bits were set to 1 0 0 the adress of the chip changes to 0x21 with the port range 8-15.

This way, up to 8 chips can be daisy chained.

The IDX is the unique identifier for Domoticz. It has nothing to do with the adress/port of the PCF.
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

onlize
Normal user
Posts: 44
Joined: 12 Aug 2017, 03:44

Re: GPIO-1 and GPIO-3. Can I use them?

#14 Post by onlize » 23 Mar 2018, 14:29

Got it. That IDX value confused me. Thank you for explaining.

Post Reply

Who is online

Users browsing this forum: No registered users and 131 guests