logo elektroda
logo elektroda
X
logo elektroda

[Solved] PCF8563 open drain interrupt - how to get a high state on the ESP32?

faber 717 7
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18399300
    faber
    Level 24  
    Tell me if it is possible to connect the interrupt (alarm function) of the PCF8563 to an ESP32 input accepting a high state ?
    The PCF8563 from what I have read only has "open drain" on the interrupt and I already have the input on the ESP32 set to wake up via a high state on the input.
    I can't really change this, can I use some transistor e.g. to have a high state there instead of "open drain" ?
  • ADVERTISEMENT
  • #2 18399433
    pawlik118
    Level 33  
    Yes, a simple NPN transistor
  • ADVERTISEMENT
  • #3 18399685
    faber
    Level 24  
    Ok, I'll check but I thought NPN required a power supply at the base.
  • ADVERTISEMENT
  • #4 18400063
    pawlik118
    Level 33  
    yes requires, e.g. a 10k resistor from the base to the + supply. Likewise, give a resistor from the collector to the + supply of the ESP.
  • ADVERTISEMENT
  • #5 18400097
    faber
    Level 24  
    pawlik118 wrote:
    this requires, for example, a 10k resistor from the base to the + supply. Likewise give a resistor from the collector to the + supply of the ESP.
    .
    ok, but I can't connect it like that because INT PCF8563 is open drain, or do I understand it wrong ?
    PCF8563 open drain interrupt - how to get a high state on the ESP32? .
  • Helpful post
    #6 18400191
    khoam
    Level 42  
    faber wrote:
    PCF8563 from what I've read only has "open drain" on the interrupt and I already have the input on the ESP32 set to wake up via a high state on the input.
    .
    That is, for example, you can connect a pull-down resistor (10k) to the ESP32 input and use a PNP transistor, which will be controlled from the open-drain output of the PCF8563:

    PCF8563 open drain interrupt - how to get a high state on the ESP32? .
  • #7 18400371
    pawlik118
    Level 33  
    Connect the PCF output from the ESP32, and add a resistor from the PCF output = ESP32 input to the + supply (10k). The resistor will then force 1 when the PCF output is in a high impedance state. You can do it like this, or like the diagram above. The difference is only in the inverting or not of the signal.
  • #8 18401036
    faber
    Level 24  
    Rigs, option with transistor (0 during operation, 1 interrupt) works.
    Thanks to

Topic summary

The discussion revolves around connecting the open-drain interrupt output of the PCF8563 real-time clock to an ESP32 input that requires a high state for wake-up. Users suggest using a transistor solution, specifically a PNP transistor, to convert the open-drain output to a high state. A pull-down resistor (10k) can be connected to the ESP32 input, and a resistor from the PCF output to the positive supply can ensure a high state when the PCF8563 output is in a high impedance state. This setup allows the ESP32 to recognize the interrupt signal correctly.
Summary generated by the language model.
ADVERTISEMENT