{
    "ok": true,
    "data": {
        "title": "EP-0059",
        "rev_id": 10889,
        "updated_at": "2021-08-27T10:56:37+00:00",
        "chunk_count": 15,
        "chunks": [
            {
                "title": "EP-0059",
                "rev_id": 10889,
                "heading_path": "",
                "chunk_index": 0,
                "content": "# EP-0059\n\n<figure>\n<img src=\"Ds13072.png\" title=\"Ds13072.png\" width=\"500\" alt=\"Ds13072.png\" \/>\n<figcaption aria-hidden=\"true\">Ds13072.png<\/figcaption>\n<\/figure>",
                "char_count": 161,
                "token_estimate": 41
            },
            {
                "title": "EP-0059",
                "rev_id": 10889,
                "heading_path": "Description",
                "chunk_index": 1,
                "content": "The RTC module is specifically designed for Raspberry Pi. It communicated with Raspberry Pi through I2C bus. There is a Maxim DS1307 and CR1220 button cell on the board to keep the real time for a long time after the Raspberry Pi has it’s power off. In order to offering a convenient way to debug, there are five pin has been setup which are 5v, 3.3v, Rxd,Txd on board.\n\n------------------------------------------------------------------------",
                "char_count": 443,
                "token_estimate": 111
            },
            {
                "title": "EP-0059",
                "rev_id": 10889,
                "heading_path": "Compatibility List",
                "chunk_index": 2,
                "content": "-   Compatibility\n\n| Platform                    | DS1307 RTC Module | Notes |\n|-----------------------------|-------------------|-------|\n| Raspberry Pi 4 Model B      | √                 |       |\n| Raspberry Pi 3 Model B Plus | √                 |       |\n| Raspberry Pi zero           | √                 |       |\n| Raspberry Pi zero W         | √                 |       |\n| Raspberry Pi 3 Model B      | √                 |       |\n| Raspberry Pi 2 Model B      | √                 |       |\n| Raspberry Pi Model B+       | √                 |       |\n|                             |                   |       |",
                "char_count": 618,
                "token_estimate": 155
            },
            {
                "title": "EP-0059",
                "rev_id": 10889,
                "heading_path": "Feature",
                "chunk_index": 3,
                "content": "-   Use Maxim DS1307 chip\n-   Extends CR1220 button cell backup\n-   Can be operated with shell command\n-   Include a serial port connector\n-   Programmable square-wave output signal\n-   Consumes Less than 500nA in Battery-Backup Mode\n-   Automatic Power-Fail Detect and Switch Circuitry\n-   Programmable Square-Wave Output Signal\n\n------------------------------------------------------------------------",
                "char_count": 403,
                "token_estimate": 101
            },
            {
                "title": "EP-0059",
                "rev_id": 10889,
                "heading_path": "Parameters:",
                "chunk_index": 4,
                "content": "-   Accuracy ±20ppm from 0°C to +40°C\n-   Work voltage 5V\n-   Battery Backup Input for Continuous Time keeping\n-   Real-Time Clock Counts Seconds, Minutes, Hours, Day, Date, Month, and Year with Leap Year Compensation Valid Up to 2100\n-   Work temperature 0°C to +70°C\n-   Ports:\n    -   Raspberry Pi A+\/B+\/2 module 2X13 connection port\n    -   Raspberry Pi 3, Mode B, 1GB RAM 2x20 connection port\n    -   2\\*5pin 2.54mm connector\n\n------------------------------------------------------------------------",
                "char_count": 504,
                "token_estimate": 126
            },
            {
                "title": "EP-0059",
                "rev_id": 10889,
                "heading_path": "Packages",
                "chunk_index": 5,
                "content": "-   1 x RTC Module\n-   1x CR1220 Battery\n\n------------------------------------------------------------------------",
                "char_count": 114,
                "token_estimate": 29
            },
            {
                "title": "EP-0059",
                "rev_id": 10889,
                "heading_path": "Document",
                "chunk_index": 6,
                "content": "-   Mechanical Drawing:\n\n<img src=\"Ds1307.png\" title=\"Ds1307.png\" width=\"500\" alt=\"Ds1307.png\" \/>\n----",
                "char_count": 102,
                "token_estimate": 26
            },
            {
                "title": "EP-0059",
                "rev_id": 10889,
                "heading_path": "How to Connect:",
                "chunk_index": 7,
                "content": "-   -   1.Software Requirement:Base Raspbian Operating System\n    -   <img src=\"Ds13073.png\" title=\"fig:Ds13073.png\" width=\"500\" alt=\"Ds13073.png\" \/>\n\n\\*\\*2. Connection: Just insert the module into Raspberry Pi\n\n-   -   <img src=\"Ds13074.png\" title=\"fig:Ds13074.png\" width=\"500\" alt=\"Ds13074.png\" \/>\n\n\\*\\*3. USB-to-TTL cable wire connect to RTC\n\n-   -   <img src=\"Ds13075.png\" title=\"fig:Ds13075.png\" width=\"500\" alt=\"Ds13075.png\" \/>\n\n\\*\\*4. Finally '''\n\n    Note： RTC 5v pin connect to USB-to-TTL Red wire(5v)\n    RTC GND pin connect to USB-to-TTL black wire(GND)\n    RTC TX pin connect to USB-to-TTL Green wire(TX)\n    RTC RX pin connect to USB-to-TTL white wire(RX)\n\n'''\n\n------------------------------------------------------------------------",
                "char_count": 747,
                "token_estimate": 187
            },
            {
                "title": "EP-0059",
                "rev_id": 10889,
                "heading_path": "How to configure in terminal > Using Overlays",
                "chunk_index": 8,
                "content": "-   Overlays are loaded using the \"dtoverlay\" config.txt setting.\n\nAs an example,consider I2C Real Time Clock drivers. In the pre-DT world these would be loaded by writing a magic string comprising a device identifier and an I2C address to a special file in \/sys\/class\/i2c-adapter, having first loaded the driver for the I2C interface and the RTC device - something like this:\n\n        modprobe i2c-bcm2835\n        modprobe rtc-ds1307\n        echo ds1307 0x68 > \/sys\/class\/i2c-adapter\/i2c-1\/new_device\n\nWith DT enabled, this becomes a line in config.txt:\n\n        dtoverlay=i2c-rtc,ds1307\n\nThis causes the file \/boot\/overlays\/i2c-rtc.dtbo to be loaded and a \"node\" describing the DS1307 I2C device to be added to the Device Tree for the Pi. By default it usees address 0x68, but this can be modified with an additional DT parameter:\n\n        dtoverlay=i2c-rtc,ds1307,addr=0x68\n\nParameters usually have default values, although certain parameters are mandatory. See the list of overlays below for a description of the parameters and their defaults.",
                "char_count": 1047,
                "token_estimate": 262
            },
            {
                "title": "EP-0059",
                "rev_id": 10889,
                "heading_path": "How to configure in terminal > For Raspberry Pi 4B",
                "chunk_index": 9,
                "content": "Here we assume that you have already burned the Raspbian Image into TF card and connect to your PC and logged in. Open a terminal and modify \/boot\/config.txt file using what you favorate editor such as vim.tiny or nano, add parameters as following picture: <img src=\"DS1307-4B(1).png\" title=\"DS1307-4B(1).png\" width=\"500\" alt=\"DS1307-4B(1).png\" \/>\n**You can read \/boot\/overlay\/README and find this info to add support for ds1307 I2C Real Time Clock device.** <img src=\"DS1307-4B(2).png\" title=\"DS1307-4B(2).png\" width=\"500\" alt=\"DS1307-4B(2).png\" \/>\nplease ensure that \/boot\/config.txt file include two paramaters:\n\ndtoverlay=i2c-rtc,ds1307\n    dtparam=i2c_arm=on\n\nAfter that, please make sure you have disabled the \"fake hwclock\" which interferes with the 'real' hwclock\n\nsudo apt-get -y remove fake-hwclock\n    sudo update-rc.d -f fake-hwclock remove\n\nNow with the fake-hw clock off, you can start the original 'hardware clock' script.\nEdit the script file \/lib\/udev\/hwclock-set with nano or vim editor and comment out these three lines:\n\nif [ -e \/run\/systemd\/system ] ; then\n     exit 0\n    fi",
                "char_count": 1096,
                "token_estimate": 274
            },
            {
                "title": "EP-0059",
                "rev_id": 10889,
                "heading_path": "How to configure in terminal > For Raspberry Pi 4B",
                "chunk_index": 10,
                "content": "Finally result like this:\n<img src=\"DS1307-4B(6).png\" title=\"DS1307-4B(6).png\" width=\"500\" alt=\"DS1307-4B(6).png\" \/>\nsave and reboot your RPi.\n\n------------------------------------------------------------------------",
                "char_count": 216,
                "token_estimate": 54
            },
            {
                "title": "EP-0059",
                "rev_id": 10889,
                "heading_path": "How to configure in terminal > For Raspberry Pi 3B",
                "chunk_index": 11,
                "content": "Here we assume that you have already burned the Raspbian Image into TF card and connect to your PC and logged in. Open a terminal and modify \/boot\/config.txt file using what you favorate editor such as vim.tiny or nano, add parameters as following picture: <img src=\"Ds13076.png\" title=\"Ds13076.png\" width=\"500\" alt=\"Ds13076.png\" \/>\n**You can read \/boot\/overlay\/README and find this info to add support for ds1307 I2C Real Time Clock device.**\n\nName:   i2c-rtc\n    Info:   Adds support for a number of I2C Real Time Clock devices\n    Load:   dtoverlay=i2c-rtc,<param>=<val>\n    Params: ds1307                  Select the DS1307 device\n\nplease ensure that \/boot\/config.txt file include those three paramaters:\n\ndevice_tree=bcm2710-rpi-3-b.dtb\n    dtoverlay=i2c-rtc,ds1307\n    dtparam=i2c_arm=on\n\nAfter that, please make sure you have disabled the \"fake hwclock\" which interferes with the 'real' hwclock\n\nsudo apt-get -y remove fake-hwclock\n    sudo update-rc.d -f fake-hwclock remove\n\nNow with the fake-hw clock off, you can start the original 'hardware clock' script.\nEdit the script file \/lib\/udev\/hwclock-set with nano or vim editor and comment out these three lines:",
                "char_count": 1169,
                "token_estimate": 293
            },
            {
                "title": "EP-0059",
                "rev_id": 10889,
                "heading_path": "How to configure in terminal > For Raspberry Pi 3B",
                "chunk_index": 12,
                "content": "if [ -e \/run\/systemd\/system ] ; then\n     exit 0\n    fi\n\nFinally result like this:\n<img src=\"Raspberry_pi_hwclock-set.png\" title=\"Raspberry_pi_hwclock-set.png\" width=\"500\" alt=\"Raspberry_pi_hwclock-set.png\" \/>\nsave and reboot your RPi.\n\n------------------------------------------------------------------------",
                "char_count": 309,
                "token_estimate": 78
            },
            {
                "title": "EP-0059",
                "rev_id": 10889,
                "heading_path": "How to Check it",
                "chunk_index": 13,
                "content": "After reboot and log in, open a terminal and typing this command to check if RTC module is functional. **`dmesg |grep rtc`** if you can see this picture means that your RTC module is working properly. <img src=\"Ds13077.png\" title=\"Ds13077.png\" width=\"500\" alt=\"Ds13077.png\" \/>\nand then you can adjust your system clock as following command: <img src=\"Ds13078.png\" title=\"Ds13078.png\" width=\"500\" alt=\"Ds13078.png\" \/>\n'''\n\n    Note: 051014302016.20  is equal to mmDDHHMMYYYY.ss, more information please using  ‘man date’ command.\n    Last step, set the Hardware Clock to the current System Time.\n\n''' <img src=\"Ds13079.png\" title=\"Ds13079.png\" width=\"500\" alt=\"Ds13079.png\" \/>\nok, finished. Have fun.",
                "char_count": 699,
                "token_estimate": 175
            },
            {
                "title": "EP-0059",
                "rev_id": 10889,
                "heading_path": "FAQ",
                "chunk_index": 14,
                "content": "-   Question: Why does my RTC module running a wrong time when i reboot my Pi ?\n    -   Answer: Please do remember to disable the \"fake hwclock\" which interferes with the 'real' hwclock as following commands:\n\n<!-- -->\n\n    sudo apt-get -y remove fake-hwclock\n    sudo update-rc.d -f fake-hwclock remove\n\n------------------------------------------------------------------------",
                "char_count": 377,
                "token_estimate": 95
            }
        ]
    }
}