|
| 1 | +.. _adafruit_pcf8523: |
| 2 | + |
| 3 | +Adafruit PCF8523 Shield |
| 4 | +####################### |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +The `Adafruit PCF8523 Real Time Clock Shield`_ features |
| 10 | +an `NXP PCF8523 Real-Time clock`_ and two Qwiic connectors. |
| 11 | +It has a CR1220 3 Volt back-up coin-cell battery. |
| 12 | + |
| 13 | +.. figure:: adafruit_pcf8523.webp |
| 14 | + :align: center |
| 15 | + :alt: Adafruit PCF8523 Shield |
| 16 | + |
| 17 | + Adafruit PCF8523 Shield (Credit: Adafruit) |
| 18 | + |
| 19 | + |
| 20 | +Requirements |
| 21 | +************ |
| 22 | + |
| 23 | +This shield can be used with boards which provide an I2C connector, for |
| 24 | +example STEMMA QT or Qwiic connectors. |
| 25 | +The target board must define a ``zephyr_i2c`` node label. |
| 26 | +See :ref:`shields` for more details. |
| 27 | + |
| 28 | + |
| 29 | +Pin Assignments |
| 30 | +=============== |
| 31 | + |
| 32 | ++--------------+----------------------------------------------------------+ |
| 33 | +| Shield Pin | Function | |
| 34 | ++==============+==========================================================+ |
| 35 | +| SDA | PCF8523 I2C SDA. Also connected to the Qwiic connector. | |
| 36 | ++--------------+----------------------------------------------------------+ |
| 37 | +| SCL | PCF8523 I2C SCL. Also connected to the Qwiic connector. | |
| 38 | ++--------------+----------------------------------------------------------+ |
| 39 | +| SQW | PCF8523 INT/CLK interrupt output or square wave output | |
| 40 | ++--------------+----------------------------------------------------------+ |
| 41 | + |
| 42 | +To use the interrupt output from the PCF8523, you need to connect a wire from |
| 43 | +the shield SQW output to a suitable GPIO on your microcontroller board, and to |
| 44 | +modify the devicetree settings. See :dtcompatible:`nxp,pcf8523` for options. |
| 45 | + |
| 46 | + |
| 47 | +Programming |
| 48 | +*********** |
| 49 | + |
| 50 | +Set ``--shield adafruit_pcf8523`` when you invoke ``west build``. For example |
| 51 | +when running the :zephyr:code-sample:`rtc` sample: |
| 52 | + |
| 53 | +.. zephyr-app-commands:: |
| 54 | + :zephyr-app: samples/drivers/rtc |
| 55 | + :board: adafruit_qt_py_rp2040 |
| 56 | + :shield: adafruit_pcf8523 |
| 57 | + :goals: build |
| 58 | + |
| 59 | +.. _Adafruit PCF8523 Real Time Clock Shield: |
| 60 | + https://learn.adafruit.com/adafruit-pcf8523-real-time-clock |
| 61 | + |
| 62 | +.. _NXP PCF8523 Real-Time clock: |
| 63 | + https://www.nxp.com/products/analog-and-mixed-signal/real-time-clocks/100-na-real-time-clock-calendar-with-battery-backup:PCF8523 |
0 commit comments