Datasheet

Data Sheet ADE5166/ADE5169/ADE5566/ADE5569
Rev. D | Page 3 of 156
Writing to the Watchdog Timer SFR (WDCON, Address
0xC0) ............................................................................................. 99
Watchdog Timer Interrupt......................................................... 99
LCD Driver.................................................................................... 100
LCD Registers ........................................................................... 100
LCD Setup ................................................................................. 103
LCD Timing and Waveforms ................................................. 103
Blink Mode ................................................................................ 104
Scrolling Mode ......................................................................... 104
Display Element Control ......................................................... 104
Voltage Generation .................................................................. 105
LCD External Circuitry ........................................................... 105
LCD Function in PSM2 Mode ............................................... 106
Flash Memory ............................................................................... 107
Flash Memory Overview ......................................................... 107
Flash Memory Organization ................................................... 107
Using the Flash Memory ......................................................... 108
Protecting the Flash Memory ................................................. 111
In-Circuit Programming ......................................................... 113
Flash Memory Organization for the 32 kB Model ............... 114
Timers ............................................................................................ 115
Timer Registers ......................................................................... 115
Timer 0 and Timer 1 ................................................................ 117
Timer 2 ...................................................................................... 118
PLL ................................................................................................. 120
PLL Registers ............................................................................ 120
Real-Time Clock (RTC) .............................................................. 121
Access to RTC SFRs ................................................................. 121
Access to Internal RTC Registers ........................................... 121
RTC SFRs .................................................................................. 122
RTC Registers ........................................................................... 125
RTC Calendar ........................................................................... 126
RTC Interrupts ......................................................................... 127
RTC Crystal Compensation .................................................... 128
UART Serial Interface ................................................................... 129
UART SFRs ................................................................................ 129
UART Operation Modes .......................................................... 132
UART Baud Rate Generation .................................................. 133
UART Additional Features ...................................................... 135
UART2 Serial Interface................................................................. 136
UART2 SFRs .............................................................................. 136
UART2 Operation Modes ........................................................ 138
UART2 Baud Rate Generation ................................................ 138
UART2 Additional Features .................................................... 139
Serial Peripheral Interface (SPI) .................................................. 140
SPI Registers .............................................................................. 140
SPI Pins ....................................................................................... 143
SPI Master Operating Modes .................................................. 144
SPI Interrupt and Status Flags ................................................. 145
I
2
C-Compatible Interface ............................................................. 146
Serial Clock Generation ........................................................... 146
Slave Addresses .......................................................................... 146
I
2
C Registers ............................................................................... 146
Read and Write Operations ..................................................... 147
I
2
C Receive and Transmit FIFOs ............................................. 148
I/O Ports ......................................................................................... 149
Parallel I/O ................................................................................. 149
I/O Registers .............................................................................. 150
Port 0........................................................................................... 153
Port 1........................................................................................... 153
Port 2........................................................................................... 153
Determining the Version of the
ADE5166/ADE5169/ADE5566/ADE5569 ................................ 154
Outline Dimensions ...................................................................... 155
Ordering Guide ......................................................................... 155