|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
71m6543f/h and 71M6543G/gh energy meter ics data sheet a pril 2011 v 1. 2 ? 2008 ? 2011 teridian semiconductor corporation 1 a maxim integrated products brand general description the 71m6543f , 71m6543h , 71m6543 g , and 71M6543Gh are teridian?s 4 th - generation pol y phase metering system s - on - chips ( so c s) with a 5 mhz 8051 - compatib le mpu core, low - power real - time clock ( rtc ) with digital temperature compensation , f lash memory , and lcd driver. our single con verter technology ? with a 22- bit delta - sigma adc, seven analog inputs, digital metrology temperature compensation, precision vol tage reference , and a 32 - bit computation engine (ce) supports a wide range of metering applications with very few external components. the 71m6543f , 71m6543h , 71m6543 g and 71M6543Gh support optional interfaces to the 71m6xx 3 series of i solated s ensors that offer bom cost reduction, immunity to magnetic tamper , and enhanced reliability . the ics feature ultra - low - power operation in active and battery modes , 5kb shared ram , and 64kb (71m6543f, 71m6543h) or 128kb (71M6543G, 71M6543Gh) of f lash memory , which can be pro grammed with code and/or data during meter operation. high processing and sampling rates combined with differential inputs offer a powerful metering platform for commercial and industrial meters with up to class 0.2 accuracy (71m6543h , 71M6543Gh ) . a complete array of code development tools, demonstration code , and reference designs enable rapid development and certification of meters that meet all ansi and iec electricity metering standards worldwide. mpu rtc timers iadc0 vadc8 ( va) iadc 2 vadc9 (vb) xin xout rx tx tx rx com0...5 v3p3a v 3 p 3 sys vbat vbat_rtc iadc 4 vadc10 (vc) seg gnda gndd seg/dio dio ice c b a neutral load 8888.8888 pulses, dio ir amr power fault comparator modul- ator serial ports oscillator/ pll mux and adc lcd driver dio, pulses compute engine flash memory ram 32 khz regulator shunt current sensors power supply teridian 71m6543f/ 71m6543h/ 71M6543G/ 71M6543Gh temperature sensor vref iadc 6 battery pwr mode control wake-up neutral i 2 c or wire eeprom 9/17/2010 iadc1 iadc 3 iadc 5 iadc 7 rtc battery v3p3d battery monitor spi interface host lcd display resistor dividers pulse transformers 3x teridian 71m6xx3 note: this system is referenced to neutral 71m6xx3 71m6xx3 71m6xx3 } in* } ia } ib } ic *in = neutral current features ? 0.1% accuracy ov er 2000:1 current ran ge ? exceeds iec 62053/ansi c12.20 s tandards ? seven sensor inputs with neutral current measurement, differential mode selectab le for current inputs ? selectable g ain of 1 or 8 for o ne c urrent i nput to s upport s hunts ? high - s peed wh/varh p ulse o utputs with p rogrammable w idth ? 64kb flash, 5kb ram (71m6543f/h) ? 128kb flash, 5kb ram (71M6543G/gh) ? up to f our p ulse o utputs with p ulse c o unt ? four - q uadrant m etering , p hase s eque ncing ? digital t emperature c ompensation : me trology c ompensation accurate rtc for tou f unctions with a utomatic t emperature c ompensation for c rystal in a ll p ower m odes ? independent 32 - b it c ompute e ngine ? 4 6 - 64 hz l ine f requency r ange with the s ame c alibration ? p hase c ompensation ( 7 ) ? three b attery - b ackup m odes: brownout m ode lcd m ode sleep m ode ? wake - u p on p in e vents and wake - on - timer ? 1 a in sleep m ode ? flash security ? in - s ystem p rogram u pdate ? 8 - b it mpu (80515), u p to 5 m ips ? full - s peed mpu c lock in b rownout m ode ? lcd driver: 6 common s egment d rivers up to 56 s electable p ins ? up to 5 1 m ultifunction dio p ins ? hardware watchdog time r (wdt) ? i 2 c/m icrowire ? eeprom interface ? spi i nterface with flash program capabi lity ? two uarts for ir and amr ? ir led driver with m odulation ? industrial temperature range ? 100- pin lead - free lqfp p ackage 19 - 5375; rev 1.2; 4 /1 1 single converter technology is a registered trademark of maxim integrated products, inc. microwire is a trademark of national semiconductor corp.
71m6543f/h and 71M6543G/gh data sheet 2 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 table of contents 1 introduction ................................................................................................................................. 10 2 hardware description .................................................................................................................. 11 2.1 hardware overview ............................................................................................................... 11 2.2 analog front - end (afe) ........................................................................................................ 12 2.2.1 signal input pins ....................................................................................................... 13 2.2.2 input multiplexer ........................................................................................................ 14 2.2.3 de lay compensation ................................................................................................. 19 2.2.4 adc pre - amplifier ..................................................................................................... 20 2.2.5 a/d converter (adc) ................................................................................................. 20 2.2.6 fir filter ................................................................................................................... 20 2.2.7 voltage references ................................................................................................... 20 2.2.8 71 m6xx3 isolated sensor interface ............................................................................ 22 2.3 digital computation engine (ce) ........................................................................................... 25 2.3.1 ce program memory ................................................................................................. 25 2.3.2 ce data memory ....................................................................................................... 25 2.3.3 ce com munication with the mpu .............................................................................. 25 2.3.4 meter equations ........................................................................................................ 26 2.3.5 real - time monitor (rtm) .......................................................................................... 26 2.3.6 pulse generators ...................................................................................................... 26 2.3.7 ce functional overview ............................................................................................ 28 2. 4 80515 mpu core .................................................................................................................. 30 2.4.1 memory organization and addressing ....................................................................... 30 2.4.2 special function registers (sfrs) ............................................................................ 32 2.4.3 generic 80515 special function registers ................................................................ 33 2.4.4 instruction set ........................................................................................................... 35 2.4.5 80515 power reduction modes ................................................................................. 35 2.4.6 uarts ...................................................................................................................... 36 2.4.7 timers and counters ................................................................................................. 38 2.4.8 wd timer (software watchdog timer) ...................................................................... 40 2.4.9 interrupts ................................................................................................................... 40 2.5 on - chip resources ............................................................................................................... 47 2.5.1 physical memory ....................................................................................................... 47 2.5.2 oscillator ................................................................................................................... 49 2.5.3 pll and internal clocks ............................................................................................. 50 2. 5.4 real - time clock (rtc) ............................................................................................. 51 2.5.5 71m6543 temperature sensor .................................................................................. 55 2.5.6 71m6xx3 temperature sensor .................................................................................. 56 2.5.7 71m6543 battery monitor .......................................................................................... 57 2. 5.8 71m6xx3 vcc monitor .............................................................................................. 57 2.5.9 uart and optical interface ....................................................................................... 57 2.5.10 digital i/o and lcd segment drivers ......................................................................... 58 2.5.11 eeprom interface .................................................................................................... 66 2.5.12 spi slave port ........................................................................................................... 68 2.5.13 hardware watchdog timer ........................................................................................ 72 2.5.14 test ports (tmuxout and tmux2out pins) ........................................................... 73 3 functional description ................................................................................................................ 75 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 3 3.1 theory of operation .............................................................................................................. 75 3.2 batt ery modes ....................................................................................................................... 75 3.2.1 brn mode ................................................................................................................ 78 3.2.2 lcd mode ................................................................................................................. 78 3.2.3 slp mode ................................................................................................................. 79 3.3 fault and reset behavior ...................................................................................................... 80 3.3. 1 events at power - down .............................................................................................. 80 3.3.2 ic behavior at low battery voltage ........................................................................... 81 3.3.3 reset sequence ........................................................................................................ 81 3.3.4 watchdog timer (wdt) reset ................................................................................... 81 3.4 wake - up behavior ................................................................................................................ 82 3.4.1 wake on hardware events ........................................................................................ 82 3.4.2 wake on timer .......................................................................................................... 84 3.5 data flow and mpu/ce communication ............................................................................... 84 4 application information ............................................................................................................... 86 4.1 connecting 5 v devices ........................................................................................................ 86 4.2 di rectly connected sensors .................................................................................................. 86 4.3 systems using 71m6xx3 isolated sensors and current shunts ............................................. 87 4.4 system using current transformers ..................................................................................... 88 4.5 metrology temperature compensation .................................................................................. 89 4.5.1 distinction between standard and high - precision parts ............................................ 89 4.5.2 temperature coefficients for the 71m6543f and 71M6543G ..................................... 90 4.5.3 temperature coefficients for the 71m6543h and 71M6543Gh .................................. 90 4.5.4 temperature coefficients for the 71m6xx3 ................................................................. 90 4.5.5 temperature compensation for vref and shunt se nsors ........................................ 90 4.5.6 temperature compensation of vref and current transformers ............................... 92 4.6 connecting i 2 c eeproms .................................................................................................... 94 4.7 connecting three - wire eeproms ....................................................................................... 94 4.8 uart0 (tx/rx) .................................................................................................................... 94 4.9 optical interface (uart1) ..................................................................................................... 94 4.10 connecting the reset pin ...................................................................................................... 95 4.11 connecting the emulator port pins ........................................................................................ 96 4.12 flash programming ............................................................................................................... 96 4.12.1 flash programming via the ice port .......................................................................... 96 4.12.2 flash programming via the spi port .......................................................................... 96 4.13 mpu demonstration code ..................................................................................................... 96 4.14 crystal oscillator ................................................................................................................... 97 4.15 meter calibration ................................................................................................................... 97 5 firmware interface ....................................................................................................................... 98 5.1 i/o ram map ? functional order ........................................................................................... 98 5.2 i/o ram map ? alphabetical order ..................................................................................... 104 5.3 reading the info page (71m6543h and 71M6543Gh only) .................................................. 118 5.4 ce interface description ..................................................................................................... 120 5.4.1 ce program ............................................................................................................ 120 5.4.2 ce data format ...................................................................................................... 120 5.4.3 cons tants ................................................................................................................ 120 5.4.4 environment ............................................................................................................ 121 5.4.5 ce calculations ....................................................................................................... 121 5.4.6 ce front - end data (raw data) ............................................................................... 122 5.4.7 ce status and control ............................................................................................. 123 71m6543f/h and 71M6543G/gh data sheet 4 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 5.4. 8 ce transfer variables ............................................................................................. 125 5.4.9 pulse generation ..................................................................................................... 127 5.4.10 ce calibration parameters ...................................................................................... 130 5.4.11 ce flow diagrams .................................................................................................. 131 6 71m654 3 specifications ............................................................................................................. 133 6.1 absolute maximum ratings ................................................................................................. 133 6.2 recommended external components ................................................................................. 134 6.3 recommended operating conditions .................................................................................. 134 6.4 performance specifications ................................................................................................. 135 6.4.1 input logic levels ................................................................................................... 135 6.4.2 output logic levels ................................................................................................. 135 6.4.3 battery monitor ........................................................................................................ 136 6.4.4 temp erature monitor ............................................................................................... 137 6.4.5 supply current ........................................................................................................ 138 6.4.6 v3p3d switch ......................................................................................................... 139 6.4.7 internal power fault comparators ........................................................................... 139 6.4.8 2.5 v voltage regulator ? system power ................................................................ 139 6.4.9 2.5 v voltage regulator ? battery power ................................................................. 140 6.4.10 crystal oscillator ..................................................................................................... 140 6.4.11 phase - locked loop (pll) ....................................................................................... 140 6.4.12 lcd drivers ............................................................................................................ 140 6.4.13 vlcd generator ...................................................................................................... 140 6.4.14 71m6543 vref ....................................................................................................... 143 6.4.15 adc converter ........................................................................................................ 144 6.4.16 pre - amplifier for iadc0- iadc1 ................................................................................ 145 6.5 timing specifications .......................................................................................................... 146 6.5.1 flash memory ......................................................................................................... 146 6.5.2 spi slave ................................................................................................................ 146 6.5.3 eeprom interface .................................................................................................. 146 6.5.4 reset pin .............................................................................................................. 147 6.5.5 real - time clock (rtc) ........................................................................................... 147 6.6 typical performance data ......................................................... error! bookmark not defined. 6.7 100- pin lqfp package outline drawing ............................................................................. 148 6.8 71m6543 pinout .................................................................................................................. 149 6.9 71m6543 pin descriptions ................................................................................................... 150 6. 9.1 71m6543 power and ground pins ........................................................................... 150 6.9.2 71m6543 analog pins ............................................................................................. 151 6.9.3 71m6543 digital pins ............................................................................................... 152 6.9.4 i/o equivalent circuits ............................................................................................. 154 7 ordering information ................................................................................................................. 155 7.1 71m6543 ordering guide .................................................................................................... 155 8 related information ................................................................................................................ 155 9 contact information ................................................................................................................ 155 appendix a : acronyms ..................................................................................................................... 156 appendix b: revision history ........................................................................................................... 157 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 5 figures figure 1: ic functional block diagram ..................................................................................................... 9 figure 2: afe block diagram (shunts: one - local, three- remotes) ...................................................... 12 figure 3. afe block diagram (four cts) ............................................................................................... 13 figure 4: states in a multiplexer frame ( mux_div[3:0] = 6) .................................................................. 17 figure 5: states in a multiplexer frame ( mux_div[3:0] = 7) .................................................................. 17 figure 6: general topology of a chopped amplifier ............................................................................... 21 figure 7: cross signal with chop_e = 00 ........................................................................................... 21 figure 8: rtm timing ............................................................................................................................ 26 figure 9. pu lse generator fifo timing ................................................................................................. 28 figure 10: samples from multiplexer cycle (frame) ............................................................................... 29 figure 11: accumulation interval ............................................................................................................ 29 figure 12: interrupt structure ................................................................................................................. 46 fi gure 13: automatic temperature compensation ................................................................................. 54 figure 14: optical interface .................................................................................................................... 58 figure 15: optical interface (uart1) ..................................................................................................... 58 figure 16: connecting an external load to dio pins ............................................................................. 60 figure 17: lcd waveforms ................................................................................................................... 65 figure 18: 3 - wire interface. write command, hiz=0. ............................................................................. 67 figure 19: 3 - wire interface. write command, hiz=1 .............................................................................. 68 figure 20: 3 - wire interface. read command. ........................................................................................ 68 figure 21: 3 - wire interface. write command when cnt=0 ................................................................... 68 figure 22: 3 - wire interface. write command when hiz=1 and wfr=1. ................................................. 68 figure 23: spi slave port - typical mult i - byte read and write operations .............................................. 70 figure 24: voltage, current, momentary and accumulated energy ......................................................... 75 figure 25: operation modes state diagram ........................................................................................... 76 figure 26: mpu/ce data flow ............................................................................................................... 85 figure 27: resistive voltage divider (voltage sensing) .......................................................................... 86 figure 28. ct with single - ended input connection (current sensing) .................................................... 86 figure 29: ct with differential input connection (current sensing) ........................................................ 86 figure 30: differential resistive shunt connections (current sensing) ................................................... 86 figure 31: system using three - remotes and one- local (neutral) sensor ............................................ 87 figure 32. system using current transformers ..................................................................................... 88 figure 33: i 2 c eeprom connection ...................................................................................................... 94 figure 34: connections for uart0 ........................................................................................................ 94 figure 35: connection for optical components ...................................................................................... 95 figure 36: external components for the reset pin: push - button (left), production circuit (right) ....... 96 figure 37: external components for the emulator interface ................................................................... 96 figure 38. trim fuse bit mapping ........................................................................................................ 118 figure 39: ce data flow: multiplexer and adc .................................................................................... 131 figure 40: ce data flow: scaling, gain control, intermediate variables for one phase ........................ 131 figure 41: ce data flow: squaring and summation stages ................................................................. 132 figure 42: wh error from 200 a to 0.1 a at 60 hz, 240 vac ...................... error! bookmark not defined. figure 43: varh error from 200 a to 0.1 a at 6 0 hz, 240 vac ................... error! bookmark not defined. figure 44: wh error from 200 a to 0.1 a at various frequencies (0 load angle, 240 vac) ............. error! bookmark not d efined. figure 45: 100 - pin lqfp package outline ........................................................................................... 148 figure 46: pinout for the lqfp - 100 package ....................................................................................... 149 figure 47: i/o equivalent circuits ......................................................................................................... 154 71m6543f/h and 71M6543G/gh data sheet 6 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 tables table 1. required ce code and settings for 1 - local / 3 - remotes ......................................................... 15 table 2. required ce code and settings for ct sensors ...................................................................... 16 table 3: multiplexer and adc configuration bits .................................................................................... 19 table 4. rcmd[4:0] bits ........................................................................................................................ 23 table 5: remote interface read commands ......................................................................................... 23 table 6: i/o ram control bits for isolated sensor .................................................................................. 24 table 7: inputs selected in multiplexer cycles ....................................................................................... 26 table 8: ckmpu clock frequencies ...................................................................................................... 30 table 9: memory map ............................................................................................................................ 31 table 10: internal data memory map ..................................................................................................... 32 table 11: special function register map ............................................................................................... 32 table 12: generic 80515 sfrs - location and reset values ................................................................. 33 table 13: psw bit functions (sfr 0xd0) ............................................................................................... 34 table 14: port registers (segdio0 -15) ................................................................................................ 35 table 15: stretch memory cycle width .................................................................................................. 35 table 16. 80515 pcon sfr register ( sfr 0x87 ) .................................................................................... 36 table 17: baud rate generation ............................................................................................................ 36 table 18: uart modes ......................................................................................................................... 37 table 19: the s0con (uart0) register (sfr 0x98) ............................................................................. 37 table 20: the s1con (uart1) register (sfr 0x9b) ............................................................................. 38 table 21: pcon register bit description ( sfr 0x87 ) .............................................................................. 38 table 22: timers/counters mode description ........................................................................................ 39 table 23: allowed timer/counter mode combinations ........................................................................... 39 table 24: tmod register bit descript ion (sfr 0x89) ............................................................................ 39 table 25: the tcon register bit functions (sfr 0x88) ........................................................................ 40 table 26: the ien0 bit functions (sfr 0xa8) ........................................................................................ 41 table 27: the ien1 bit functions (sfr 0xb8) ........................................................................................ 41 table 28: the ien2 bit functions (sfr 0x9a) ........................................................................................ 41 table 29: tcon bit functions (sfr 0x88) ............................................................................................. 41 table 30: the t2con b it functions (sfr 0xc8) .................................................................................... 42 table 31: the ircon bit functions (sfr 0xc0) .................................................................................... 42 table 32: external mpu interrupts ......................................................................................................... 42 table 33: interrupt enable and flag bits ................................................................................................ 43 table 34: interrupt priority level groups ................................................................................................ 43 table 35: interrupt priority levels .......................................................................................................... 44 table 36: interrupt priority registers ( ip0 and ip1 ) ................................................................................. 44 table 37: interrupt polling sequence ..................................................................................................... 45 table 38: interrupt vectors .................................................................................................................... 45 table 39: flash memory access ............................................................................................................ 47 table 40: bank switching with fl_bank[1:0] (sfr 0xb6[1:0]) in the 71M6543G/gh ............................... 48 table 41: flash security ........................................................................................................................ 49 table 42: clock system summary ......................................................................................................... 51 ta ble 43: rtc control registers ........................................................................................................... 52 table 44: i/o ram registers for rtc temperature compensation ........................................................ 53 table 45: nv ram table structure ............................................................ error! bookmark not defined. table 46: i/o ram registers for rtc interrupts .................................................................................... 55 table 47: i/o ram registers for temperature and battery measurement .............................................. 56 table 48: selectable resources using the dio_rn[2:0] bits ................................................................... 59 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 7 table 49: data/direction registers and internal resources for segdio0 to segdio15 ........................ 60 table 50: data/direction registers for segdio16 to segdio31 ........................................................... 61 table 51: data/direction registers for segdio32 to segdio45 ........................................................... 61 table 52: data/direction registers for segdio51 to segdio55 ........................................................... 61 table 53: lcd_vmode configurations .................................................................................................. 63 table 54: lcd configurations ................................................................................................................ 64 tabl e 55: lcd data registers for segdio46 to segdio55 .................................................................. 65 table 56: eectrl bits for 2 - pin interface ............................................................................................... 66 table 57: eectrl bits for the 3 - wire interface ....................................................................................... 67 table 58: spi transaction fields ........................................................................................................... 69 table 59: spi command sequences ..................................................................................................... 70 table 60: spi registers ......................................................................................................................... 70 table 61: tmux[4:0] selections ............................................................................................................ 73 ta ble 62: tmux2[4:0] selections ........................................................................................................... 74 table 63: available circuit functions ..................................................................................................... 77 table 64: vstat[2:0] (sfr 0xf9[2:0]) ................................................................................................... 80 table 65: wake enable and flag bits .................................................................................................... 82 table 66: wake bits .............................................................................................................................. 83 table 67: clear events for wake flags .................................................................................................. 84 table 68: gain_adjn compensation channels (figure 2, figure 31, table 1) ...................................... 91 table 69: gain_adjx compensation channels (figure 3, figure 32, table 2) ...................................... 93 table 70: i/o ram map ? functional order, basic configuration ........................................................... 98 table 71: i/o ram map ? fu nctional order ......................................................................................... 100 table 72: i/o ram map ? alphabetical order ...................................................................................... 104 table 73: info page trim fuses ........................................................................................................... 118 table 74: ce equ[2:0] equations and element input mapping ............................................................ 121 table 75: ce raw data access locations ........................................................................................... 122 table 76: cestatus register .............................................................................................................. 123 table 77: cestatus bit definitions ...................................................................................................... 123 table 78: ceconfig register ............................................................................................................. 123 table 79: ceconfig bit definitions (ce ram 0x20) ........................................................................... 124 table 80: sag threshold, phase measurement, and gain adjust control ............................................. 125 table 81: ce transfer variables (with shunts) ..................................................................................... 125 table 82: ce transfer variables (with cts) ......................................................................................... 126 table 83: ce energy measurement variables (with shunts) ................................................................. 126 table 84: ce energy measurement variables (with cts) ..................................................................... 126 table 85: other transfer variables ...................................................................................................... 127 table 86: ce pulse generation parameters ......................................................................................... 128 table 87: ce parameters for noise suppression and code version ..................................................... 129 table 88: ce calibration parameters ................................................................................................... 130 table 89: absolute maximum ratings .................................................................................................. 133 table 90: recommended external components .................................................................................. 134 table 91: recommended operating conditions ................................................................................... 134 table 92: input logic levels ................................................................................................................ 135 ta ble 93: output logic levels ............................................................................................................. 135 table 94: battery monitor performance specifications ( temp_bat = 1) ............................................... 136 table 95: temperature monitor ............................................................................................................ 137 ta ble 96: supply current performance specifications .......................................................................... 138 table 98: internal power fault comparators performance specifications ............................................. 139 table 99: 2.5 v voltage regulator performance specifications ............................................................ 139 71m6543f/h and 71M6543G/gh data sheet 8 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 table 100: low - power voltage regulator performance specifications ................................................. 140 table 101: crystal oscillator performance specifications ..................................................................... 140 table 102: pll performance specifications ......................................................................................... 140 table 103: lcd drivers performance specifications ............................................................................ 140 table 105: 71m6543 vref performance specifications ...................................................................... 143 table 106: adc converter performance specifications ....................................................................... 144 table 107: pre - amplifier performance specifications ........................................................................... 145 table 108: flash memory timing specifications .................................................................................. 146 table 109. spi slave timing specifications ......................................................................................... 146 table 110: eeprom interface timing ................................................................................................. 146 table 111: reset pin timing ............................................................................................................. 147 table 112: rtc range for date ........................................................................................................... 147 table 113: 71m6543 power and ground pins ...................................................................................... 150 table 114: 71m6543 analog pins ........................................................................................................ 151 table 115: 71m6543 digital pins ......................................................................................................... 152 table 116. 71m6543 ordering guide ................................................................................................... 155 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 9 figure 1 : ic functional block diagram iadc 0 mux and preamp xin xout vref ckadc ce 32 - bit compute engine mpu ( 80515 ) ce control opt _ rx / segdio 55 opt _ tx / segdio 51 / wpulse / vpulse reset vbias emul ator port 3 c e _ b u s y optical interface uart 0 tx rx x f e r b u s y 6 com 0 .. 5 vlc 2 lcd driver cedata 0 x 000 ... 0 x 2 ff prog 0 x 000 ... 0 x 3 ff data 0 x 0000 ... 0 xffff program 0 x 0000 ... 0 xffff 0 x 00000 ? 0 x1ffff digital i / o configuration ram ( i / o ram ) 0 x 2000 ... 0 x 20 ff i / o r a m memory share 0 x 0000 ... 0 x 13 ff 16 8 rtclk rtclk ( 32 khz ) mux _ sync ckce ckmpu ck 32 32 8 8 8 pow er fault detection 4 . 9 mhz < 4 . 9 mhz 4 . 9 mhz gndd v 3 p 3 a v 3 p 3 d vbat voltage regulator 2 . 5 v to logic vdd 32 khz mpu _ rstz faultz w ake con - figuration parameters gnda vbias 9 / 20 / 2010 cross clock gen oscillator 32 khz ck 32 mck pll vref div adc mux ctrl strt mux mux ckfir rtm segdio pins wpulse varpulse wpulse varpulse test test mode vlc 1 vlc 0 < 4 . 9 mhz ckmpu _ 2 x ckmpu _ 2 x sdck sdout sdin e _ rxtx / seg 48 e _ tclk / seg 49 e _ rst / seg 50 flash 128 kb v 3 p 3 a fir eeprom interface ck _ 4 x lcd _ gen pb rtc vbias memory share 17 e _ rxtx e _ tclk e _ rst ( open drain ) ice _ e ?_ ad converter + - vref v 3 p 3 sys test mux vlcd vlcd voltage boost mpu ram ( 5 kb ) 22 s p i vstat vbat _ rtc iadc 1 iadc 2 iadc 3 iadc 4 iadc 5 iadc 6 iadc 7 vadc 8 ( va ) vadc 9 ( vb ) vadc 10 ( vc ) seg pins 2 test mux 2 non - volatile configuration ram bat test temp sensor rtm 71m6543f/h and 71M6543G/gh data sheet 10 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 1 introduction this data sheet covers the 71m6543f ( 64kb, 0.5%) , 71m6543h ( 64kb , 0. 1 %) , 71M6543G (128kb, 0.5%) and 71M6543Gh (128kb, 0.1%) 4th - generation teridian polyphase energy measurement system - on- chips ( socs ) . the term ?71m6543? is used when discussing a device feature or behavior that is applicable to all four part numbers. the specific part numbers are used when discussing those features that apply only to specific part numbers. this data sheet also covers details about the companion 71m6xx3 isolated current sensor device. this document covers the use of the 71m6543 in conjunction with the 71m6xx3 isolated current sensor. the 71m6543 and 7 1m6xx3 ics make it possible to use one non - isolated and three additional isolated shunt current sensors to create polyphase energy meters using inexpensive shunt resistors, while achieving unprecedented performance with this type of sensor technology. the 71m6543 socs also support current transformers (ct). to facilitate document navigation, hyperlinks are often used to reference figures, tables and section headings that are located in other parts of the document. all hyperlinks in this document are highlig hted in blue . hyperlinks are used extensively to increase the level of detail and clarity provided within each section by referencing other relevant parts of the document. to further facilitate document navigation, this document is published as a pdf docum ent with bookmarks enabled. the reader is also encouraged to obtain and review the documents listed in 8 re lated information on page 155 of this document. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 11 2 hardware description 2.1 hardware overview the teridian 71m6543 single - chip energy meter integrate s all primary functional blocks re quired to implement a solid - state electricity meter. included on the chip are : ? an a nalog front -end (afe) featuring a 22 - bit second- order sigma- delta adc ? an i ndependent 32- bit digital computation engine (ce) to implement dsp functions ? an 8051- compatible microprocessor (mpu) which executes one inst ruction per clock cycle (80515) ? a precision voltage reference (vref) ? a temperature sensor for digital temperature compensation of : - metrology (mpu) - automatic rtc in all power states - mpu assisted rtc compensation ? lcd driver ? ram and flash memory ? a real time clock (rtc) ? a variety of i/o pi ns ? a power failure interrupt ? a zero - crossing interrupt ? selectable current sensor interfaces for locally - connected sensors as well as isolated sensors ( i.e., using the 71m6xx3 companion ic with a shunt resistor sensor ) ? resistive shunt and cur rent transformers are supported in order to implement a polyphase meter with or without neutral current sensin g, one resistive shunt cur rent sensor may be connected directly (non - isolated) to the 71m6543 device, while up to three additional current shunts are isolated using a companion 71m6xx3 isolat ed sensor ic. an inexpensive, small size pulse transformer is use d to electrically isolate the 71m6xx3 remote sensor from the 71m6543. the 71m6543 performs digital communications bi - directionally with the 71m6xx3 and also provides power to the 71m6xx3 through the isolating pulse transformer. isolated (remote) shunt curr ent sensors are connected to the differential input of the 71m6xx3. the 71m6543 may also be used with current transformers; in this case the 71m6xx3 isolated sensors are not required. included on the 71m6xx3 companion isolator chip are: ? digital isolation c ommunications interface ? an a nalog front -end (afe) featuring a 22 - bit second- order sigma- delta adc ? a precision voltage reference (vref) ? a temperature sensor (for current - sensing digital temperature compensation) ? a fully differential shunt resistor sensor in put ? a pre - amplifier to optimize shunt current sensor performance ? isolated power circuitry obtains dc power from pulses sent by the 71m6543 in a typical application, the 32 - bit compute engine (ce) of t he 71m6543 sequentially processes the samples from the v oltage inputs on analog input pins and performs calculations to measure active ener gy (wh) and reactive energy (varh), as well as a 2 h, and v 2 h for four - quadrant metering. these measurements are then accessed by the mpu, processed further and output using the peri pheral devices available to the mpu. in addition to advanced measurement functions, the real time clock (rtc) function allows the 71m6543 to record time of use (tou) metering inform ation for multi - rate applications and to time - stamp tamper or other events. a n automatic rtc temperature compensation circuit operates in all power states including when the mpu is halted, and continues to compensate using back - up battery power during powe r outages. measurements can be displayed on 3.3 v lcds commonly used in low - tem perature environments . the integrated charge pump and temperature sensor can be used by the mpu to enhance 3.3 v lcd performance at cold temperatures. the on- chip charge pump may also drive 5 v lcds. flexible mapping of lcd display segments facilitate s the integration of existing custom lcds. design trade - off between the 71m6543f/h and 71M6543G/gh data sheet 12 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 number of lcd segments and dio pins can be implemented in software to accommodate various require ments. in addition to the temperature - trimmed ultra- precision voltage reference, the on- chip digital temperature com pensation mechanism includes a temperature sensor and associated controls for correction of unwanted temperature effects on metrology and rtc accu racy (i.e., to meet the requirements of ansi and iec standards ). temperature - dependent external com ponents such as the crystal oscillator , current transformers (cts) , current shunts and their corresponding signal conditioning circuits can be character - ize d and their correction factors can be programmed to produce electricity meters with exceptional accuracy over the indus trial temperature range. one of the two internal uarts is adapted to support an infrared led with interna l drive and sense confi guratio n and can also function as a standard uart. the optical output can be modulated at 38 khz. this flexibility makes it possible to implement amr meters with an ir interface. a block diagram of the ic is shown in figure 1 . 2.2 analog front - end (afe) the afe functions as a data acquisition system, controlled by the mpu. the 71m6543 afe may also be augmented by isolated 71m6xx3 sensors in order to support l ow - cost current shunt sensors. figure 2 , and figure 3 show the two most common configurations; other configurations are possible. sensors that are connected directly to the 71m6543 (i.e., ia dc0-ia dc1 , va dc8, v adc9 and v adc10 ) are multiplexed in to the single second - order sigma- delta adc input for sam pling in the 71m6543 . the 71m6543 adc output is decimated by the fir filter and stored in ce ram where it can be accessed and processed by the ce. shunt current sensors that are isolated by using a 71m6xx3 device, are sam pled by a second - order sigma delta adc in the 71m6xx3 and the signal samples are transferred over the digital isolation inter face through the low - cost isolation pulse transformer. figure 2 show s the 71m6543 us ing shunt current sensors and the 71m6xx3 isolated sensor device s . figure 2 supports neutral current measurement with a local shunt connected to the ia dc0- iadc1 input plus three remote (isolated) shunt sensors. as seen in figure 2 , when a remote isolated shunt sensor is connected via the 71m6x x 3 , the samples associated with this current channel are not routed to the multiplexer, and are instead transferred digitally to the 71m654 3 via the isolation interface and are directly stored in ce ram. the mux_sel n [3:0] i/o ram control fields allow the mpu to configure the afe for the desired multiplexer sampling sequence. refer to table 1 and table 2 for the appropriate ce code and the corresponding afe settings. see figure 31 for the meter wiring configuration corresponding to figure 2 . ? adc converter vref mux vref vref vadc 22 fir iadc 2 vadc9 (vb) iadc0 vadc8 (va) iadc1 iadc 3 71m6543 ce ram 71m6xx3 sp sn inp inn remote shunt ib digital isolation interface local shunt in* 22 iadc 4 iadc 5 71m6xx3 sp sn inp inn remote shunt ic vadc10 (vc) 22 iadc 6 iadc 7 71m6xx3 sp sn inp inn remote shunt ia 22 *in = neutral current 9/17/2010 figure 2 : afe block diagram (shunts: one - local, three- remotes) 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 13 the 71m6543 afe can also be directly interfaced to current transformers (cts), as seen in figure 3 . in this case, all voltage and current channels are multiplexed into a single second - order sigma- delta adc in the 71m6543 and the 71m6xx3 remot e isolated sensors are not used . the fourth ct and the measureme nt of neutral current via the iadc0 - iadc1 current channel are optional. see figure 32 f or the meter wiring configuration corresponding to figure 3 . ? adc converter vref mux vref vref vadc 22 fir iadc 4 vadc9 (vb) iadc2 vadc8 (va ) iadc3 iadc 5 71m6543 ce ram ib ct ia ct iadc 6 iadc 7 ic ct iadc 0 iadc 1 in* ct vadc10 (vc) 9/17/2010 *in = neutral current figure 3 . afe block diagram (four cts) 2.2.1 signal input pins the 71m6543 features eleven adc input pins. iadc0 through iadc7 are intended for use as current sensor inputs. these eight current sensor inputs can be configured as eight single - ended inputs, or can be paired to form four differenti al inputs. for best performance, it is recommended to configure the current sensor inputs as differential inputs (i.e., iadc0 - iadc1, iadc2 - iadc3, iadc4 - iadc5 and iadc6 - iadc7). the first differential input (iadc0 - iadc1) features a pre - amplifier with a selec table gain of 1 or 8, and is intended for direct connection to a shunt resistor sensor, and can also be used with a current transformer (ct). the three remaining differential pairs (i.e., iadc2 - iadc3, iadc4 - iadc5 and iadc6 - iadc7) may be used with cts, or m ay be enabled to interface to a remote 71m6x x 3 isolated current sensor providing isolation for a shunt resistor sensor using a low cost pulse transformer. the remaining three inputs vadc 8 (va), vadc 9 (vb) and vadc10 (vc) are single - ended, and are intended for sensing each of the phase voltages in a polyphase meter application. the se three single - ended inputs are referenced to the v3p3a pin. all adc input pins measure voltage. in the case of shunt current sensors, currents are sensed as a voltage drop in the shunt resistor sensor. in the case of current transformers (ct), the current is measured as a voltage across a burden resistor that is connected to the secondary of the ct. meanwhile, line voltages are sensed through resistive voltage dividers. the vadc8 (va) , vadc9 (vb) and vadc10 (vc) pins are single -ended and their common return is the v3p3a pin. see figure 27, figure 28, figure 29 and figure 30 for detailed connections for each type of sensor. also refer to the 71m6543 demonstration board schematic and bill of materials for typical component values used in these and other circuits. 71m6543f/h and 71M6543G/gh data sheet 14 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 pins iadc0 - iadc1 can be programmed individually to be differential or single -ended as determined by the diff0 _e ( i/o ram 0x210c[4] ) control bit. however, for mo st applications, iadc0 - iadc1 are configured as a differential input to work with a resistive shunt or ct directly interfaced to the iadc0 - iadc1 differential input with the appropriate external signal conditioning components. the performance of the iadc0 - iadc1 pins can be enhanced by enabling a pre - amplifier with a fixed gain of 8, using the i/o ram control bit pre_e (i/o ram 0x2704[5]) . when pre_e = 1, iadc0 - iadc1 become the inputs to the 8x pre - amplifier, and the output of this amplifier is supplied to t he multiplexer. the 8x amplification is useful when current sensors with low sensitivity, such as shunt resistors, are used. with pre_e set, the iadc0 - iadc1 input signal amplitude is restricted to 31.25 mv peak. when pre_e = 0 (gain = 1), the iadc0 - iadc1 i nput signal is restricted to 250 mv peak. for the 71m6543 application utilizing shunt resistor sensors ( figure 2 ), the iadc0 - iadc1 pins are configured for differential mode to interface to a local shunt by setting the diff0 _e control bit. meanwhile, the iadc2 - iadc3 , iadc4 - iadc5 and iadc6 - iadc7 pins are re - configured as digital remote sensor interface designed to communicate wi th a t eridian 71m6xx3 i solated s ensor by setting the rmt x _e control bits ( i/o ram 0x2709[ 5:3] ). the 71m6x x3 communicate s with the 71m654 3 using a bi - directional digital data stream through an isolating pulse transformer. the 71m654 3 also supplies power to the 71 m6x x3 through the isolating transformer. this type of interface is further described at the end of this chapter . s ee 2.2.8 71m6xx3 isolated sensor interface . for use with current transformers (cts), as shown in figure 3 , the rmtx_e control bits are reset, so that iadc2 - iadc3, iadc4 - iadc5 and iadc6 - iadc7 are configured as local analog inputs. the iadc0 - iadc1 pins cannot be configured as a remote sensor interface. 2.2.2 input multiplexer when operating with locally connected sensors, t he input multiplexer sequentially applies the input signals from the analog input pins to the input of the adc (see figure 3 ) , according to the sampling sequence determined by the eleven muxn_sel[3:0] control fields . one complete sampling sequence is called a multiplexer frame. the m ultiplexer of the 71m654 3 can select up to eleven input signal s when the current sensor input s are configured for single - ended mode. when the current sensor inputs are configured in differential mode (recommended for best performance), the number of input signals is seven (i.e., ia dc0 - ia dc1 , i adc2 - i adc3 , i adc4 - i adc5 , i adc6- i adc7 , va dc8, v adc9 and v adc10 ) per multiplexer frame . the number of slots in the multiplexer frame is controlled by the i/o ram control field mux_div [3:0] (i/o ram 0x2100[7:4]) (see figure 4 ) . the mult iplexer always starts at state 0 and proceeds until the number of sensor channels determined by the mux_div [3:0] field setting have been converted. the 71m6543 requires a unique ce code that is written for the specific meter configuration . moreover, each ce code requires specific afe and mux settings in order to function properly. table 1 provides the ce code and settings corresponding to the 1 - local / 3 - remote sensor configuration shown in figure 2 . table 2 provides the ce code and settings corresponding to the ct configuration shown in figure 3 . 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 15 table 1 . required ce code and settings for 1 - local / 3 - remotes i/o ram mnemonic i/o ram location i/o ram setting comments fir_len[1:0] 210c[2:1] 1 288 cycles adc_div 2200[5] 0 fast pll_fast 2200[4] 1 19.66 mhz mux_div[3:0] 2100[7:4] 6 see note 1 mux0_sel[3:0] 2105[3:0] 0 slot 0 is iadc 0 - iadc1 ( in ) mux1_sel[3:0] 2105[7:4] 1 unused (see note 2) mux2_sel[3:0] 2104[3:0] 1 unused (see note 2) mux3_sel[3:0] 2104[7:4] 8 slot 3 is vadc 8 ( v a) mux4_sel[3:0] 2103[3:0] 9 slot 4 is vadc 9 (vb ) mux5_sel[3:0] 2103[7:4] a slot 5 is vadc 10 (v c) mux6_sel[3:0] 2102[3:0] 0 slots not enabled mux7_sel[3:0] 2102[7:4] 0 mux8_sel[3:0] 2101[3:0] 0 mux9_sel[3:0] 2101[7:4] 0 mux10_sel[3:0] 2100[3:0] 0 rmt 2 _e 2709[3] 1 enable remote i adc2 - i adc3 ( i a) rmt4 _e 2709[4] 1 enable remote iadc4 - i adc5 (i b) rmt6 _e 2709[5] 1 enable remote i adc6 - i adc7 (i c) diff0 _e 210c[4] 1 differential iadc0 - iadc1 (in) diff2 _e 210c[5] 0 see note 3 diff4 _e 210c[6] 0 see note 3 diff6 _e 210c[7] 0 see note 3 pre_e 2704[5] 1 ia dc0 - ia dc1 gain = 8 equ[2:0] 2106[7:5] 5 ia*va + ib*vb + ic*vc ce code s (see note 4) ce43b016603 (use with 71m6603) ce43b016103 (use with 71m6103) ce43b016113 (use with 71m6113) ce43b016203 (use with 71m6203) equation(s) 5 current sensor type 1 local shunt and 3 remote shunts applicable figure s figure 2 , figure 4 and figure 31 notes: 1. mux_div[3:0] should be set to 0 while writing the other values in this table, and then set to the indicated value before writing the muxn_sel[3:0] fields. 2. each unused slot must be assigned to a valid (0 to a), but unused adc handle 3. this channel is remote (71m6xx3), hence diffx_e is irrelevant 4. must u se the ce code that corresponds to the specific 71m6xx3 device used teridian updates the ce code periodically. please contact your local teridian representati ve to obtain the latest ce code and the associated settings. 71m6543f/h and 71M6543G/gh data sheet 16 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 table 2 . required ce code and settings for ct sensors i/o ram mnemonic i/o ram location i/o ram setting (hex) comments fir_len[1:0] 210c[2:1] 1 288 cycles adc_div 2200[5] 0 fast pll_fast 2200[4] 1 19.66 mhz mux_div[3:0] 2100[7:4] 7 see note 1 mux0_sel[3:0] 2105[3:0] 2 slot 0 is iadc 2 - iadc3 ( i a) mux1_sel[3:0] 2105[7:4] 8 slot 1 is vadc 8 (v a) mux2_sel[3:0] 2104[3:0] 4 slot 2 is iadc 4 - iadc5 (ib ) mux3_sel[3:0] 2104[7:4] 9 slot 3 is vadc 9 (v b) mux4_sel[3:0] 2103[3:0] 6 slot 4 is iadc 6 - iadc7 (ic ) mux5_sel[3:0] 2103[7:4] a slot 5 is vadc 10 ( v c) mux6_sel[3:0] 2102[3:0] 0 slot 6 is iadc0 - iadc1 ( in ? see note 2 ) mux7_sel[3:0] 2102[7:4] 0 slots not enabled mux8_sel[3:0] 2101[3:0] 0 mux9_sel[3:0] 2101[7:4] 0 mux10_sel[3:0] 2100[3:0] 0 rmt2 _e 2709[3] 0 local sensor iadc2 - iadc3 rmt4 _e 2709[4] 0 local sensor iadc4 - iadc5 rmt6 _e 2709[5] 0 local sensor iadc6 - iadc7 diff0 _e 210c[4] 1 differential iadc0 - iadc1 diff2 _e 210c[5] 1 differential iadc2 - iadc3 diff4 _e 210c[6] 1 differential iadc4 - iadc5 diff6 _e 210c[7] 1 differential iadc6 - iadc7 pre_e 2704[5] 0 ia dc0 - iadc1 gain = 1 equ[2:0] 2106[7:5] 5 ia*va + ib*vb + ic*vc ce code ce43a02 equation(s) 5 current sensor type 4 current transformers (cts) applicable figure s figure 3 , figure 4 and figure 32 notes: 1. mux_div[3:0] should be set to 0 while writing the other values in this table, and then set to the indicated value before writing the muxn_sel[3:0] fields. 2. in is the optional neutral current teridian updates the ce code periodically. please contact your local teridian representative to obtain the latest ce code and the associated settings. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 17 using settings for the i/o ram mnemonics listed in table 1 and table 2 that do not match those required by the corresponding ce code bei ng used may result in undesirable side effects and must not be selected by the mpu. consult your local teridian representative to obtain the correct ce code and afe / mux settings corresponding to the application. for a polyphase configuration with neutral current sensing using shunt resistor current sensors and the 71m6xx3 isolated sensors , as shown in figure 2 , the iadc0 - iadc1 input must be configured as a differential input, to be connected to a local shunt (see figure 30 for the shunt connection details). the local shunt co nnected to the ia dc0- iadc1 input is used to sense the n eutral current. the voltage sensors (va dc8, v adc9 and v adc10 ) are also directly connected to the 71m6543 (see figure 27 for the connection details) and are also routed though the multiplexer, as seen in figure 2 . meanwhile, the iadc2 - iadc3, i adc 4 - iadc5 and i adc6 - iadc7 current inputs are configured as remote sensor digital inter faces and the corresponding samples are not routed through the multiplexer. for this configuration, the multiplexer sequence is as shown in figure 4 . for a polyphase configuration with optional neutral current sensing using current transformer (cts) sensors, as shown in figure 3 , all four current sensor inputs must be configured as a differential input s , to be connected to their corresponding cts (see figure 29 for the differential ct connection details). the i adc0 - iadc1 current sensor input is optionally used to sense the neutral current for anti - tampering purposes . the voltage sensors (vadc8, v adc9 and v adc10 ) are directly connected to the 71m6543 (see figure 27 for the voltage sensor connection details) . no 71m6xx3 isolated sensors are used in this configuration and all sensors are routed though the multiplexer, as seen in figure 3 . for this configuration, the multiplexer sequence is as shown in figure 5 . the multiplexer sequence shown in figure 4 corresponds to the configuration shown in figure 2 . t he frame duration is 13 ck32 cycl es (where ck32 = 32 , 768 hz), therefore, the resulting sample rate is 32, 768 hz / 13 = 2 , 520.6 hz. note that figure 4 only shows the currents that pass through the 71m6543 multiplexer, and does not show the currents that are copied directly into ce ram from the remote sensors (see figure 2 ), which are sampled during the second half of the multiplexer frame. the two unused conversion slots shown are necessary to produc e the desired 2,520.6 hz sample rate. ck32 mux state 0 1 2 3 4 5 mux_div[3:0] = 6 conversions settle multiplexer frame s cross mux_sync s in unused unused va vb vc figure 4 : states in a multiplexer frame ( mux_div [3:0] = 6 ) the multiplexer sequence shown in figure 5 corresponds to the ct configuration shown in figure 3 . since in this case all current sensors are locally connected to the 71m6543, all currents are routed through the multiplexer, as seen in figure 3 . for this multiplexer sequence, the frame duration is 15 ck32 cycles (where ck32 = 32,768 hz), therefore, the resulting sample rate is 32,768 hz / 15 = 2,184.5 hz. ck32 mux state 0 1 2 3 4 5 mux_div[3:0] = 7 conversions settle multiplexer frame s cross mux_sync s 6 ia va ib vb ic vc in figure 5 : states in a multiplexer frame ( mux_div [3:0] = 7) 71m6543f/h and 71M6543G/gh data sheet 18 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 mult iplexer ad vance, fir initiation and chopping of the adc reference voltage (using the internal cross signal, see 2.2.7 voltage references ) are controlled by the inter nal mux_ctrl circuit . additionally, mux_ctrl launches each pass of the ce through its code. mux_ctrl is clocked by ck32, the 32768 hz clock from the pll block. the behavior of the mux_ctrl circuit is governed by : ? chop_e[1:0] ( i/o ram 0x2106[3:2] ) ? mux_div[3:0] ( i/o ram 0x2100[7:4] ) ? fir_len [1:0] ( i/o ram 0x210c[2:1 ] ) ? adc_div ( i/o ram 0x2200[5] ) the duration o f each multiplexer state depends on the number of adc samples processed by the fir as determined by the fir_len [1:0] (i/o ram 0x210c[2:1] control field . each multiplexer state start s on the rising edge of ck32, the 32 - khz clock. it is recommended that mux_div [3:0] (i/o ram 0x2200[2:0]) be set to zero while changing the adc configuration , to minimize system transients that might be caused by momentary shorts between the adc inputs, especially when changing the diffn_e control bits ( i/o ram 0x210c[5:4] ). after the configuration bits are set, mux_div [3:0] should be set to the required value. the duration of each time slot in ck32 cycles depends on fir_len [1:0], adc_div and pll_fast : time_slot_duration = (3 -2* pll_fast )* ( fir_len [1:0] + 1 ) * ( adc_div +1) t h e duration of a multiplexer frame in ck32 cycles is: mux_f rame _d uration = 3 -2* pll_fast + time_slot_duration * mux_div [3:0] the duration of a multiplexer frame i n ck_fir cycles is: mux frame duration (ck_fir cycles) = [3 -2* pll_fast + time_slot_duration * m ux_div ] * (48+ pll_fast *102) the adc conversion sequence is programmable through the mux n _sel control fields ( i/o ram 0x2100 to 0x2105 ). as stated above, there are up to eleven adc time slots in the 71m654 3 , as set by mux_div[3:0] ( i/o ram 0x210 0[ 7:4 ] ). in the expression mux n _sel [3:0] = x, ? n ? refers to the multiplexer frame time slot number and ?x? refers to the desired adc input number or adc handle (i.e., iadc0 to vadc10 , or simply 0 to 10 decimal). thus, there are a total of 11 valid adc handles in th e 71m654 3 devices. for example, if mux 0 _sel [3:0] = 0 , then iadc0 , corresponding to the sample from the iadc0 - iadc1 input (configured as a differential input), is positioned in the multiplexer frame during time slot 0 . see table 1 and table 2 for the appropriate mux n _sel[3:0] settings and other settings applicable to a particular meter configuration and ce code. note that when the remote sensor interface is enabled, the samples corresponding to the remote sensor current s do not pass through the 71m6543 multiplexer. th e sampling of the remote current sensors occurs in the second half of the multiplexer frame. the va, vb and vc voltages are assigned the last three slots in the frame. with this slot assignment for va, vb and vc, t he sampling of the corresponding remote se nsor current s bears a precise timing relationship to their corresponding phase voltages, and delay compensation is accurately performed (see 2.2.3 delay compensation on page 19). also when using remote sensors, it is necessary to introduce unused slots to realize the number of slots specifi ed by the mux_div[3:0] ( i/o ram 0x2100[7:4] ) field setting (see figure 4 and figure 5 ). t he mux n _sel[3:0] control fields for the se unused (?dummy?) slots must be written with a valid adc handle (i.e., 0 to 10 deci mal) that is not otherwise being used. in this manner, the unused adc han dle , is used as a ?dummy? place holder in the multiplexer frame, and the correct duration multiplexer frame sequence is generated and also the desired sample rate. the resulting sample data stored in the ce ram location corresponding to the ?dummy? adc handle is ignored by the ce code. meanwhile, the digital isolation interface takes care of automatically storing the samples for the remote current senso rs in the appropriate ce ram locations. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 19 delay compensation and other functions in the ce code require the settings for m ux_div[3:0], mux n _sel [3:0], rmt_e, fir_len[1:0], adc_div and pll_fast to be fixed for a given ce code. refer to table 1 and table 2 for the settings that are applicable to the 71m654 3 . table 3 summarizes the i/o ram registers used for configuring the multiplexer, signals pins, and adc. all listed registers are 0 after reset and wake from battery modes, and are readable and writabl e. table 3 : multiplexer and adc configuration bits name location description mux0_sel[3:0] 2105[3:0] selects the adc input converted during time slot 0. mux1_sel[3:0] 2105[7:4] selects the adc input converted during time slot 1. mux2_sel[3:0] 2104[3:0] selects the adc input converted during time slot 2. mux3_sel[3:0] 2104[7:4] selects the adc input converted during time slot 3. mux4_sel[3:0] 2103[3:0] selects the adc input converted during time slot 4. mux5_sel[3:0] 2103[7:4] selects the adc input converted during time slot 5. mux6_sel[3:0] 2102[3:0] selects the adc input converted during time slot 6. mux7_sel[3:0] 2102[7:0] selects the adc input converted during time slot 7. mux8_sel[3:0] 2101[3:0] selects the adc input converted during time slot 8. mux9_sel[3:0] 2101[7:0] selects the adc input converted during time slot 9. mux10_sel[3:0] 2100[3:0] selects the adc input converted during time slot 10. adc_div 2200[5] controls the rate of the adc and fir clocks. mux_div[3:0] 2100[7:4] the number of adc time slots in each multiplexer frame (maximum = 11). pll_fast 2200[4] controls the speed of the pll and mck. fir_len[1:0] 210c[ 2: 1] determines the number of adc cycles in the adc decimation fir filter. diff0 _e 210c[4] enables the differential configuration for analog input pins iadc0 - iadc1 . diff2 _e 210c[5] enables the differential configuration for analog input pins iadc2 - iadc3 . diff4 _e 210c[6] enables the differential configuration for analog input pins iadc4 - iadc5 . diff6 _e 210c[7] enables the differential configuration for analog input pins iadc6 - iadc7 . rmt2 _e 2709[3] enables the remote sensor interface transforming pins iadc2 - iadc3 into a digital interface for communications with a 71m6x x3 sensor. rmt4 _e 2709[4] enables the remote sensor interface transforming pins iadc4 - iadc5 into a digital interface for communications with a 71m6xx3 sensor. rmt6 _e 2709[5] enables the remote sensor interface transforming pins iadc6 - iadc7 into a digital interface for communications with a 71m6xx3 sensor. pre_e 2704[5] enables the 8x pre - amplifier. refer to table 71 starting on page 104 for more complete details about these i/o ram locations. 2.2.3 delay compensation when measuring the energy of a phase (i.e., wh and varh) in a service, the voltage and current for that phase mus t be sampled at the same instant. otherwise, the phase difference, , introduces errors. o delay o delay f t t t 360 360 ? ? ? i where f is the frequency of the input signal , t = 1/f and t delay is the sampling delay between current and voltage . tradition ally, sampling is accomplished by using two a/d converters per phase (one for voltage and the other one for current) controlled to sample simultaneously. teridian?s single - converter technology ? , however, ex ploits the 32 - bit signal processing capability of its ce to implem ent ?constant delay? all - pass filters. the all - pass filter corrects for the conversion time difference between the voltage and the corresponding current samples that are obtained with a single multiplexed a/d converter. the ?constant delay? all - pass filter provides a broad - band delay 360 o - , which is precisely matched to the differ ence in sample time between the voltage and the current of a given phase. this digital filter does not affect the amplitude of the signal, but provides a precisely controlled p hase response. 71m6543f/h and 71M6543G/gh data sheet 20 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 the recommended adc multiplexer sequence samples the current first, immediately followed by sampling of the corresponding phase voltage, thus the voltage is delayed by a phase angle relative to the current. the delay compensation implement ed in the ce aligns the voltage samples with their corresponding current samples by first delaying the current samples by one full sample interval (i.e., 360 o ), then routing the voltage samples through the all - pass filter, thus delaying the voltage samples by 360 o - , resulting in the residual phase error between the current and its corresponding voltage of ? . the residual phase error is negligible, and is typically less than 1.5 milli - degrees at 100hz, thus it does not contribute to errors in the energy measurements. when using remote sensors, the ce performs the same delay compensation described above to align each voltage sample with its corresponding current sample. even though the remote current samples do not pass through the 71m6543 multiplex er, their timing relationship to their corresponding voltages is fixed and precisely known, provided that the muxn_sel[3:0] slot assignment fields are programmed as shown in table 1 . note that these slot assignments result in va, vb and vc occupying multiplexer slots 3, 4 and 5, respectively (see figure 4 ). 2.2.4 adc pre - a mp lifier the adc pre - amp lifier is a low - noise differential a mplifier with a fixed gain of 8 available only on the iadc0 - iadc1 sensor input pins . a gain of 8 is enabled by setting pre_e = 1 ( i/o ram 0x2704[5] ). when disabled, the supply current of the pre - amplifier is <10 na and the gain is unity . with proper settings of the pre_e and diff0 _e ( i/o ram 0x210c[4] ) bits, the pre - amplifier can be used whether diffe rential mode is selected or not. for best performance, the differential mode is recommended. in order to save power, the bias current of the pre - amplifier and adc is adjusted according to the adc_div control bit ( i/o ram 0x2 200 [ 5 ] ) . 2.2.5 a/d converter (adc) a single 2 nd order sigma - delta a/d converter digitizes the voltage and current inputs to the device. the resolution of the adc, including the sign bit , is 21 bits ( fir_len [1:0] = 01, i/o ram 0x210c[ 2:1] ), or 22 bits ( fir_len [1:0] = 1 0 ). the adc is clocked by ckadc. initiation of each adc conversion is controlled by the internal mux_ctrl circuit as described earlier . at the end of each adc conversion, the fir filter output data is stored into the ce ram location determined by the multiplexer selection . 2.2.6 fir filter the finite impulse response filter is an integral part of the adc a nd it is optimized for use with the multi plexer. the purpose of the fir filter is to decimate the adc output to the desired resolution. at the end of each adc conversion, the output data is stored into the fixed ce ram location determined by the multiplex er selection stored in the muxn_sel[3:0] fields . fir data is stored after being shifted left by 9 bits. 2.2.7 voltage references a bandgap circuit provides the reference voltage to the adc. the amplifier within the reference is chopper stabilized, i.e. , the chopper circuit can be enabled or disabled by the mpu using the i/o ram control field chop_e [1:0] (i/o ram 0x2106[3:2]) . the two bits in the chop_e [1:0] field enable the mpu to operate the chopper circuit in regula r or inverted operation, or in toggling mode s (recommended) . when the chopper circuit is toggled in between mul tiplexer cycles, dc offsets on vref are automatically be averaged out, therefore the chopper circuit should always be configured for one of the toggling modes. since the vref band - gap amplifier is chopper - stabilized, the dc offset voltage, which is the most significant long - term drift mechanism in the voltage reference s (vref), is automatically removed by the chopper circuit. both the 71m6543 and the 71m6xx3 feature chopper circuits for their respective vref voltage reference. the general topology of a chopped amplifier is shown in figure 6 . the cross signal is an internal on - chip signal and is not accessible on any pin or register. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 21 figure 6 : general topology of a chopped amplifier it is assumed that an offset voltage voff appears at the positive amplifier input. with all switches, as controlled by cross (an internal signal), in the a position, the output voltage is: voutp ? voutn = g (vinp + voff ? vinn) = g (vinp ? vinn) + g voff with all switches set to the b position by applying the inverted cross signal, the output voltage is: voutn ? voutp = g (vinn ? vinp + voff) = g (vinn ? vinp) + g voff, or voutp ? voutn = g (vinp ? vinn) - g voff thus, when cross is toggled, e.g., after each multiplexer cycle, the offset alternately appears on the output as positive and negative, which results in the of fset effectively being eliminated, regardless of its polarity or magnitude. when cross is high, the connection of the amplifier input devices is reversed. this preserves the overall polarity of that amplifier gain; it inverts its input offset. by alternate ly reversing the connection, the amplifier?s offset is averaged to zero. this removes the most significant long - term drift mechanism in the voltage reference. the chop_e [1:0] ( i/o ram 0x2 106 [ 3:2 ] ) control field control s the behavior of cross. on the first ck32 rising edge after the last multiplexer state of its sequence, the multiplexer wait s one additional ck32 cycle before beginning a new frame. at the beginning of this cycle, the value of cross is updated according to the chop_e [1:0] field . the extra ck3 2 cycle allows time for the chopped vref to settle. during this cycle, muxsync is held high. the leading edge of muxsync initiates a pass through the ce program sequence . chop_e [1:0] has four states: positive, reverse, and two toggle states. in the positive state, chop_e [1:0] = 01, cross is held low. in the reverse state, chop_e [1:0] = 10, cross is held high. the two automatic toggling states are selected by setting chop_e=11 or chop_e=00. figure 7 : cross signal with chop _e = 00 figure 7 shows cross over two accumulation intervals when chop_e [1:0] = 00: at the end of the first in ter val, cross is high , at the end of the second interval, cross is low . operation with chop_e [1:0] = 00 does not require control of the chopping mechanism by the mpu. in the second toggle state, chop_e [1:0] = 11, cross does not toggle at the end of the last multiplexer cycle in an accumulati on interval . g - + v inp v outp v outn v inn cross a b a b a b a b 71m6543f/h data sheet 8 22 ? 2008 -2010 maxim/ teridian semiconductor corporation v1. 2 2.2.8 71m6xx3 isolated sensor interface 2.2.8.1 general description non- isolating sensors, such as shunt resistors, can be connected to the inputs of the 71m6543 via a combination of a pulse transformer and a 71m6xx3 ic (a top - level block diagram of th is sensor interface is shown in figure 31). the 71m6xx3 receives power directly from the 71m6543 via a pulse transformer and does not require a dedicat ed power supply circuit. the 71m6xx3 establishes 2 - way communication with the 71m6543, supplying current samples and auxiliary information such as sensor temperature via a serial data stream. up to three 71m6xx3 isolated sensor s can be supported by the 71m654 3 . when a remote sensor interface is enabled, the two analog current inputs become re - configured as a digital remote sensor interface. for example, when control bit rmt2 _e = 1, the i adc2 -i adc3 analog pins are re - configured as the digital interfac e pins to the remote sensor . each 71m6x x3 isolated sensor consists of the following building blocks: ? power supply that derives power from pulses received from the 71m654 3 ? bi - directional d igital communications interface ? shunt signal pre - amplifier ? 22- bit 2nd order sigma- delta adc converter with precision bandgap reference (chopping amplifier) ? temperature sensor (for digitally compensating vref) ? fuse system containing part - specific information during an ordinary mu ltiple x er cycle, the 71m654 3 internally determines which other channels are enabled with mux_div[3:0] (i/o ram 0x2100[7:4]) . at the same time, it decimate s the modulator output from the 71m6x x3 isolated s ensors. each result is written to ce ram during one of its ce access time slots. 2.2.8.2 communication between 71m654 3 and 71m6x x3 isolated sensor the adc of the 71m6x x3 derives its timing from the power pulses generated by the 71m654 3 and as a result, operates its adc slaved to the frequency of the power pulses. the generation of power pulses, as well as the communication protocol between the 71m654 3 and 71m6x x3 isolated sensor, is au tomatic and transparent to the user. details are not covered in this data sheet. 2.2.8.3 control of the 71m6x x3 isolated sensor the 71m65 43 can read or write certain types of information from each 71m6xx3 remote sensor. the data to be read is selected by a combination of th e rcmd[4:0] and tmuxrn[2:0] . to perform a read transaction from one of the 71m6xx3 devices, the mpu first writes the tmuxrn [2:0 ] field (where n = 2, 4, 6, located at i/o ram 0x270a[2:0] , 0x270a[ 6: 4 ] and 0x270 9 [2:0] , respectively ) . next, the mpu writes rcmd[4:0 ] ( sfr 0xfc[4:0] ) with the desired command and phase selection . when the rcmd[4:2] bits have cleared to zero, the transaction has been completed and the requested data is available in rmt _rd[15: 0 ] ( i/o ram 0x2602[7:0] is the msb and 0x2603[7:0] is the lsb) . the read parity error bit, perr _r d (sfr 0xfc[6]) is also updated during the tran saction . if the mpu writes to rcmd[4:0] before a previously initiated read transaction is completed , the command is ig nored. therefore, the mpu must wait for rcmd[4:2] =0 before proceeding to issue the next remote sensor read command. if the ce is running ( ce_e =1), the mpu must write rcmd[4:0] immediately after a ce_busy rising edge. rcmd[4:0] must be written before the next rising edge of mux_sync. failure to do this can cause incorrect data to be read. the rcmd[4:0] field is divided into two sub - fields, c ommand =rcmd[4:2] and phase =rcmd[1:0] , as shown in table 4 . . 8 71m6543f /h data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 23 table 4 . rcmd[4:0] bits command rcmd[4:2] phase selector rcmd[1:0] associated tmuxrn control field 000 invalid 00 invalid --- 001 command 1 01 iadc 2 - iadc3 tmuxr 2 [2:0] 010 command 2 10 i adc 4 - iadc 5 tmuxr 4 [2:0] 011 reserved 11 iadc 6 - iadc 7 tmuxr 6 [2:0] 100 reserved 101 invalid 110 reserved 111 reserved notes: 1. only two codes of rcmd[4:2 ] ( sfr 0x fc[4:2] ) are relevant for normal operation. these are rcmd[4:2 ] = 001 and 010. codes 000 and 101 are invalid and will be ignored if used. the remaining codes are re served and must not be used. 2. for the rcmd [ 1 :0 ] con trol field, codes 01, 10 and 11 are valid and 00 is invalid and must not be used. 3. the specific phase (a, b or c) associated with each tmuxrn[2:0] field, is de termined by how the iadcn input pins are connected in the meter design. table 5 shows the allowable combinations of values in rcmd[4:2 ] a nd tmuxrn[2:0 ] , and the corresponding data type and format s ent back by the 71m6xx3 remo te s en sor and how the data is stored in rmt_rd[15:8] and rmt_rd[7:0] . the mpu selects which of the three phases is read by asserting the proper code in the rcmd[1:0] field, as shown in table 4 . . table 5 : remote interface read commands rcmd[4:2] tmuxrn[2:0] read operation rmt_rd [15:8] rmt_rd [7:0] 001 00x trimt[7:0] ( trim fuse for all 71m6xx3) trimt[7]=rmt_rd[8] trimt[6:0]=rmt_rd[7:1] 001 11x trimbgb[ 7 :0] and trimbg d [ 7 :0] ( additional trim fuses for 71m6 113 and 71m6203 only ) trimbg b [ 7 :0] trimbg d [ 7 :0] 010 00x stemp[10:0] (sensed 71m6xx3 temperature) stemp[10:8]=rmt_rd[ 10 : 8 ] (rmt_rd[15: 11] are sign extended) stemp[7:0] 010 01x vsense[ 7 :0] (sensed 71m6xx3 supply voltage) all zeros vsense[7:0] 010 10x version[7:0 ] (chip version) version [7 :0 ] all zeros notes: 1. trimt[7:0] is the vref trim value for all 71m6xx3 devices . note that t he trimt[7:0] 8 - bit value is formed by rmt_rd[8] and rmt_rd[7:1] . see the 71m6xxx data sheet for the equations related to trimt[7:0] and the corresponding temperature coefficient . 2. trimbg b [ 7 :0] and trimbgd [7:0] are trim values used for characterizing the 71m6113 (0.5%) and 71m6203 (0.1%) over temperature. see the 71m6xxx data sheet for the equations related to trimbgb[7:0] and trimbgd[7:0] and the corresponding temperature coefficients. 3. see 2.5.6 71m6xx3 temperature sensor on page 56 . 4. see 2.5.8 71m6xx3 vcc monitor on page 57. with hardware and trim - related information on each connected 71m6xx3 isolated sensor available to the 71m6543 , the mpu can implement temperature compensation of the energy measurement based on the individual temperature characteristics of the 71m6xx3 isolated sensors. see 4.5 metrology temperature compensation for details. table 6 shows all i/o ram registers used for control of the external 71m6x x3 isolated sensors. see the 71m6x x3 data sheet for additional details. 71m6543f/h data sheet 8 24 ? 2008 -2010 maxim/ teridian semiconductor corporation v1. 2 table 6 : i/o ram control bits for isolated sensor name addr ess rst default wake default r/w description rcmd[4:0] sfr fc[4:0] 0 0 r/w when the mpu writes a non - zero value to rcmd , the 71m654 3 issue s a command to the cor - responding isolated sensor selected with rcmd[1:0] . when the command is complete, the 71m654 3 clear s rcmd[4:2]. the command code itself is in rcmd[4:2 ] . perr_rd perr_wr sfr fc[6] sfr fc[5] 0 0 r/w the 71m654 3 set s these bits to indicate that a parity error on the isolated sensor has been de - tected. once set, the bits are re mem bered until they are cleared by the mpu. chopr[1:0] 2709[7:6] 00 00 r/w the chop settings for the is o la te d sensors. 00 ? auto chop. change every multiplexer frame. 01 ? positive 10 ? negative 11 ? same as 00 tmuxr2 [2:0] 270a [2:0] 000 000 r/w the tmux bits for control of the isolated sen sor . tmuxr4 [2:0] 270 a [ 6 : 4 ] 000 000 r/w the tmux bits for control of the isolated sen sor . tmuxr6 [2:0] 2709 [ 2 :0] 000 000 r/w the tmux bits for control of the isolated sen sor . rmt _rd[15:8] rmt _rd[7:0] 2602[7:0] 2603[7:0] 0 0 r the read buffer for 71m6x x3 read operation s . rfly_dis 210c[3] 0 0 r/w controls how the 71m654 3 drives the 71m6x x3 power pulse. when set, the power pulse is driven high and low. when cleared, it is driven high followed by an open circuit fly - back interval. rmt2 _e 2709[3] 0 0 r/w enables the isolated remote sensor interface and re - configures pins i adc2 - iadc3 as a balanced pair digital remote interface. rmt4 _e 2709[4 ] 0 0 r/w enables the isolated remote sensor interface and re - configures pins i adc4 - iadc5 as a balanced pair digital remote interface . rmt6 _e 2709[5 ] 0 0 r/w enables the isolated remote sensor interface and re - configures pins i adc6 - iadc7 as a balanced pair digital remote interface . refer to table 71 starting on page 104 for more complete details abo ut these i/o ram locations. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 25 2.3 digital computation engine (ce) the ce, a dedicated 32 - bit signal processor, performs the precision computations necessary to accurately measure energy. the ce calculations and processes include: ? multiplication of each current sample with its associated voltage sample to obtain the energy per sample (when multiplied by the constant sample time). ? frequency - insensitive delay cancellation on all channels (to compensate for the delay bet ween samples c aused by the multiplexing scheme). ? 90 phase shifter (for var calculations). ? pulse generation. ? monitoring of the input signal frequency (for frequency and phase information). ? monitoring of the input signal amplitude (for sag detection). ? scaling of the proc essed samples based on calibration coefficients. ? scaling of samples based on temperature compensation information. 2.3.1 ce program memory the ce program resides in flash memory. common access to flash memory by the ce and mpu is con trolled by a memory share ci rcuit. each ce instruction word is two bytes long. allocated flash space for the ce program cannot exceed 4096 16 - bit words (8 kb). the ce program counter begins a pass through the ce code each time multiplexer state 0 begins. the code pass ends when a hal t instruction is executed. for proper operation, the code pass must be completed before the multiplexer cycle ends . the ce program must begin on a 1 kb boundary of the flash address. the i/o ram control field ce_lctn[ 6/ 5 :0] ( i/o ram 0x2109[ 6/ 5:0 ] ) on the 71m6543f/h and ce_lctn[ 6 :0] ( i/o ram 0x2109[6: 0 ] ) on the 71M6543G/gh defines which 1 kb boundary contains the ce code. thus, the first ce instruction is located at 1024* ce_lctn[ 5 :0] on the 71m6543f/h and 1024* ce_lctn[6:0 ] on the 71M6543G/gh. 2.3.2 ce data memory the ce and mpu share data memory (ram). common access to xram by the ce and mpu is controlled by a memory share circuit. the ce can access up to 3 kb of the 5 kb data ram (xram) , i.e. from ram address 0x0000 to 0x0c00 . the xram can be accessed by th e fir filter block , the rtm circuit, the ce, and the mpu. assigned time slots are re served for fir and mpu, respectively, to prevent bus contention for xram data access by the ce . the mpu read s and write s the xram shared between the ce and mpu as the primary means of data communication between the two processors. the ce is aided by support hardware to facilitate implementation of equations, pulse counters, and ac cumulators. this hardware is controlled through i/o ram field equ[2:0] (equation assist, i/ o ram 0x2106[7:5] ), bit dio_pv (i/o ram 0x2457[6]), bit dio_pw (pulse count assist , i/o ram 0x2457[7] ), and sum_ samps [12:0] (accumulation assist , i/o ram 0x2107[4:0] and 0x2108[7:0] ). the integration time for each energy output , when using standard ce code, is sum_samps[12:0] /218 4 .53 (with mux_div[3:0] = 7 , i/o ram 0x2100[7:4] ). ce hardware issues the xfer_busy interrupt when the accumulation is complete. 2.3.3 ce communication with the mpu the ce outputs six signals to the mpu: ce_busy, xfer_busy, xpulse, ypulse , wpulse and vpulse . these are connected to the mpu interrupt service. ce_busy indicates that the ce is actively processing data. this signal occur s once every multiplexe r frame. xfer_busy indicates that the ce is updating to the o ut put region of t he ce ram, which occur s whenever an accumulation cycle has been completed. both, ce_busy and xfer_busy are cleared when the ce executes a halt instruction. xpulse and ypulse can be configured to interrupt the mpu and indicate sag failures , zero crossings o f the mains voltage, or other significant events. additionally, these signals can be connected directly to dio pins to provide di rect outputs f rom the ce. interrupts associated with these signals always occur on the leading edge. 71m6543f/h and 71M6543G/gh data sheet 26 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 2.3.4 meter equations the 71m6543 provide s hardware assistance to the ce in order to support various meter equations. this assistance is controlled through i/o ram field equ[2:0] (equation assist , i/o ram 0x2106[7:5] ) . the compute engine (ce) firmware configurations can implement t he equations listed in table 7 . equ[2:0] specifies the equation to be used based on the meter configuration and on the number of phases used for meter ing. table 7 : inputs selected in multiplexer cycles equ[2:0] * description wh and varh formula recommended multiplexer sequence element 0 element 1 element 2 2 2 - element, 3- w, 3 delta va a ia vb a ib n/a ia va ib vb 3 2 - element, 4- w, 3 delta va(ia - ib)/2 vc a ic n/a ia va ib vb ic vc 4 2 - element, 4- w, 3 wye va(ia - ib)/2 vb(ic - ib)/2 n/a ia va ib vb ic vc 5 3 - element, 4- w, 3 wye va a ia vb a ib vc a ic ia va ib vb ic vc (id) note: * only equ[2:0] = 5 is supported by the currently available ce code versions for the 71m6543. contact your local teridian representative for ce codes that support equations 2, 3 and 4. 2.3.5 real - time monitor (rtm) the ce contains a real - time monitor (rtm), which can be programmed to monitor four selectable x ram locations at full sample rate. the data from the four monitored locations are serially output to the tmuxout pin via the digital output multiplexer at the be ginning of each ce code pass. the rtm can be enabled and disabled with rtm_e (i/o ram 0x2106[1]) . the rtm output clock is available on the tmux2out pin . each rtm word is clocked out in 35 cycles and contains a leading flag bit. see figure 8 for the rtm output format. rtm is low when not in use. figure 8 : rtm timing 2.3.6 pulse generator s the 71m6543 provide s fou r pulse generators, vpulse , wpulse, xpulse a nd ypulse . the xpulse and ypulse genera tors are used by standard ce code to output ce status indicators, for example the status of the sag detection , to dio pins. all pulses can be configured to generate interrupts to the mpu. the polarity of the pulses may be inverted with pls_inv (i/o ram 0x210c[0]) . when this bit is set, the pulses are active high, rather than the more usual active low. pls_inv inverts all the pulse outputs. the function of each pulse generator is determined by the ce code and the mpu code must configure the corresponding pulse outputs in agreement with the ce code. for example, standard ce code produces a mains zero - crossing pulse on xpulse and a sag pulse on ypulse. cktest rtm flag rtm data0 (32 bits) lsb sign lsb sign rtm data1 (32 bits) lsb lsb sign sign rtm data2 (32 bits) rtm data3 (32 bits) 0 1 30 31 0 1 30 31 0 1 30 31 0 1 30 31 flag flag flag mux_state s mux_sync ck32 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 27 a common use of the zero - crossing pulses i s to generate interrupts in order to drive real - time clock software in places where the mains frequency is sufficiently accurate to do so and also to adjust for crystal aging. a common use for the sag pulse is to generate an interrupt that alerts the mpu w hen mains power is about to fail, so that the mpu code can store accumulated energy and other data to eeprom before the v3p3sys supply voltage actually drops. 2.3.6.1 xpulse and ypulse pulses generated by the ce may be exported to the xpulse and ypulse pulse output pins. pins segdio6 and segdio7 are used for these pulses, respectively. generally, the xpulse and ypulse outputs can be updated once on each pass of the ce code . see 5.4 ce interface description on page 120 for details. 2.3.6.2 vpulse and wpulse referring to figure 9 , d uring each ce code pass the hardware stores exported wpul se and v pulse sign bits in an 8 - bit fifo and outputs them at a specified interval. this permits the ce code to calculate the vpulse and wpulse outputs at the beginning of its code pass and to rely on hardware to spread them over the multiplexer frame. as seen in figure 9 , t he fifo is reset at the beginning of each multiplexer frame. as also seen in figure 9 , t he i/o ram register pls_interval [7:0] (i/o ram 0x210b [7:0] ) controls the delay to the first pulse up date and the interval between subsequent updates. the lsb of the pls_interval [7:0] register is equivalent to 4 ck_fir cycles (ck_fir is typically 4.9152mhz if pll_fast =1 and adc_div =0, but other ck_fir frequencies are possible; see the adc_div definition in table 71. ) if pls_interval[7:0] =0 , the fifo is deactivated and the pulse output s are updated immediately. the mux frame duration in units of ck_fir clock cycles is given by : if pll_fast =1: mux frame duration in ck_fir cycles = [1 + ( fir_len +1) * ( adc_div +1) * ( mux_div )] * [150 / ( adc_div +1)] if pll_fast =0: mux frame duration in ck_fir cycles = [ 3 + 3*( fir_len +1) * ( adc_div +1) * ( mux_div )] * [48 / ( adc_div +1)] pls_interval[7:0] in units of ck_fir clock cycles is calculated by: pls_i nterval [7:0] = floor ( mux frame duration in ck_fir cycles / ce pulse updates per mux frame / 4 ) since the fifo resets at the beginning of each multiplexer frame, the user must specify pls_interva l[7:0] so that all of the possible pulse updates occurring in one ce execution are output before the multiplexer frame completes. for instance, the 71m6543 c e code outputs six updates per multiplexer interval, and if the multiplexer interval is 1950 ck_fir clock cycles long, the ideal value for the interval is 1950/6 /4 = 81.25 . however, i f pls_interval [7:0] = 82 , the six th output occur s too late and would be lost. in this case, the proper value for pls_interval [7:0] is 81 (i.e., round down the result) . since one lsb of pls_interval[7:0] is equal to 4 ck_fir clo ck cycles, the pulse time interval t i in units of ck_fir clock cycles is: t i = 4* pls_interval[7:0] if the fifo is enabled (i.e., pls_interval[7:0] 0), h ardware also provides a maximum pulse width feature in control register pls_max width[7:0] (i/o ram 0x210a) . by default, wpulse and vpulse are negative pulses (i.e., low level pulses, designed to sink current through an led). pls_maxwidth[7:0] determines the maximum negative pulse width t max in units of ck_fir clock cycles based on the pulse interval t i according to the formula: t max = (2 * pls_maxwidth [7:0] + 1) * t i if pls_maxwidth = 255 or pls_interval =0, no pulse width checking is performed, and the pulses default to 50% duty cycle. the polarity of the pulses may be inverted with the control bit pls _inv ( i/o ram 0x210c[0] ). when pls_inv is set, the pulses are active high. the default value for pls_inv is zero, which selects active low pulses. 71m6543f/h and 71M6543G/gh data sheet 28 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 the wpulse and v pulse pulse generat or outputs are available on pins segdio0/wpulse and segdio1/vpulse , respectively (pins 45 and 44) . the pulses can also be output on opt_tx pin 53 (see opt_txe[1:0] , i/o ram 0x2456[3:2] for details). figure 9 . pulse generator fifo timing 2.3.7 ce functional overview the adc processes one sample per channel per multiplexer cycle. figure 10 shows the timing of the samples taken during one multiplexer cycle with mux_div[3:0] = 7 (i/o ram 0x2100[7:4]) . the number of samples processed during one accumulation cycle is con trolled by the i/o ram register sum_samps[12:0] ( 0x2 1 07[4 :0] and 0x2108[7:0] ). the integration time for each energy output is : sum_samps[12:0] / 2184 .53 , w here 2184 .53 is t he sample rate in hz for example, sum_samps[12:0] = 2184 establish es 2184 multiplexer cycles per accumulation cycle or 2184/2184.53 = 0.9998 seconds . after an accumulation cycle is completed, the xfer_busy interrupt signals to the mpu that accumulated data are available. the slight difference between the nominal length of the accumulation interval (1000 ms) and the actual length of 999.8 ms (0.025%) is accounted for in the ce code and is of no practical consequence. ck32 mux_div conversions ( mux_div =4 is shown) settle adc mux frame mux_sync 150 wpulse s 0 s 1 s 2 s 3 s 4 s 5 ce code rst w_fifo s 0 s 1 s 2 s 3 s 4 s 5 s 0 s 1 s 2 s 3 s 4 s 5 4* pls_interval 2. if wpulse is low longer than ( 2 *pls_maxwidth+1) updates , wpulse will be raised until the next low-going pulse begins. 3. only the wpulse circuit is shown. the varpulse circuit behaves identically. 4. all dimensions are in ck_fir cycles (4.92mhz). 5. if pls_interval =0, fifo does not perform delay. 4* pls_interval 4* pls_interval 4* pls_interval 4* pls_interval 4* pls_interval 1. this example shows how the fifo distributes 6 pulse generator updates over one mux frame. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 29 figure 10 : sam ples from multiplexer cycle (frame ) the end of each multiplexer cycle is signaled to the mpu by the ce_busy interrupt. at th e end of each multiplexer cycle , status information, such as sag data and the digitized input signal, is available to the mpu. figure 11 : accumulation interval figure 11 shows the accumulation interval resulting from sum_samps[12:0] = 1 819 (i/o ram 0x2107[4:0] and 0x2108[7:0] ) , consisting of 1 819 sam ples of 45 7 .8 s each, followed by the xfer_busy interrupt. the sampling in this example is applied to a 50 hz signal. there is no correlation between the line signal frequency and the choice of sum _samps [12:0] . furthermore, sampling does not have to start when the line voltage crosses the zero line, and the length of the accumulation interval need not be an integer mul tiple of the signal cycles. mux state ck32 (32768 hz ) 0 3 1 2 mux_div = 7 conversions settle multiplexer frame (15 x 30.518 s = 457.8 s) s s ia va ib 30.5 s 61.04 s vb 61.04 s ic vc 4 5 6 61.04 s 61.04 s id xfer_busy interrupt to mpu 20ms 833ms 71m6543f/h and 71M6543G/gh data sheet 30 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 2.4 80515 mpu core the 71m6543 include an 80515 mpu (8 - bit, 8051 - compatible) that processes most instructions in one clock cycle. using a 4.9 mhz clock results in a processing throughput of 4.9 mips. the 80515 architecture eliminates redundant bus states and im plements parallel execution of fetch and execution phases. normally , a machine cycle is aligned with a memory fetch, there fore, most of the 1 - byte instructions are performed in a single machine cycle (mpu clock cycle) . this lea ds to an 8x average performance im prove ment (in terms of mips) over the intel ? 8051 device running at the same clock frequency . table 8 shows the ckm pu frequency as a function of the mck clock (19.6608 mhz) divided by the mpu clock divider mpu_div[2:0] (i/o ram 0x2200[2:0]) . actual processor clocking speed can be adjusted to the total pro cessing demand of the application (metering calculations, amr management, memory management, lcd driver management and i/o management) using mpu_div[2:0] , as shown in table 8 . table 8 : ckmpu clock frequencies mpu_div [2:0] ckmpu frequency 000 4.9152 mhz 001 2.4576 mhz 010 1.2288 mhz 011 614.4 k hz 100 307.2 khz 101 110 111 typical measurement and metering functions based on the results provided by the internal 32 - bit com pute engine (ce) are available for the mpu as part of the teridian demonstrati o n code, which is provided to help reduce the product design cycle . 2.4.1 memory organization and addressing the 80515 mpu core incorporates the harvard architecture with separate code and data spaces. mem ory organization in the 80515 is similar to that of the industr y standard 8051. there are three memory areas: program memory (flash, shared by mpu and ce), external ram (data ra m, shared by the ce and mpu, configuration or i/o ram ), and internal data memory (internal ram). table 9 shows the mem ory map. program memory the 80515 can address up to 64 kb of program memory space ( 0x 000 0 to 0xffff ). program memory is read when the mpu fetches instructions or performs a mov c operation. after reset, the mpu starts program execution from program memory location 0x0000. the lower part of the program memory includes reset and interrupt vectors. the interrupt vectors are spaced at 8 - byte in tervals, starting from 0x0003. mpu exte rnal data memory (xram) both internal and external memory is physically located on the 71m6543 device . the e x ternal mem ory referred to in this documentation is only external to the 80515 mpu core. 5 kb of ram starting at address 0x0000 is shared by the ce and mpu. the ce normally uses the first 1 kb, leaving 4 kb for the mpu. different versions of the ce code use varying amounts. consult the documentation for the specific code version being used for the exact limit. if the mpu overwrites the ce?s working ram, the ce?s output may be corrupted. if the ce is dis - abled, the first 0x40 bytes of ram are still unusable while mux_ div[3:0] ? 0 (i/o ram 0x2100[7: 3 ] ) , because the 71m6543 adc writes to these locations. writing mux_ div[3:0] = 0 disables the adc output, preventing the ce from writing the first 0x40 bytes of ram. in addition, mux n _sel [3:0] values must be written only after writing mux_ div[3:0] . 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 31 the 80515 writes into extern al data memory when the mpu executes a movx @ri,a or movx @dptr,a instruction. the mpu reads external data memory by executing a movx a,@ri or movx a,@dptr instruction ( pdata, sfr 0xb f , provides the upper 8 bytes for the movx a,@ri instruction) . internal and external memory map table 9 shows the address, type, use and size of the various memory components. table 9 : memo ry map address (hex) memory technology memory type name typical usage memory size (bytes) 0000- ffff flash memory non- volatile program memory mpu program and non - volatile data 64 kb ce program (on 1 kb boundary) 3 kb max. 0000-13ff static ram volatile external ram (xram) shared by ce and mpu 5 kb 2000-27ff static ram volatile configuration ram ( i/o ram ) hardware control 2 kb 2800-287 f static ram non - volatile (battery) configuration ram ( i/o ram ) battery - buffered memory 128 0000 - 00ff static ram volatile internal ram part of 80515 core 256 movx addressing there are two types of instructions differing in whether they provide an 8 - bit or 16- bit indirect address to the external data ram. in the first type, movx a,@ri, the contents of r0 or r1 in the current register bank provide the eight lower - ordered bits of address. the eight high - ordered bits of the address are specified with the pdata sfr. this method allows the user paged access (256 pages of 256 bytes each) to all ranges of the external data ram. in the second type of movx instruction, movx a,@dptr, the data pointer generates a 16 - bit address. this form is faster and more efficient when accessing very large data arrays (up to 64 kb ), since no additional instructions are needed to set up the eight high ordered bits of the address. it is possible to mix the two movx types. this provides the user with four separate data pointers, two with direct access and two with paged access, to the entire 64 kb of external memory range. dual data pointer the dual data pointer accelerates the block moves of data. the standard dptr is a 16 - bit register that is used to address external memory or peripherals. in the 80515 core, the standard data pointer is called dptr , the second data pointer is called dptr1 . the data pointer select bit, located in the lsb of the dps register ( dps [ 0 ] , sfr 0x92 ) , chooses the active pointer. dptr is selected when dps [0] = 0 and dptr1 is selected when dps [0] = 1. the user switches between pointers by toggling the lsb of the dps register. the values in the data pointers are not affected by the lsb of the dps register. all dptr related instructions use the currently selected dptr for any activity. the second data pointer may not be supported by certain compilers. dptr1 is usefu l for copy routines, where it can make the inner loop of the routine two instructions faster compared to the reloading of dptr from registers . any interrupt routine using dptr1 must save and restore dps , dptr and dptr1 , which increases stack usage and slows down interrupt latency. by selecting the evatronics r80515 core in the keil compiler project settings and by using the compiler directive ?modc2?, dual data pointers are enabled in certain library routines. 71m6543f/h and 71M6543G/gh data sheet 32 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 an alternative data pointer is available in the form of the pdata register ( sfr 0xbf) , sometimes referred to as usr2 ) . it defines the high byte of a 16 - bit address when reading or writing xdata with the instruction movx a,@ri or movx @ri,a. internal data memory map and access the internal data memory provides 256 bytes (0x00 to 0xff) of data memory . the internal data memory address is always 1 byte wide . table 10 shows the internal data memor y map. the special function registers (sfr) occupy the upper 128 bytes . the sfr area of internal data memory is available only by direct addressing . indirect addressing of this area accesses the upper 128 bytes of internal ram . the lower 128 bytes co ntain working registers and bit addressable memory . the lower 32 bytes form four banks of eight registers (r0 -r7) . two bits on the program memory status word ( psw , sfr 0xd0 ) select which bank is in use . the ne xt 16 bytes form a block of bit addressable me mory space at ad dresse s 0x00 - 0x7f . all of the bytes in the lower 128 bytes are accessible through direct or indirect addressing . table 10 : internal data memory map address range direct addressing indirect addressing 0x80 0xff special function registers (sfrs) ram 0x30 0x7f byte addressable area 0x20 0x2f bit addressable area 0x00 0x1f register banks r0?r7 2.4.2 special function registers (sfrs) a map of the special function registers is shown in table 11. only a few addresses in the sfr memory space are occupied, the others are not im plemented. a read access to unimplemented addresses return s undefined data, while a write access ha s no effect. sfrs specific to the 71m6543 are shown in bold print on a gray field . the registers at 0x80, 0x88, 0x90, etc., are bit a ddressable, all others are byte addressable. table 11: special function register map hex/ bin bit addressable byte addressable bin/ hex x000 x001 x010 x011 x100 x101 x110 x111 f8 intbits vstat rcmd spi_cmd ff f0 b f7 e8 iflags ef e0 a e7 d8 wdcon df d0 psw d7 c8 t2con cf c0 ircon c7 b8 ien1 ip1 s0relh s1relh pdata bf b0 p3 flshctl fl_bank pgadr b7 a8 ien0 ip0 s0rell af a0 p2 dir2 dir0 a7 98 s0con s0buf ien2 s1con s1buf s1rell eedata eectrl 9f 90 p1 dir1 dps erase 97 88 tcon tmod tl0 tl1 th0 th1 ckcon 8f 80 p 0 sp dpl dph dpl1 dph1 pcon 87 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 33 2.4.3 generic 80515 special function registers table 12 shows the location, description and reset or power - up value of the generic 80515 sfrs . additional descriptions of the registers can be found at the page numbers listed in the table. table 12: generic 80515 sfrs - location and reset values name address (hex) reset value (hex) description page (s) p0 0x80 0xff port 0 35 sp 0x81 0x07 stack pointer 34 dpl 0x82 0x00 data pointer low 0 34 dph 0x83 0x00 data pointer high 0 34 dpl1 0x84 0x00 data pointer low 1 34 dph1 0x85 0x00 data pointer high 1 34 pcon 0x87 0x00 power reduction modes, uart speed control 35, 38 tcon 0x88 0x00 timer/counter control 41 tmod 0x89 0x00 timer mode control 39 tl0 0x8a 0x00 timer 0, low byte 39 tl1 0x8b 0x00 timer 1, high byte 39 th0 0x8c 0x00 timer 0, low byte 39 th1 0x8d 0x00 timer 1, high byte 39 ckcon 0x8e 0x01 clock control (stretch=1) 35 p1 0x90 0xff port 1 35 dps 0x92 0x00 data pointer select register 31 s0con 0x98 0x00 serial port 0, control register 37 s0buf 0x99 0x00 serial port 0, data buffer 36 ien2 0x9a 0x00 interrupt enable register 2 41 s1con 0x9b 0x00 serial port 1, control register 38 s1buf 0x9c 0x00 serial port 1, data buffer 36 s1rell 0x9d 0x00 serial port 1, reload register, low byte 36 p2 0xa0 0xff port 2 35 ien0 0xa8 0x00 interrupt enable register 0 41 ip0 0xa9 0x00 interrupt priority register 0 43 s0rell 0xaa 0xd9 serial port 0, reload register, low byte 36 p3 0xb0 0xff port 3 35 ien1 0xb8 0x00 interrupt enable register 1 41 ip1 0xb9 0x00 interrupt priority register 1 43 s0relh 0xba 0x03 serial port 0, reload register, high byte 36 s1relh 0xbb 0x03 serial port 1, reload register, high byte 36 pdata 0xbf 0x00 high address byte for movx@ri - also called usr2 31 ircon 0xc0 0x00 interrupt request control register 42 t2con 0xc8 0x00 polarity for int2 and int3 42 psw 0xd0 0x00 program status word 34 wdcon 0xd8 0x00 baud rate control register (only wdcon[ 7 ] bit used) 36 a 0xe0 0x00 accumulator 34 b 0xf0 0x00 b register 34 71m6543f/h and 71M6543G/gh data sheet 34 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 accumulator ( acc , a , sfr 0x e0 ): acc is the accumulator register . most instructions use the accumulator to hold the operand . the mnemonics for accumulator - specific instructions refer to accumulator as a , not acc . b register ( sfr 0xf0): the b register is used during multiply and divide instructions . it can also be used as a scratch - pad register to hold temporary data. program status word ( psw , sfr 0xd0 ): this register contains various flags and control bits for the selection of the register banks (see table 13). table 13: psw bit functions ( sfr 0xd0) psw bit symbol function 7 cv carry flag . 6 ac auxiliary carry flag for bcd operations . 5 f0 general purpose flag 0 available for user. f0 is not to be confused with the f0 flag in the cestatus register. 4 rs1 register bank select control bits . the contents of rs1 and rs0 select the working register bank: rs1/rs0 bank selected location 00 bank 0 0x00 ? 0x07 01 bank 1 0x08 ? 0x0f 10 bank 2 0x10 ? 0x17 11 bank 3 0x18 ? 0x1f 3 rs0 2 ov overflow flag . 1 ? user defined flag . 0 p parity flag, affecte d by hardware to indicate odd or even number of one bits in the accumulator, i.e. even parity. s tack pointer (sp , sfr 0x8 1) : the stack pointer is a 1 - byte register initialized to 0x07 after reset . this register is incremented before push and call instructions, causing the stack to begin at location 0x08. data pointer: the data pointer s ( dptr and dprt1 ) are 2 bytes wide. the lower part is dpl (sfr 0x82) and dpl1 (sfr 0x84), respectively . t he highest is d ph (sfr 0x83) and dph1 (sfr 0x85), respectively . the data pointers can be loaded as two registers (e.g. mov dpl,#data8). they are generally used to access external code or data space (e.g. movc a,@a+dptr or movx a,@dptr respectively). program counter: the program counter ( pc ) is 2 bytes wide and initialized to 0x0000 after reset . this register is incremented when fetching operation code or when operating on data from program memory . port registers: segdio0 through segdio15 are controlled by special function registers p0 , p1 , p2 , and p3 as shown in table 14. a bove segdio15, the lcd _ segdion [ ] registers in i/o ram are used. since the direction bits are contained in the upper nibble of each sfr pn register and the dio bits are contained in the lower nibble, it is possible to configure the direction of a given dio pin and set its ou t put value wit h a single write operation, thus facilitating the implementation of bit - banged interfaces. writing a 1 to a dio_dir bit configures the corresponding dio as an output, while writing a 0 configures it as an input. writing a 1 to a dio bit causes the correspo nding pin to be at hi gh level (v3p3) , while w riting a 0 causes the corresponding pin to be held at a low level (gnd) . see 2.5.10 digital i/o for additional details. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 35 table 14 : port registers (segdio0 -15) sfr name sfr address d7 d6 d5 d4 d3 d2 d1 d0 p0 80 dio_dir[3:0] dio[3:0] p1 90 dio_dir[ 7 : 4 ] dio[7:4] p2 a0 dio_dir[ 11: 8 ] dio[11:8] p3 b0 dio_dir[ 15: 12] dio[15:11] all dio ports on the chip are bi - directional . each of them consists of a l atch (sfr p0 to p3 ) , an output driver and an input buffer, therefore the mpu can output or read data through any of these ports . even if a dio pin is configured as an output, the state of the pin can still be read by the mpu, for example when counting pulses issued via dio pins that are under ce control. at power - up segdio0- 15 are configured as inputs. it is necessary to write port_e = 1 ( i/o ram 0x270c[5] ) to enable seg dio0 - dio15. the default port_e = 0 blocks any momentary output transient pulse s that would otherwise occur when segdio0 - 15 are reset on power -up. clock stretching ( ckcon[2:0], sfr 0x8e ) the ckcon[2:0] field define s the stretch memor y cycles that are used for movx instructions when access ing external peripherals. the practical value of this register for the 71m6543 is to guarantee access to xram between ce, mpu, and spi . the default setting of ckcon[2:0] (001) should be changed to 000 for best performance. table 15 shows how the signals of the external memory interface change when stretch values are set from 0 to 7. the widths of the signals are counted in mpu clock cycles. the post - reset state of the ckcon[2:0] field (001) , which is shown in bold in the table, performs the movx instructions with a stretch value equal to 1. table 15 : stretch memory cycle width ckcon[2:0] stretch value read s ignal w idth write s ignal w idth memaddr memrd memaddr memwr 000 0 1 1 2 1 001 1 2 2 3 1 010 2 3 3 4 2 011 3 4 4 5 3 100 4 5 5 6 4 101 5 6 6 7 5 110 6 7 7 8 6 111 7 8 8 9 7 2.4.4 instruction set all instructions of the generic 8051 microcontroller are supported . a complete list of the instruction set and of the associated op - codes is contained in the 71m654 x software user?s guide (sug) . 2.4.5 80515 power reduction modes the 8051 5 core provides two power reduction modes : idle mode and power -down m ode. these power saving modes are invoked by setting the appropriate control bit in the pcon sfr register ( sfr 0x87 ). idle mode halts the mpu while allowing the interrupt, timer, and serial port functions to continue to operat e . once idle mode has been entered, an interrupt event automatically ends idle mode . after the interrupt has been serviced, program execution continues with the instruction immediately following the instruction that set the idle mode bit. t o enter idle mode, the firmware must set the idl bit (bit 0) in the pcon sfr register ( sfr 0x87 ). 71m6543f/h and 71M6543G/gh data sheet 36 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 the mpu core p ower consumption can be significantly reduced by the proper use of i dle mode. the amount of power saved depends on the percentage of time spent in idle mode. since some interrupts may occur frequently, thus ending idle mode, o ne method to maximize power savings using idle mode, is to employ a software loop in the main background routine at a point where the mpu background processing may be permitted to idle. this loop invokes idle mode while testing a bit to exit the loop . frequently occurring interrupts end idle mode, but idle mode is immediately re - entered when control is re turned to the idle loop. to exit th e idle loop, an interrupt must occur, and the associate d interrupt service routine must set the bit that terminates the idle loop execution. power - down mode halts the m pu and its peripherals. power - down mode is ended by either a hardware reset or an external inter rupt event . to enter power - down mode, the firmw are must set the pd bit (bit 1) in the pcon sfr register ( sfr 0x87 ). table 16 . 80515 pcon sfr register ( sfr 0x87 ) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 smod - - - - - pd idl note s : the smod bit is not related to power management. see 2.4.6 uarts below for information on the smod bit. 2.4.6 uarts the 71m6543 include a uart (uart0) that can be programmed to communicate with a variety of amr modules and other external devices . a second uart (uart1) is connected to the optical port, as described in the 2.5.9 uart and optical interfa ce on page 57. the uarts are dedicated 2 - wire serial interfaces, which can communicate with an extern al host processor at up to 38,400 bits/s (with mpu clock = 1.2288 mhz) . the operation of the rx and tx uart0 pins is as follows: ? uart0 rx: serial input data are applied at this pin . conforming to rs - 232 standard, the bytes are input lsb first. ? uart0 tx : this pin is used to output the serial data . the bytes are output lsb first. the 71m6543 has several uart - related registers for the control and buffering of serial data . a single sfr register serves as both the transmit buffer and receive buffer ( s0buf , s fr 0x99 for uart0 and s1buf , sfr 0x9c for uart1). when written by the mpu, sxbuf acts as the transmit buffer, and when read by the mpu, it acts as the receive buffer. writing data to the transmit buffer starts the transmission by the associated uart. re ce ived data are available by reading from the receive buffer. both uarts can simultaneously transmit and receive data. wdcon [7] (sfr 0xd8) selects whether timer 1 or the internal baud rate generator is used . all uart transfers are pro grammable for parity enable, parity, 2 stop bits/1 stop bit and xon/xoff options for variable commu nication baud rates from 300 to 38400 bps . table 17 shows how the baud ra tes are calculated . table 18 shows the selectable uart operation modes. table 17 : baud rate generation using timer 1 ( wdcon[7] = 0) using internal baud rate generator ( wdcon[7] = 1) uart0 2 smod * f ckmpu / (384 * (256 - th1)) 2 smod * f ckmpu /(64 * (2 10 - s0rel )) uart1 n/a f ckmpu /(32 * (2 10 - s1rel )) s0rel and s1rel are 10 - bit values derived by combining bits from the respective timer reload registers . ( s0rell, s0relh, s1rell, s1relh are sfr 0xaa, sfr 0xba, sfr 0x9d and sfr 0xbb , respectively) smod is the smod bit in the sfr pcon register ( sfr 0x87 ). th1 (sfr 0x8d) is the high byte of timer 1. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 37 table 18 : uart modes uart 0 uart 1 mode 0 n/a start bit, 8 data bits, parity, stop bit, variable baud rate (internal baud rate generator) mode 1 start bit, 8 data bits, stop bit, variable baud rate (internal baud rate generator or timer 1) start bit, 8 data bits, stop bit, variable baud rate (internal baud rate generator) mode 2 start bit, 8 data bits, parity, stop bit, fixed baud rate 1/32 or 1/64 of f ckmpu n/a mode 3 start bit, 8 data bits, parit y, stop bit, va riable baud rate (internal baud rate generator or timer 1) n/a parity of serial data is available through the p flag of the accumulator . 7 - bit serial modes with parity, such as those used by the flag protocol, can be simulated by setting and reading bit 7 of 8 - bit output data. 7 - bit serial modes without parity can be simulated by setting bit 7 to a constant 1 . 8 - bit serial modes with parity can be simulated by setting and reading the 9 th bit, using the control bits tb80 ( s0con[ 3 ] ) and tb81 ( s1con [3] ) in the s0co n ( sfr 0x98 ) and s1con ( sfr 0x9b ) registers for transmit and rb81 ( s1con [2] ) for receive operations . all supported operation modes use oversampling for the incoming bit stream when receiving data. each bit is sampled three times at the projected middle of the bit duration. this technique allows for deviations of the received baud rate from nominal of up to 3.5%. the feature of receivi ng 9 bits (mode 3 for uart0, mode a for uart1) can be used as handshake signals for inter - processor communication in multi - processor systems. in this case, the slave processors have bit sm20 ( s0con[5] ) for uart0, or sm21 ( s1con[5] for uart1, set to 1. when the master processor outputs the slave?s address, it sets the 9 th bit to 1, causing a serial port receive interrupt in all the slaves. the slave processors compare the received byte with their address. if there is a match, the addressed slave clear s sm20 or sm21 and receive the rest of the message. the rest of the slave s ignore the message. after addressing the slave, the host outputs the rest of the message with the 9 th bit set to 0, so no additional serial port receive interrupts is generated. uart contr ol registers: the function s of uart0 and uart1 depend on the setting of the serial port control register s s0con and s1con shown in table 19 and table 20 , respectively , and the pcon register shown in table 21. since the ti0 , ri0 , ti1 and ri1 bits are in an sfr bit addressable byte, common practice would be to clear them with a bit operation, but this must be avoided . the hardware implements bit operations as a byte wide read - modify - write hardware macro. if an interrupt occurs after the read, but before the write, its flag is cleared un intentionally. the proper way to clear these flag bits is to write a byte mask consisting of all ones except for a zero in the location of the bit to be cleared. the flag bits are configured in hardware to ignore ones written to them. table 19 : the s0con (uart0) register ( sfr 0x98 ) bit symbol function s0con [7] sm0 the sm0 and sm1 bits set the uart0 mode: mode description sm0 sm1 0 n/a 0 0 1 8 - bit uart 0 1 2 9 - bit uart 1 0 3 9 - bit uart 1 1 s0con [6] sm1 s0con [5] sm20 enables the inter - processor communication feature. s0con[4] ren0 if set, enables serial reception. cleared by software to disable reception. 71m6543f/h and 71M6543G/gh data sheet 38 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 bit symbol function s0con[3] tb80 the 9th transmitted data bit in modes 2 and 3. set or cleared by the mpu, depending on the function it performs (parity check, multiprocessor communication etc.) s0con[2] rb80 in m odes 2 and 3 it is the 9 th data bit received. in mode 1, sm20 is 0, rb80 is the stop bit. in mode 0, this bit is not used. must be cleared by software. s0con[1] ti0 transmit interrupt flag; set by hardware after completion of a serial transfer. must be cleared by software (see caution above) . s0con[0] ri0 receive interrupt flag; set by hardware after completion of a serial reception. must be cleared by software (see caution above) . table 20 : the s1con (uart1) register (sfr 0x9 b) bit symbol function s1con[7] sm sets the baud rate and mode for uart1. sm mode description baud rate 0 a 9 - bit uart variable 1 b 8 - bit uart variable s1con[5] sm21 enables the inter - processor communication feature. s1con[4] ren1 if set, enables serial reception. cleared by software to disable reception. s1con[3] tb81 the 9 th transmitted data bit in mode a. set or cleared by the mpu, de pending on the function it performs (parity check, multiprocessor communication etc.) s1con[2] rb81 in modes a and b, it is the 9 th data bit received. in mode b, if sm21 is 0, rb81 is the stop bit. must be cleared by software s1con[1] ti1 transmit interrupt flag, set by hardware after completion of a serial transfer. must be cleared by software (see caution above). s1con[0] ri1 receive interrupt flag, set by hardware after completion of a serial reception. must be cleared by software (see caution above). table 21: pcon register bit description ( sfr 0x87 ) bit symbol function pcon[7] smod the smod bit doubles the baud rate when set 2.4.7 timers and counters the 80515 has two 16 - bit timer/counter registers: timer 0 and timer 1 . these registers can be configured for counter or timer operations. in timer mode, the register is incremented every machine cycle, i.e. it counts up once for every 12 periods of the mpu clock. in counter mode, the register is incremented when the falling edge is observed at the corres ponding input signal t0 or t1 (t0 and t1 are the timer gating inputs derived from certain dio pins, see 2.5.10 digital i/o ) . since it takes 2 machine cycles to recognize a 1 - to - 0 event, the maximum input count rate is 1/2 of the cl o ck frequency (ckmpu) . there are no restrictions on the duty cycle, how ever to ensure proper recognition of the 0 or 1 state, an input should be stable for at least 1 machine cycle. four operating modes can be selected for timer 0 and timer 1 , as shown in table 22 and table 23. the tmod ( sfr 0x89 ) r egister, shown in table 24, is used to select the appropriate mode. the timer/counter operation is controlled by the tcon ( sfr 0x88 ) r egister, which is shown in table 25. bits tr1 ( tcon [6] ) and tr0 ( tcon [4] ) in the tcon register start their associated timers when set. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 39 table 22: timers/counters mode description m1 m0 mode function 0 0 mode 0 13 - bit counter/timer mode with 5 lower bits in the tl0 or tl1 ( sfr 0x8a or sfr 0x8b ) register and the remaining 8 bits in the th0 or th1 ( sfr 0x8c or sfr 0x8d ) register (for timer 0 and timer 1, respectively) . the 3 high order bits of tl0 and tl1 are held at zero. 0 1 mode 1 16- bit counter/timer mode . 1 0 mode 2 8 - bit auto- reload counter/timer . the reload value is kept in th0 or th1 , while tl0 or tl1 is incremented every machine cycle . when tl( x) overflows, a value from th( x) is copied to tl (x) (where x is 0 for counter/timer 0 or 1 for counter/timer 1 . 1 1 mode 3 if tim er 1 m1 and m0 bits are set to 1 , timer 1 stops . if tim er 0 m1 and m0 bits are set to 1 , timer 0 acts as two in dependent 8 - bit timer/counters. in mode 3, tl0 is affected by tr0 and gate control bits, and sets the tf0 flag on overflow, while th0 is affected by the tr1 bit, and the tf1 flag is set on overflow. table 23 specifies the combinations of operation modes allowed for timer 0 and timer 1. table 23 : allowed timer /counter mode combinations timer 1 mode 0 mode 1 mode 2 timer 0 - mode 0 yes yes yes timer 0 - mode 1 yes yes yes timer 0 - mode 2 not allowed not allowed yes table 24: tmod register bit description (sfr 0x89) bit symbol function timer/counter 1 : tmod[7] gate if tmod[7] is set, external input signal co ntrol is enabled for counter 1 . the tr0 bit in the tcon register ( sfr 0x88 ) must also be set in order for counter 0 to increment. with these settings, counter 0 increment s on every falling edge of the logic signal applied to one or more of the segdio2 - 11 pins, as specified by the contents of the dio_r2 through dio_r11 registers. see 2.5.10 digital i/o and lcd segment drivers and table 47. tmod[6] c/t selects timer or counter operation. when set to 1, a counter operation is performed. when cleared to 0, the corresponding register function s as a timer. tmod[5:4] m1:m0 selects the mode for timer/counter 0 as shown in table 22 . timer/counter 0 tmod[3] gate if tmod[ 3 ] is set, external input signal control is enabled for counter 0 . the tr1 bit in the tcon register ( sfr 0x88 ) must also be set in order for counter 1 to increment. with these settings, counter 1 increment s on every falling edge of the logic signal applied to one or more of the segdio2 - 11 pins, as specified by the contents of the dio_r2 through dio_r11 registers. see 2.5.10 digital i/o and lcd segment drivers and table 47. tmod[2] c/t selects timer or c ounter operation. when set to 1, a c ounter operation is performed. when cleared to 0, the correspondi ng register function s as a t imer. tmod[1:0] m1:m0 selects the mode for timer/counter 1, as shown in table 22 . 71m6543f/h and 71M6543G/gh data sheet 40 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 table 25 : the tcon register bit functions (sfr 0x88) bit symbol function tcon[7] tf1 the timer 1 overflow flag is set by hardware when timer 1 overflows. this flag can be cleared by software and is automatically cleared when an interrupt is processed. tcon[6] tr1 timer 1 run control bit. if cleared, timer 1 stops. tcon[5] tf0 timer 0 overflow flag set by hardware when timer 0 overflows. this flag can be cleared by software and is automatically cleared when an interrupt is processed. tcon[4] tr0 timer 0 run control bit. if cleared, timer 0 stops. tcon[3] ie1 interrupt 1 edge flag is set by hardware when the falling edge on external pin int1 is observed. cleared when an interrupt is processed. tcon[2] it1 interrupt 1 type control bit. selects either the falling edge or low level on input pin to cause an interr upt. tcon[1] ie0 interrupt 0 edge flag is set by hardware when the falling edge on external pin int0 is observed. cleared when an interrupt is processed. tcon[0] it0 interrupt 0 type control bit. selects either the falling edge or low level on input pin to cause interrupt. 2.4.8 wd timer (software watchdog timer) there is no int ernal software watchdog timer . use the standard hardware watchdog timer instead (see 2.5.13 hardware watchdog timer ). 2.4.9 interrupts the 80515 provides 11 interrupt sources with four priority levels . each source has its own inte rrupt r equest flag(s) located in a special function register ( tcon , ircon , and scon ). each interrupt requested by the corresponding flag can be individually enabled or disabled by the enable bits in ien0 (sfr 0xa8) , ien1 (sfr 0xb8) , and ien2 (sfr 0x9a) . figure 12 shows the device interrupt structure. referring to figure 12, interrupt sources can originate from within the 80515 mpu core (referred to as in ternal sources) or can originate from other parts of the 71m654 3 soc (referred to as external sources). ther e are seven external interrupt sources, as seen in the leftmost part of figure 12 , and in table 26 and table 27 (i.e., ex0 - ex6 ). i nterrupt overview when an interrupt occurs, the mpu vector s to the predetermined address as shown in table 38. once the interrupt service has begun, it can be interrupted only by a higher priority interrupt . the interrupt service is terminated by a return from instruction, reti . when an reti is pe rformed, the processor returns to the instruction that would have been next when the interrupt occurred. when the interrupt condition occurs, the processor also indicate s this by setting a flag bit . this bit is set regardless of whether the interrupt is enabled or disabled . each interrupt flag is sampled once per machine cycle, then samples are polled by the hardware . if the sample indicates a pending interrupt when the interrupt is enabled, then the interrupt request flag is set . on the next instructi on cycle, the interrupt is acknowledged by hardware forcing an lcall to the appropriate vector address, if the following conditions are met: ? no interrupt of equal or higher priority is already in progress. ? an instruction is currently being executed and is not completed. ? the instruction in progress is not reti or any write access to the registers ien0 , ien1 , ien2 , ip0 or ip1 . special function registers for interrupts the following sfr registers control the interrupt functions: ? the interrupt enable registers : ien0, ien1 and ien2 (see table 26 , table 27 and table 28 ) . 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 41 ? the timer/counter control registers, tcon and t2con (see table 29 and table 30 ). ? the interrupt request r egister , ircon (see table 31). ? the interrupt priority regis ters: ip0 and ip1 (see table 36). table 26 : the ien0 bit functions (sfr 0xa8) bit symbol function ien0 [7] eal eal = 0 disable s all interrupts . ien0 [6] wdt not used for interrupt control . ien0 [5] ? not used. ien0 [4] es0 es0 = 0 disable s serial channel 0 interrupt . ien0 [3] et1 et1 = 0 disable s timer 1 overflow interrupt . ien0 [2] ex1 ex1 = 0 disable s external interrupt 1 . ien0 [1] et0 et0 = 0 disable s timer 0 overflow interrupt . ien0 [0] ex0 e x0 = 0 disable s external interrupt 0 . table 27 : the ien1 bit functions (sfr 0xb8) bit symbol function ien1 [7] ? not used. ien1 [6] ? not used. ien1 [5] ex6 ex6 = 0 disable s external interrupt 6 . ien1 [4] ex5 ex5 = 0 disable s external interrupt 5 . ien1 [3] ex4 ex4 = 0 disable s external interrupt 4 . ien1 [2] ex3 ex3 = 0 disable s external interrupt 3 . ien1 [1] ex2 ex2 = 0 disable s external interrupt 2 . ien1 [0] ? not used. table 28 : the ien2 bit functions (sfr 0x9a) bit symbol function ien2[0] es1 es1 = 0 disable s the serial channel 1 interrupt . table 29: tcon bit functions (sfr 0x88) bit symbol function tcon[7] tf1 timer 1 overflow flag . tcon[6] tr1 not used for interrupt control . tcon[5] tf0 timer 0 overflow flag . tcon[4] tr0 not used for interrupt control . tcon[3] ie1 external interrupt 1 flag . tcon[2] it1 external interrupt 1 type control bit : 0 = interrupt on low level. 1 = interrupt on falling edge. tcon[1] ie0 external interrupt 0 flag tcon[0] it0 external interrupt 0 type control bit : 0 = interrupt on low level. 1 = interrupt on falling edge. 71m6543f/h and 71M6543G/gh data sheet 42 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 table 30 : the t2con b it functions (sfr 0xc8) bit symbol function t2con[7] ? not used. t2con[6] i3fr polarity control for int3: 0 = falling edge. 1 = rising edge. t2con[5] i2fr polarity control for int2: 0 = falling edge. 1 = rising edge. t2con[4:0] ? not used. table 31 : the ircon bit functions (sfr 0xc0) bit symbol function ircon[7] ? not used ircon[6] ? not used ircon[5] iex6 1 = external interrupt 6 occurred and has not been cleared. irco n[4] iex5 1 = external interrupt 5 occurred and has not been cleared. ircon[3] iex4 1 = external interrupt 4 occurred and has not been cleared. ircon[2] iex3 1 = external interrupt 3 occurred and has not been cleared. ircon[1] iex2 1 = external interrupt 2 occurred and has not been cleared. ircon[0] ? not used. tf0 and tf1 (timer 0 and t imer 1 overflow flag s ) is automatically cleared by hardware when the service routine is called (signals t0ack and t1ack ? port isr ? active high when the service routine is called ). external mpu interrupts the seven e xternal interrupts are the interrupts external to the 80515 core, i.e. signals that originate in other parts of the 71m6543 , for example the ce, dio, rtc , or eeprom interface. the external interrupts are connected as shown in table 32 . the po larity of interrupts 2 and 3 is programmable in the mpu via the i3fr and i2fr bits in t2con (sfr 0xc8) . i nterrupts 2 and 3 should be programmed for falling sensitivity ( i3fr = i2fr = 0). the generic 8051 mpu literature states that interrupts 4 through 6 are defined as rising - edge sensitive. thus, the hardware signals attached to interrupts 5 and 6 are in ver ted to achieve the edge polarity shown in table 32. table 32 : external mpu interrupts external interrupt connection polarity flag reset 0 digital i/o see 2.5.10 automatic 1 digital i/o see 2.5.10 automatic 2 ce_pulse rising automatic 3 ce_busy falling automatic 4 vstat ( vstat[2:0] changed ) rising automatic 5 eeprom busy (falling), spi (rising) automatic 6 xfer_busy (falling), rtc_1sec, rtc_1min, rtc_ t falling manual external interrupt 0 and 1 can be mapped to pins on the device using dio resource maps. see 2.5.10 digital i/o for more information. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 43 sfr enable bits must be set to permit any of these interrupts to occur . likewise, each interrupt has its own flag bit, which is set by the interrupt hardware, and r eset by the mpu interrupt handler . xfer_busy, rtc_1sec, rtc_1min , rtc_ t , spi, pllrise and pllfall have their own enable and flag bits in addition to the interrupt 6, 4 and enable and flag bits (see table 33 : interrupt enable and flag bits ) . ie0 through iex6 are cleared automatically when the hardware vectors to the interrupt handler . the other flags, ie_xfer through ie_ vpulse , are cleared by wri ting a zero to them . since these bits are in an sfr bit addressable byte, common practice would be to clear them with a bit operation, but this must be avoided . the hardware implements bit operations as a byte wide read - modify - write hardware macro. if an interrupt occurs after the read, but before the write, its flag is cleared un intentionally . the proper way to clear the flag bits is to write a byte mask consisting of all ones except for a zero in the location of the bit to be cleared . the flag bit s are configured in hardware to ignore ones written to them. table 33: interrupt enable and flag bits interrupt enable interrupt flag interrupt description n ame l ocation name location ex0 sfr a8[[0] ie0 sfr 88[1] external interrupt 0 ex1 sfr a8[2] ie1 sfr 88[3] external interrupt 1 ex2 sfr b8[1] iex2 sfr c0[1] external interrupt 2 ex3 sfr b8[2] iex3 sfr c0[2] external interrupt 3 ex4 sfr b8[3] iex4 sfr c0[3] external interrupt 4 ex5 sfr b8[4] iex5 sfr c0[4] external interrupt 5 ex6 sfr b8[5] iex6 sfr c0[5] external interrupt 6 ex_xfer ex_rtc1s ex_rtc1m ex_rtc t ex_spi ex_eex ex_xpulse ex_ypulse ex_wpulse ex_vpulse 2700[0] 2700[1] 2700[2] 2700[4] 2701[7] 2700[7] 2700[6] 2700[5] 2701[6] 2701[5] ie_xfer ie_rtc1s ie_rtc1m ie_rtc t ie_spi ie_eex ie_xpulse ie_ypulse ie_wpulse ie_vpulse sfr e8[0] sfr e8[1] sfr e8[2] sfr e8[4] sfr f8[7] sfr e8[7] sfr e8[6] sfr e8[5] sfr f8[4] sfr f8[3] xfer_busy interrupt (int 6) rtc_1sec interrupt (int 6) rtc_1min interrupt (int 6) rtc_ t interrupt (int 6) spi interrupt eeprom interrupt ce_xpulse interrupt (int 2) ce_ypulse interrupt (int 2) ce_wpulse interrupt (int 2) ce_vpulse interrupt (int 2) interrupt priority level structure all interrupt sources are combined in groups, as shown in table 34. table 34: interrupt priority level groups group group mem bers 0 external interrupt 0 serial channel 1 interrupt ? 1 timer 0 interrupt ? external interrupt 2 2 external interrupt 1 ? external interrupt 3 3 timer 1 interrupt ? external interrupt 4 4 serial channel 0 interrupt ? external interrupt 5 5 ? ? external interrupt 6 each group of interrupt sources can be programmed individually to one of four priority levels (as shown in table 35) by setting or clearing one bit in the sfr interrupt priority register ip0 ( sfr 0xa9 ) and one in 71m6543f/h and 71M6543G/gh data sheet 44 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 ip1 (sfr 0xb9) ( table 36) . if requests of the same priority level are received simultaneously, an internal polling sequence as shown in table 37 determines which request is serviced first. changing interrupt priorities while interrupts are enabled can easily cause software defects. it is best to set the interrupt priority registers only once during initializati on before interrupts are enabled. table 35 : interrupt priority levels ip1 [x ] ip0 [x ] priority level 0 0 level 0 (lowest) 0 1 level 1 1 0 level 2 1 1 level 3 (highest) table 36 : interrupt priority registers ( ip0 and ip1 ) register address bit 7 (msb) bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 (lsb) ip0 sfr 0xa9 ? ? ip0[5] ip0[4] ip0[3] ip0[2] ip0[1] ip0[0] ip1 sfr 0xb9 ? ? ip1[5] ip1[4] ip1[3] ip1[2] ip1[1] ip1[0] 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 45 table 37 : interrupt polling sequence external interrupt 0 polling sequence serial channel 1 interrupt timer 0 interrupt external interrupt 2 external interrupt 1 external interrupt 3 timer 1 interrupt external interrupt 4 serial channel 0 interrupt external interrupt 5 external interrupt 6 interrupt sources and vectors table 38 shows the interrupts with their associated flags and vector addresses. table 38 : interrupt vectors interrupt request flag description interrupt vector address ie0 external interrupt 0 0x0003 tf0 timer 0 interrupt 0x000b ie1 external interrupt 1 0x0013 tf1 timer 1 interrupt 0x001b ri0/ti0 serial channel 0 interrupt 0x0023 ri1/ti1 serial channel 1 interrupt 0x0083 iex2 external interrupt 2 0x004b iex3 external interrupt 3 0x0053 iex4 external interrupt 4 0x005b iex5 external interrupt 5 0x0063 iex6 external interrupt 6 0x006b 71m6543f/h and 71M6543G/gh data sheet 4 6 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 figure 12 : interrupt structure tcon. 1 ( ie 0 ) individual enable bits s 1 con. 0 ( ri 1 ) s 1 con. 1 ( ti1 ) individual flags internal source > = 1 tcon. 5 ( tf 0 ) tcon. 3 ( ie 1 ) tcon. 7 ( tf 1 ) s 0 con. 0 ( ri 0 ) s 0 con. 0 ( ti0 ) > = 1 ircon . 1 ( iex 2 ) i 2 fr ircon . 2 ( iex 3 ) i 3 fr ircon . 3 ( iex 4 ) ircon . 4 ( iex 5 ) ircon . 5 ( iex 6 ) ien0 . 7 ( eal) ip1 . 0 / ip0 . 0 ip1 . 1 / ip0 . 1 ip1 . 2 / ip0 . 2 ip1 . 3 / ip0 . 3 ip1 . 4 / ip0 . 4 ip1 . 5 / ip0 . 5 interrupt flags priority assignment interrupt vector polling sequence interrupt enable logic and polarity selection dio timer 0 dio timer 1 ce_busy uart0 eeprom xfer _ busy rtc_1s ex_rtc1s vstat rtc_t ex_rtct xpulse external source dio_ rn dio_ rn spi > = 1 ex_vpulse vpulse > = 1 ien2 . 0 ( es1 ) ien0 . 1 ( et0 ) ien0 . 0 ( ex0 ) ien1 . 1 ( ex2 ) ien0 . 2 ( ex1 ) ien1 . 2 ( ex3 ) ien0 . 3 ( et1 ) ien1 . 3 ( ex4 ) ien0 . 4 ( es0 ) ien1 . 4 ( ex5 ) ien1 . 5 ( ex6 ) ie_xfer ie_rtc1s ie_rtct ex_xfer > = 1 ex_eex ex_spi ie_eex ie_spi it 0 ie_xpulse ie_vpulse ex_xpulse rtc_1m ex_rtc1m ie_rtc1m uart1 ( optical) 0 2 1 3 4 5 6 no. flag= 1 means that an interrupt has occurred and has not been cleared ex0 ? ex6 are cleared automaticallywhen the hardware vectors to the interrupt handler byte received byte transmitted overflow occurred overflow occurred byte received byte transmitted accumulation cycle completed alarm clock supply status changed ce completed code run and has new status information dio status changed dio status changed ce detected sag every second every minute busy fell command received wpulse ypulse ex_wpulse ex_ypulse ie_ypulse ie_wpulse ce detected zero crossing wh pulse varh pulse 3 / 19/ 2010 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 47 2.5 on - chip resources 2.5.1 physical memory 2.5.1.1 flash memory the device includes 64 kb (71m6543f/h) or 128 kb (71M6543G/gh) of on - chip flash memory. the flash memory primarily contains mpu and ce program code. it also contains images of the ce ram and i/o ram. on power - up, be fore enabling the ce, the mpu copies these images to their respective locations. f lash space allocat ed for the ce program is limited to 4096 16- bit words ( 8 kb). t he ce program must begin on a 1 - kb boundary of the flash address space. the ce_lctn[6/5:0] ( i/o ram 0x2109[5:0] ) field on the 71m6543f/h and the ce_lctn[ 6 :0] ( i/o ram 0x2109[6 :0] ) field on th e 71M6543G/gh define which 1 - kb boundary contains the ce code. thus, the first ce instruction is located at 1024* ce_lctn[6/5:0] on the 71m6543f/h and at 1024* ce_lctn[ 6 :0] on the 71M6543G/gh. flash memory can be accessed by the mpu, the ce, and by the spi interface (r/w). table 39 : flash memory access access by access type condition mpu r/w/e w/e only if ce is disabled. ce r spi r/w /e access only when sfm is invoked (mpu halted). flash write procedures if the flsh_unlock [3:0] (i/o ram 0x2702[7:4]) key is correctly programmed, the mpu may write to the flash memory. this is one of the non - volatile storage options available to the user in addition to external eeprom . the flash program write enable bit, flsh_pstwr (sfr 0xb2[0]), differentiates 80515 data store instructions (movx@dptr,a) between flash and xram writes. this bit is automatically cleared by hardware after each byte write operation. write operations to this bit are inhibited when interrupts are enabled. if the ce is enabled ( ce_e = 1 , i/o ram 0x2106[0] ), flash write operations must not be attempted unless flsh_ pstwr is set. this bit enables the ?posted flash write? capability. flsh_ pstwr has no effect when ce_e = 0). when ce_e = 1, however, flsh_ pstwr delay s a flash write until the time interval betw een the ce code passes. during this delay time, the flsh_pend ( sfr 0xb2[3] ) bit is high, and the mpu continue s to execute commands. when the ce code pass ends (ce_busy falls), the flsh_pend bit fall s and the write operation occur s . the mpu can query the flsh_pend bit to determine when the write operation has been completed. while flsh_pend = 1, further flash write re quests are ignored. updating individual bytes in flash m emory the original state of a flash byte is 0xff (all b its are 1 ). once a value other than 0xff is written to a flash memory cell, over writing with a different value usually requires that the cell be erased first. since cells cannot be erased individually, the page has to be first copied to ram, followed by a page erase. after this, the page can be updated in ram and then written back to the flash memory. flash erase procedures flash erasure is initiated by writing a specific data pattern to specific sfr registers in the proper sequence. these special patt ern/sequence requirements prevent inadvertent erasure of the flash memory. the mass erase sequence is: ? write 1 to the flsh_meen bit ( sfr 0xb2[1] ). ? write the pattern 0xaa to the flsh_erase ( sfr 0x94 ) register . the mass erase cycle can only be initiated when the ice port is enabled. 71m6543f/h and 71M6543G/gh data sheet 48 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 the page erase sequence is: ? write the page address to flsh_pgadr [ 5 :0] ( sfr 0xb7[7: 2 ] ) . ? write the pattern 0x55 to the flsh_erase register ( sfr 0x94) . bank - switching in the 71M6543G/gh the 128 kb program memory in the 71M6543G/gh consists of a fixed lower bank of 32 kb, addressable at 0x0000 to 0x7fff plus an upper banked area of 32 kb, addressable at 0x8000 to 0xffff. the i/o ram register fl_bank [1:0] (sfr 0xb6[1:0]) is used to switch four memory banks of 32 kb ea ch into the address range from 0x8000 to 0xffff. note that when fl_bank[1:0] (sfr 0xb6[1:0]) = 0, the upper bank is the same as the lower bank. table 40 : bank switching with fl_bank[1:0] (sfr 0xb6[1:0]) in the 71M6543G/gh 71M6543G/gh fl_bank[1:0] address range for lower bank (0x0000 - 0x7fff) address range for upper bank (0x8000 - 0xffff) 00 0x0000 - 0x7fff 0x0000 - 0x7fff 01 0x0000 - 0x7fff 0x8000 - 0xffff 10 0x0000 - 0x7fff 0x10000 - 0x17fff 11 0x0000 - 0x7fff 0x18000 - 0x1ffff in the 71M6543G/gh, t he address that the flsh_pgadr[6:0] (sfr 0x b7[7:1]) points to in the program address space can reference different flash memory locations, depending on the setting of the fl_bank[1:0] (sfr 0x b6[1:0]) bits. the ce_lctn[ 6:0] ( i/o ram 0x2109[6 :0] ) field on the 71M6543G/gh on the other hand, point s directly to a location in the flash memory are not affected by the fl_bank[1:0] (sfr 0x b6[1:0]) bits program security when enabled, the security feature limits the ice to global flash erase operations only. all other ice operations, such as reading via the spi or ice port, are blocked. this guarantees the security of the user?s mpu and ce program code. security is enabled by mpu code that is executed in a 64 ckmpu cycle pre - boot interval before the primary boot sequence begins. once security is enabled, the only way to disable it is to perform a global erase of the flash, followed by a chip reset. the first 60 cycles of the mpu boot code are called the pre - boot phase because during this phase the ice is inhibited. a read - only status bit, preboot (sfr 0xb2[7]) , identifies these cycles to the mpu. upon completion of pre - boot, the ice can be enabled and is permitted to take control of the mpu. t he security en able bit, secure (sfr 0xb2[6]) , is reset whenever the chip is reset. hardwar e associated with the bit allow s only ones to be written to it. thus, pre - boot code may set secure to enable the security feature but may not reset it. once secure is set, the p re - boot and ce code are protected from e r asure, and no external read of program code is possible . specifically, when the secure bit is set , the following applies : ? the ice is limited to bulk flash erase only. ? page zero of flash memory, the preferred location for the user?s pre - boot code, may not be page- erased by either mpu or ice. page zero may only be erased with global flash erase. ? write operation s to page zero, whether by mpu or ice are inhibited. the 71m6543 also includes hardware to protect against unintentional flash write and erase. to enable flash write and erase operations, a 4 - bit hardware key that must be written to the flsh_unlock[3:0] field . the key is the binary number ?0010?. if flsh_ unlock[3:0] is not ?0010?, the flash erase and write operation is inhibited by hardware. proper operation of this security key requires that there be no firmware function that writes ?0010? to flsh_unlock[3:0] . the key should be written by the external s pi master, in the case of spi flash programming (sfm mode), or through the ice interface in the case of ice flash programming. when a boot loader is used, the key should be sent to the boot load code which then writes it to 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 49 flsh_unlock[3:0]. flsh_unlock[ 3:0] is not automatically reset. it should be cleared when the spi or ice has finished changing the flash. table 41 summarizes the i/o ram registers used for flash security. table 41 : flash security name location rst wk dir description flsh_unlock[3:0] 2702[7:4] 0 0 r/w must be a 2 to enable any flash modification. see the description of flash security for more details. secure sfr b2[6] 0 0 r/w inhibits erasure of page 0 and flash addresses above the beginning of ce code as defined by ce_lctn[6/5:0] (i/o ram 0x2109[5:0]) on the 71m6543f/h and ce_lctn[ 6:0] i/o ram 0x2109[6:0]) o n the 71M6543G/gh . also inhibits the read of flash via the ice and spi ports. spi flash mode in normal operati on, the spi slave interface can not read or write the flash memory. however, the 71m6543 contains a special flash m ode (sfm) that facilitates initial (production) programming of the flash memory. when the 71m6543 is in sfm mode, the spi interface can erase, read, and write the flash. other memory elements such as xram and i / o ram are not accessible to the spi in this mode. in order to protect the flash contents, several operations are required before the sfm mode is successfully invoked. when the 71M6543G/gh is operating sfm, spi single - byte transacti ons are used to write to fl_bank[1:0] (sfr 0xb6[1:0]) . during an spi single - byte transaction, spi_cmd[1:0] will over - write the conten ts of fl_bank[1:0] (sfr 0xb6[1:0]) . this will allow for access of the entire 128 kb flash memory while operating in sfm. details on the sfm ca n be found in 2.5.12 spi slave port . 2.5.1.2 mpu/ce ram the 71m6543 includes 5 kb of static ram memory on - chip (xram) plus 256 bytes of internal ram in the mpu core. the 5kb of static r am are used for data storage by both mpu and ce and f o r the com munica tion between mpu and ce . 2.5.1.3 i/o ram (configuration ram) the i/o ram can be seen as a series of hardware registers that control basic hardware functions. i/o ram address space starts at 0x2000. the registers of the i/o ram are listed in table 69. the 71m6543 includes 128 bytes non - volatile ram memory on- chip in the i/o ram address space (addresses 0x2800 to 0x287f). this memory section is supported by the voltage applied at vbat_rtc , and the data in it are prese rved in brn , lcd, and slp modes as long as the voltage at vbat_rtc is within specification. 2.5.2 oscillator the 71m6543 oscillator drives a standard 32.768 khz watch crystal . this type of crystal is accurate and does not require a high - current oscillator circuit . the oscillator has been desig ned specifically to handle watch crystals and is compatible with their high impedance and limited power handling capability. the oscillator p ower dissipation is very low to maxi mize the lifetime of any battery attached to vbat _rtc . oscillator calibration can improve the accuracy of both the rtc and metering. refer to 2.5.4 , real - time clock (rtc ) for more information. the oscillator is powered from the v3p3sys pin or from the vbat_rtc pin, depending on the v3ok in ternal bit (i.e., v3ok = 1 if v3p3sys 2 . 8 vdc and v3ok = 0 if v3p3sys < 2.8 vdc). the oscillator requires approximately 100 na, which is negligible compared to the internal leakage of a battery. 71m6543f/h and 71M6543G/gh data sheet 50 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 although the oscillator may appear to work when vbat is not connected, this mode of operation is not re - commended. if vbat_rtc is connected to a drained battery or disconnected, a battery test that sets temp_bat may drain the supply connected to vbat_rtc and cause the oscillator to stop. a stopped oscillator may force the device to reset. therefore, an unexpected reset during a battery test should be interpreted as a battery failure. 2.5.3 pll and internal clocks timing for the device is derived from the 32.768 khz crystal oscillator output that is multiplied by a pll by 600 to obtain 19.6608 00 mhz, the master clock (mck) . all o n - chip timing , except for the rtc clock, is derived from mck. table 42 provides a summary of the clock functions and their controls . the two general - purpose counter/timers contained in the mpu are controlled by ckmpu (see 2.4.7 timers and counters ). the master clock can be boosted to 19.66 mhz by setting the pll_fast bit = 1 ( i/o ram 0x2200[4] ) and can be reduced to 6.29 mhz by pll_fast = 0. the mpu clock frequency ckmpu is determined by another divider controlled by the i/o ram control field mpu_div [2:0] (i/o ram 0x2200[2:0]) and can be set to mck*2 -( mpu_div +2) where mpu_div [2:0] may vary from 0 to 4 . when the ice_e pin is high, t he cir cuit also generates the 9.8 3 mhz clock for use by the emul ator. the pll is only turned off in slp mode or in lcd mode when lcd_bste is disabled. the lcd_bste value depends on the setting of the lcd_vmode [1:0] field (see table 52 ). when the part is waking up from slp or lcd modes, the pll is turned on in 6.29 mhz mode, and the pll frequency is not be accurate until the pll_ok ( sfr 0xf9[4] ) flag rises. due to potent ial overshoot, the mpu should not change the value of pll_fast until pll_ok is true. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 51 table 42 : clock system summary clock derived from fixed frequency or range function pll_fast =1 pll_fast =0 controlled by osc crystal 32.768 khz ? crystal clock mck crystal/pll 19. 660800 mhz (600*ck32) 6.291456 mhz (192*ck32) pll_fast master clock ckce mck 4.9152 mhz 1.5728 mhz ? ce clock ckadc mck 4.9152 mhz, 2.4576 mhz 1.572864 mhz, 0.786432 mhz adc_div adc clock ckmpu mck 4.9152 mhz ? 307.2 khz 1.572864 mhz? 98.304 khz mpu_div [2:0] mpu clock ckice mck 9.8304 mhz? 614.4 khz 3.145728 mhz ? 196.608 khz mpu_div[2:0] ice clock ckoptmod mck 38.40 khz 38.6 khz ? optical uart modulation ck32 mck 32.768 khz ? 32 khz clock 2.5.4 real - time clock (rtc) 2.5.4.1 rtc general description the rtc is driven directly by the crystal oscillator and is powered by either the v3p3sys pin or the vbat_rtc pin , depending on the v3ok internal bit . the rtc consists of a counter chain and output reg isters. the counter chain consists of registers for seconds, minutes , hours, day of week, day of month, month, and year. the chain registers are supported by a shadow register that facilitates read and write operations. table 43 shows the i/o ram registers for accessing the rtc. 2.5.4.2 accessing the rtc two bits, rtc_rd (i/o ram 0x2890[6] ) and rtc_wr (i/o ram 0x2890[7]) , control the behavior of the shadow register. when rtc_rd is low, the shadow register is updated by the rtc after each two milliseconds. when rtc_rd is high, this update is halted and the shadow register contents become stationary and are suitable to be read by the mpu. thus, when the mpu wishes to read the rtc, it freeze s the shadow register by setting the rtc_rd bit, read s the shadow register, and then lower s the rtc_rd bit to let updates to the shadow register resume. since the rtc clock is only 500 hz, there may be a delay of approximately 2 ms from when the rtc_rd bit is lowered until the shadow register receives its first update. reads to rtc_rd continue s to return a one until the first shadow update occurs. when rtc_wr is high, the update of the shadow register is also inhibited. during t his time, the mpu may overwrite the contents of the shadow register. when rtc_wr is lowered, the shadow register is written into the rtc counter on the next 500hz rtc clock. a ?change? bit is included for each word in the shadow register to ensure that o nly programmed words are updated when the mpu writes a zero to rtc_wr . reads of rtc_wr return s one until the counter has actually been updated by the register. the sub - second register of the rtc, rtc_sbsc (i/o ram 0x2892) , can be read by the mpu after the one second interrupt and before reaching the next one second boundary. rtc_sbsc contai ns the count since the last full second , in 1/128 second nominal clock periods, until the next one - second boundary. when the rst_subsec bit is written, the subsec counter is restarted , counting from 0 to 127 . reading and resetting the sub - second counter can be used as part of an algorithm to accurately set the rtc. the rtc is capable of processing leap years. each counter has its own output register. the rtc cha in registers are not be affected by the reset pin, watchdog timer resets, or by transitions between the battery modes and mission mode. 71m6543f/h and 71M6543G/gh data sheet 52 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 table 43 : rtc control registers name location rst wk dir description rtc a _adj[6:0] 2504 [6:0] 40 -- r/w register for a nalog rtc frequency adjust ment . rtc_p[16:14] rtc_p[13:6] rtc_p[5:0] 289b[2:0] 289c[7:0] 289d[7:2] 4 0 0 4 0 0 r/w registers for digital rtc adjust ment. 0x0ffbf rtc_p 0x10040 rtc_q[1:0] 289d[1:0] 0 0 r/w register for digital rtc adjust ment. rtc_rd 2890[6] 0 0 r/w freezes the rtc shadow register so it is suitable for mpu reads. when rtc_rd is read, it returns the status of the shadow register: 0 = up to date, 1 = frozen. writing 0 to rtc_rd bit to enable shadow register update, and writing 1 to rtc_rd to disable update rtc_wr 2890[7] 0 0 r/w freezes the rtc shadow register so it is suitable for mpu write operation s. when rtc_wr is cleared, the contents of the shadow register are written to the rtc counter on the next rtc clock (~1 khz). when rtc_wr is read, it return s 1 as long as rtc_wr is set, and continue s to return one until the rtc counter is up dated. writing 0 to rtc_wr bit to enable copying the shadow register contents t o rtc counter, and writing 1 to rtc_wr to disable copying rtc_fail 2890[4] 0 0 r/w indicates that a count error has occurred in the rtc and that the time is not trustworthy. this b it can be cleared by writing a 0 . rtc_sbsc[7:0] 2892[7:0] r time remaining since the last 1 second boundary. lsb = 1/128 second. 2.5.4.3 rtc rate control the 71m6543 has two rate adjustment mechanisms: ? the first rate adjustment mechanism is an analog rate adjustment, using the i/o ram register rtca_adj[6:0] , that trims the crystal load capacitance. ? the second rate adjustment mechanism is a digital rate adjust that affects the way the clock frequency is processed in the rtc. setting rtca_adj[6:0] to 00 minimizes the load capacitance, maximizing the oscillator frequency. setting rtca_adj[6:0] to 0x7 f maximizes the load capacitance, minimizing the oscillator frequency. the adjustable capacitance is approximately: pf adj rtca c adj 5 . 16 128 _ ? = the precise amount of adjustment depends on the crystal properties , the pcb layout and the value of the external crystal capacitors (see cx s and cxs in table 89) . the adjustment may occur at any time, and the result ing clock frequency should be measured over a one - second interval. the second rate adjustment is digital, and can be used to adjust the clock rate up to 988ppm, with a resolution of 3.8 ppm. the rate adjustment is implemented starting at the next second - boundary fol lowing the adjustment . since the lsb (define first) results in an adjustment every four seconds, the frequency should be measured over an interval that is a multiple of four seconds. the clock rate is adjusted by writing the appropriate value s to rtc_p[ 16:0] ( i/o ram 0x289b[2:0], 0x289c, 0x289d[7:2] ) and rtc_q[1:0] (i/o ram 0x289d[1:0]) . updates to rtc rate adjust registers, rtc_p and rtc_q , are done through the shadow register described above. the new values are loaded into the counters when rtc_wr (i/o ram 0x2890[7] ) is lowered. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 53 the default frequency is 32,768 rtclk cycles per second. to shift the clock frequency by ? ppm, rtc_p and rtc_q are calculate d using the following equation: ? ? ? ? ? ? + ? ? + ? = + ? ? 5 . 0 10 1 8 32768 rtc_q rtc_p 4 6 floor co nversely, the amount of ppm shift for a given value of 4rtc_p + rtc_q is: 6 10 1 4 8 32768 ) ( ? ? ? ? ? ? ? ? ? ? + ? ? = ? q p rtc rtc ppm for example, for a shift of -988 ppm, 4 ? rtc_p + rtc_q = 262403 = 0x40103. rtc_p [16:0] = 0x10040, ( i/o ram 0x289b[2:0], 0x289c, 0x289d[7:2] ) and rtc_q [1:0] = 0x03 ( i/o ram 0x289d[1:0] . the default values of rtc_p [16:0] and rtc_q [1:0] , corresponding to zero adjustment, are 0x10000 and 0x0, respectively . two settings for the tmux2out test pin , pulse_1s and pulse_4s, are available for measuring and calibrating the rtc clock frequency. these are waveforms of approximately 25% duty cycle with 1s or 4s period. default values for rtc a _adj [6:0] , r tc_p [16:0] and r tc_q [1:0] should be nominal values , at the center of the ad just ment range. un - calibrated extreme values (zero, for example) can cause incorrect operation. if the crystal temperature coefficient is known, the mpu can integrate temperature and correct the rtc time as necessary. alternatively, the characteristics can be loaded into an nv ram and the osc_comp ( i/o ram 0x28a0[5 ]) bit may be set. in this case, t he oscillator is adjusted automatica lly, even in slp mode. see 2.5.4.4 rtc temperature compensation for details. 2.5.4.4 rtc temperature compensation t he 71m6543 can be configured to regularly measure die temperature, including in slp and lcd modes and while the mpu is halted . if enabled by osc_comp , this temperature information is auto matically used to correct for the temperature variation of the crystal. a table lookup method is used . table 44 shows i/o ram registers in volved in automatic rtc temperature compensation. table 44 : i/o ram registers for rtc temperature compensation name location rst wk dir description osc_comp 28a0[5] 0 0 r/w enables the automatic update of rtc_p [16:0] and rtc_q [1:0] every time the temperature is measured. stemp[10:3] stemp[2:0] 2 881[7:0 ] 2 882 [7:5 ] ? ? r th e re s ult of the temperature measure ment (10 - bits of magnitude data plus a sign bit) . lkpaddr[6:0] 2887[6:0] 0 0 r/w the address for reading and writing the rtc lookup ram. lkpautoi 2887[7] 0 0 r/w auto - increment flag. when set, lkpaddr [6:0] auto increment s every time lkp_rd or lkp_wr is pulsed. the incremented address can be read at lkpaddr [6:0] . lkpdat[7:0] 2888[7:0] 0 0 r/w the data for reading and writing the rtc lookup ram. lkp_rd lkp_wr 2889[1] 2889[0] 0 0 0 0 r/w r/w strobe bits for the rtc lookup ram read and write. when set, the lkpaddr [6:0] and lkpdat registers are used in a read or write operation. when a strobe is set, it stay s set until the operation completes, at which time the strobe is cleared and lkpaddr [6:0] is incremented if lkpautoi is set. referring to figure 13 the table lookup method uses the 10 - bits plus sign - bit value in stemp [10:0] right - shifted by two bits to obtain an 8 - bit plus sign value (i.e., nv ram address = stemp [10:0] /4). a 71m6543f/h and 71M6543G/gh data sheet 54 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 limiter ens ures that the resulting look - up address is in the 6 - bit plus sign range of - 64 to +63 (decimal). the 8 - bit nv ram content pointed to by the address is added as a 2?s complement value to 0x40000, the nominal val ue of 4* rtc_p [16:0] + rtc_q [1:0] . refer to 2.5.4.3 rtc rate control for information on the rate adjustments performed by registers rtc_p [ 16:0] and rtc_q [ 1:0] . the 8 - bit values loaded in to nv ram must be scaled correctly to produce rate adjustments that are consistent with the equations given in 2 .5.4.3 rtc rate control for rtc_p [16:0] and rtc_q [1:0] . note that the sum of the looked -up 8- bit 2?s complement value and 0x40000 form a 19- bit value, which is equal to 4* rtc_p [16:0] + rtc_q [1:0] , as shown in figure 13. the output of the temperature compensation is automatically loaded into the rtc_p[16:0] and rtc_q[1:0] locations after each look - up and summati on operation. 0x40000 19 10+s stemp >>2 63 -64 -64 63 255 -256 limit look up ram addr 6+s 8+s q 7+s 4*rtc_p+rtc_q 19 figure 13 : automatic temperature compensation the 128 nv ram locations are organized in 2?s complement format . as mentioned above, the stemp [10:0] digital temperature values are scaled such that the corresponding nv ram addresses are equal to stemp [10:0] /4 (limited in the range of - 64 to +63) . see 2.5.5 71m6543 temperature sensor on page 55 for the equations to calculate temperature in degrees c from the stemp[10:0] reading. for proper operation, the mpu has to load the lookup table with values that reflect the crystal properties with respect to temperature, which is typically done once during initialization. since the lookup table is not directly addressable, the mpu uses t he following procedure to load the nv ram table: 1. set the lkpautoi bit ( i/o ram 0x2887[7] ) to enable address auto - increment . 2. write zero into the i/o ram register lkpaddr[6:0] ( i/o ram 0x2887[6:0] ). 3. write the 8 - bit dat um into i/o ram register lkpdat ( i/o ram 0x 2888 ). 4. set the lkp_wr bit ( i/o ram 0x2889[0 ] ) to write the 8 - bit datum into nv_ram 5. wait for lkp_wr to clear ( lkp_wr auto - clears when the data has been copied to nv ram) . 6. repeat steps 3 through 5 until all data has been written to nv ram. the nv ram t able can also be read by writing a 1 into the lkp_rd bit ( i/o ram 0x2889[1] ) . the process of reading from and writing to the nv ram is accelerated by setting the lkpautoi bit ( i/o ram 0x2887[7] ). when lkpautoi is set, lkpaddr[6:0] ( i/o ram 0x2887[6:0] ) auto - increment s every time lkp_rd or lkp_wr is pulsed. it is also possible to perform random access of the nv ram by writing a 0 to the lkpautoi bit and loading the desired address into lkpaddr[6:0] . if the oscillator temperature compensation feature is not being used, it is possible to use the nv ram storage area as ordinary battery - backed nv storage space using the procedure described above to read and write nv ram data. in this case, the osc_comp bit ( i/o ram 0x28a0[5] ) is reset to disable the automa tic oscillator temperature compensation feature. 2.5.4.5 rtc interrupts the rtc generates interrupts each second and each minute. these interrupts are called rtc_1sec and rtc_1min . in addition, the rtc functions as an alarm clock by generating an interrupt when the mi nutes and hours register s both equal their respective target count s as defined in . the alarm clock interrupt is called rtc_ t . all three interrupts appear in the mpu?s external interrupt 6. see table 33 in the interrupt section for the enable bit s and flags for these interrupts. the mi nute and hour target registers are listed in table 45. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 55 table 45 : i/o ram registers for rtc interrupts name location rst wk dir description rtc_tmin[5:0] 289e[5:0] 0 0 r/w the target minutes register. see below. rtc_thr[4:0] 289f[4:0] 0 0 r/w the target hours register. the rtc_ t interrupt occur s when rtc_min [5:0] becomes equal to rtc_tmin [5:0] and rtc_hr [4:0] becomes equal to rtc_thr [4:0] . 2.5.5 71m6543 temperature sensor the 71m6543 includes an on - chip temperature sensor for determining the temperature of its bandgap re ference . the primary use of the temperature data is to determine the magnitude of compensation re quired to offset the th ermal drift in the system for the com pensa tion of current, voltage and energy mea surement and the rtc . s ee 4.5 metrology temperature compensation on page 89. also see 2.5.4.4 rtc temperature compensation on page 53. unlike earlier generation teridian socs, t he 71m 6543 does not use the adc to read the temperature sensor. instead, it uses a technique that is operation al in slp and lcd mode, as well as brn and msn modes. this means that the temperature sensor can be used to compensate for the frequency variation o f the crystal, even in slp mode while the mpu is halted. see 2.5.4.4 rtc temperature compensation on page 53. in msn and brn modes, the temp erature sensor is awakened on command from the mpu by se tting the temp_start (i/o ram 0x 28b4 [ 6 ] ) control bit . in slp and lcd modes, it is awakened at a regular rate set by temp_per[2:0] (i/o ram 0x28a0[2:0]) . the result of the temperature measurement is read from the two i/o ram locations stemp[10:3] ( i/o ram 0x2881) and stemp[2:0] (i/o ram 0x2882[7:5] ). note that both of these i/o ram locations must be read and properly combined to form the stemp[10:0] 11 - bit value (see stemp in table 46) . the resulting 11- bit value is in 2?s complement form and ranges from - 1024 to +1023 ( decimal ) . the equation s below are used to calculate the sensed temperature . the first equation applies w hen the 71m6543f and 71M6543G are in msn mode and temp_pwr = 1. the second equation applies when the 71m6543f and 71M6543G are in brn mode , and in this case, the temp_pwr and temp_bsel bits m ust both be set to the same value , so that the battery that suppl ies the temperature sensor is also the battery that is measured and reported in bsense . thus, the second equation requires reading stemp and bsense . in the second equation, bsense (the sensed battery voltage) is used to obtain a more accurate temperature reading when the ic is in brn mode . a second set of equations if provided for the 71m6543h and 71M6543Gh high precision parts. the coefficients provided in the various stemp equati ons below are typical. for the 71m6543f and 71M6543G in msn mode (with temp_pwr = 1 ) : 22 325 . 0 ) ( + ? = stemp c temp for the 71m6543f and 71M6543G in brn mode, (with temp_p w r = temp_bsel ): 4 . 64 609 . 0 00218 . 0 325 . 0 ) ( 2 + ? ? ? + ? = bsense bsense stemp c temp o for the 71m6543h and 71M6543Gh in brn mode (with temp_p w r = temp_bsel ) : if stemp ? ???? ( ) = 0 . 325 ? ????? + 0 . 00218 ? ?????? 2 ? 0 . 609 ? ?????? + 64. 4 if stemp > 0: ???? ( ) = 63 ? ????? ???? _ 85 + 0 . 00218 ? ?????? 2 ? 0 . 609 ? ?????? + 64. 4 71m6543f/h and 71M6543G/gh data sheet 56 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 table 46 s hows the i/o ram registers used for temperature and battery measurement. i f temp_pwr selects vbat_rtc when the battery is nearly discharged, the temperature measurement may not finish. in this case, firmware may complete the measurement by selecting v3p3d ( temp_pwr = 1). table 46 : i/o ram registers for temperature and battery mea surement name location rst wk dir description tbyte_busy 28a0[3] 0 0 r indicates that hardware is still writing the 0x28a0 byte. additional writes to this byte are locked out while it is one. write duration could be as long as 6 ms. temp_per[2:0] 28a0[2:0] 0 ? r/w sets the period between temperature measurements . auto mat ic measurements can be enabled in any mode (msn, brn, lcd, or slp). temp_per time 0 manual updates (see temp_start ) 1 -6 2 ^ (3+ temp_per ) (seconds) 7 continuous temp_bat 28a0[4] 0 ? r/w causes vbat to be measured whenever a temperature measurement is performed. temp_start 28b4[6] 0 ? r/w temp_per[2:0] must be zero in order for temp_start to function. if temp_per[2:0] = 0, then setting temp_start s tarts a temperature measurement. ignored in slp and lcd modes. hardware clears temp_start when the temperature measurement is complete. temp_pwr 28a0[ 6 ] 0 ? r/w selects the power source for the temp erature sensor: 1 = v3p3d, 0 = vbat_r tc. this bit is ignored in slp and lcd modes, where the temperature sensor is always powered by vbat_rtc. temp_bsel 28a0[7 ] 0 ? r/w selects which battery is monitored by the temp erature sensor: 1 = vbat, 0 = vbat_rtc temp_test[1:0] 2500[1:0] 0 ? r/w test bits for the temperature monitor vco. temp_test must be 00 in regular operation. any other value cause s the vco to run continuously with the control voltage described below. temp_test function 00 normal operation 01 reserved for factory test 1 x reserved for factory test stemp[10:3] stemp[2:0] 2881[7:0] 2882[7:5] r r the result of the temperature measurement. the stemp[10:0] value may b e obtained in c with a single 16 - bit read and divide by 32 operation as follows: volatile int16_t xdata stemp _at_0x2881; fa = (float)(stemp/32); bsense[7:0] 2885[7:0] ? ? r the result of the battery measurement. bcurr 2704[3] 0 0 r/w connects a 100 a load to the battery selected by temp_bsel . 2.5.6 71m6xx3 temperature sensor 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 57 the 71m6xx3 includes an on - chip temperature sensor for determining the temperature of its bandgap re ference. the primary use of the temperature data is to determine the magnitude of compensation re quired to offset the thermal drift in the system for the com pensa t ion of the current measurement performed by the71m6xx3. see the 71m6xxx data sheet for the equation to calculate temperature from the 71m6xx3 stemp[10:0] reading. also, s ee 4.5 metrology temperature compensation on page 89. see 2.2.8.3 control of the 71m6xx3 isola ted sensor on page 22 for information on how to read the stemp[10:0] information from the 71m6xx3. 2.5.7 71m6543 battery monitor the 71m6543 temperature measurement circuit can also monitor the batteries at the vbat and vbat_rtc pins. t he battery to be tested (i.e., vbat or vbat_rtc pin ) is selected by temp_bsel ( i/o ram 0x28a0[7] ). when temp_bat ( i/o ram 0x28a0[4] ) is set, a battery measurement is performed as part of each temperature measurement. the value of the battery reading is stored in register bsense [7:0] (i/o ram 0x2885) . the following equation s are used to calculate the voltage measured on the vbat pin (or vbat_rtc pin) from the bsense[7:0] and stemp[10:0] values. the result of the equation below is in volts. a slightly different equation is used for msn mode and brn mode, as follows. in msn mode, t emp_pwr = 1 use: v stemp v bsense v rtc orvbat vbat 000297 . 0 0246 . 0 ) 142 ( 3 . 3 ) _ ( ? + ? ? + = in brn mode, temp_pwr = temp_bsel use: v stemp v bsense v rtc orvbat vbat 000328 . 0 0255 . 0 ) 142 ( 291 . 3 ) _ ( ? + ? ? + = in msn mode, a 100 a de - passivation load can be applied to the selected battery ( i.e. , selected by the temp_bsel bit) by setting the bcurr ( i/o ram 0x2704[3] ) bit. battery impedance can be measured by taking a battery measurement with and without bcurr . regardless of the bcurr bit setting , the battery load is never applied in brn, lcd, and slp modes. 2.5.8 71m6xx3 vcc monitor the 71m6xx3 monitor s its vcc pin voltage. the voltage of the vcc pin can be obtained by the 71m6543 by issuing a read command to the 71m6xx3. the 71m6543 must request both the vsense[7:0] and stemp[10:0] values from the 71m6xx3. see the 71m6xxx data sheet for the equation to calculate the 71m6xx3 vcc pin voltage from the vsense[7:0] and stemp[10:0] values read from the 71m6xx3. see 2.2.8.3 control of the 71m6xx3 isolated sensor on page 22 for information on how to read vsense[7:0] and stemp[10:0] from the 71m6xx3 remote sensors. 2.5.9 uart and optical interface the 71m6543 provides two asynchronous interfaces, uart0 and uart1. both can be used to connect to amr modules, user interfaces, etc., and also support a mechanism for programming the on - chip flash memory. referring to figure 14 , uart1 includes an interface to implement an ir/optical port. the pin opt_tx is designed to directly drive an external led for transmitting data on an optical link. the pin opt_rx has the same threshold as the rx pin, but can also be used to sense the input from an external photo detector used as the receiver for the optical link. opt_tx and opt_rx are connected to a dedicated uart port (uart1). the opt_tx and opt_rx pins can be inverted with configuration bits opt_txinv (i/o ram 0x2456[0]) and opt_rx inv (i/o ram 0x2457[1]) , respectively. additionally, the opt_tx output may be modulated at 38 khz. modulation is available in msn and brn modes ( see table 62 ). the opt_txmod bit ( i/o ram 0x2456[1] ) enables modulation. the duty cycle is controlled by opt_fdc[1:0] (i/o ram 0x2457[5:4]) , which can select 50%, 25%, 12.5%, and 6.25% duty cycle. a 6 .25% duty cycle means that opt_tx is low for 6.25% of the period. when not needed for uart 1 , opt_tx can alternatively b e configured as segdio51. configuration is via the opt_txe[1:0] (i/o ram 0x2456[3:2]) field and lcd_map[51] (i/o ram 0x2405[0]) . the 71m6543f/h and 71M6543G/gh data sheet 58 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 op t_txe[1:0] field allows the mpu to select vpulse, wpulse, segdio51 or the output of the pulse modulator to be sourced onto the opt_tx pin. likewise , the opt_rx pin can alternately be configured as segdio55, and i ts control is opt_rxdis (i/o ram 0x2457[2]) and lcd_map[55] (i/o ram 0x2405[4]) . b a opt_txmod = 0 opt_txmod = 1, opt_fdc = 2 (25%) b a 1 / 38 khz opt_txinv from opt_tx uart mod en duty opt_tx opt_txmod opt_fdc opt_txe[1:0 ] 1 2 v3p3 internal a b 0 2 3 dio2 wpulse varpulse figure 14 : optical interface bit banged optical uart (third uart) as shown in figure 15 , the 71m 6543 can also be configured to drive the optical uart with a dio signal in a bit banged configuration. when control bit opt_bb ( i/o ram 0x2022[0] ) is set, the optical port is driven by dio5 and the segdio5 pin is driven by uart1_tx. this configuration is typically used when the two dedicated uarts must be connected to high speed clients and a slower optical uart is permissible. opt_txinv uart1_tx mod en duty segdio51/ opt_tx opt_txmod opt_fdc opt_txe[1:0] 0 2 v3p3 internal a b opt_txmod=0 opt_txmod=1, opt_fdc=2 (25%) b a 1/38khz 1 2 3 dio51 wpulse varpulse seg51 lcd_map[51] 1 0 segdio55/ opt_rx seg55 lcd_map[55] 1 0 dio55 1 0 opt_rxdis uart1_rx dio5 segdio5/tx2 seg5 1 0 lcd_map[5] opt_bb 0 0 1 1 figure 15 : optical interface (uart1) 2.5.10 digital i/o and lcd segment drivers 2.5.10.1 general information the 71m6543 combines most dio pins with lcd segment drivers. each seg /dio pin can be configured as a dio pin or as a segment driver pin (seg) . on reset or power - up, all dio pins are dio inputs (except for segdio0 - 15, see caution note below) until they are configured as desired under mpu control. the pin function can be configu red by the i/o ram registers lcd_mapn (0x2405 ? 0x240b) . setting the bit corresponding to the pin in lcd_mapn to 1 configures the pin for lcd, setting lcd_mapn to 0 configures it for dio. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 59 after reset or power up, pins segdio0 through seg dio15 are initi ally dio outputs, but are disabled by port_e = 0 (i/o ram 0x270c[5] ) to avoid unwanted pulses during reset. after configuring pins segdio0 through segdio15 the mpu must enable these pins by setting port_e . once a pin is configured as dio, it can be config ured independently as an input or output. for segdio 0 to segdio 15, this is done with the sfr registers p0 (sfr 0x80) , p1 (sfr 0x90) , p2 (sfr 0xa0) and p3 (sfr 0xb0) , as shown in table 48. example: segdio12 (pin 32 in table 48 ) is configured as a dio output pin with a value of 1 (high) by writing 0 to bit 4 of lcd_map[15:8] , and writing 1 to both p3[4]and p3[0] . the same pin is con figured as an lcd driver by wri ting 1 to bit 4 of lcd_map[ 15:8 ] . the display information is written to bits 0 to 5 of lcd_seg12. the pb pin i s a dedicated digital input and is not part of the segdio system. the ce features pulse counting registers and each pulse counter interrupt output is internally routed to the pulse interrupt logic. thus, no routing of pulse signals to external pins is required in order to generate pulse interrupts. see interrupt source n o. 2 in figure 12. a 3 - bit configuration word, i/o ram register dio_rn ( i/o ram 0x2009[2:0] through 0x200e[6:4] ) can be used for pins segdio2 through s egdio11 (when configured as dio) and pb to indivi dually assign an internal resource such as an interrupt or a timer control ( dio_rpb [2:0], i/o ram 0x2450[2:0], configures the pb pin). this way, dio pins can be tracked even if they are configured as outpu ts. table 48 lists t he internal resources which can be assigned using dio_r2[2:0] through dio_r11[2:0] and dio_rpb[2:0] . if more than one input is connected to the same resource, the resources are combined using a logical or. table 47 : selectable resources using the dio_rn [2:0] bits value in dio_rn [2:0] resource selected for segdion or pb pin 0 none 1 reserved 2 t0 (counter0 clock) 3 t1 (counter1 clock) 4 high priority i/o interrupt (int0) 5 low priority i/o interrupt (int1) note: resources are selectable only on segdio2 through segdio11 and the pb pin. see table 49. when driving leds, relay coils etc., the dio pins should sink the current into gndd (as shown in figure 16 , right), not source it from v3p3d (as shown in figure 16 , left). this is due to the resistance of the internal switch that co nnects v3p3d to either v3p3sys or vbat. see 6.4.6 v3p3d switch on page 139. sourcing current in or out of dio pins other than those dedicated for wake functions, for ex ample with pullup or pulldown resistors, must be avoided. violating this rule leads to increased quiescent current in sleep and lcd modes. 71m6543f/h and 71M6543G/gh data sheet 60 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 figure 16 : connecting an external load to dio pins 2.5.10.2 combined dio and seg pins a total of 51 combined dio/lcd pins are available. these pins can be categorized as follows: 39 combined dio/lcd segment pins : o segdio4?segdio25 (22 pins) o segdio28?segdio35 (8 pins) o segdio40?segdio45 (6 pins) o segdio52?segdio54 (3 pins) 12 combined dio/lcd segment pins shared with other functions: o segdio0/wpulse, segdio1/vpulse (2 pins) o segdio2/sdck, segdio3/sdata (2 pins) o segdio26/com5, segdio27/com4 (2 pins) o segdio36/spi_csz?segdio39/spi_cki (4 pins) o segdio51/opt_tx, segdio55/opt_rx (2 pins) additionally, 5 lcd segment (seg) pins are available. these pins can be categorized as follows: o 3 seg pins combined with the ice interface (seg48/e_rxtx, seg49/e_tclk, seg50/e_rst) o 2 seg pins combined with the test multiplexer outputs (seg46/tmux2out, seg47/tmuxout) thus, a total of 51 dio pins are available with minimum lcd configuration, and a total of 56 lcd pins are available with minimum dio configuration. table 48 : data/direction registers and internal resources for seg dio 0 to segdio15 seg dio 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 pin # 45 44 43 42 41 39 38 37 36 35 34 33 32 31 30 29 configuration : 0 = dio , 1 = lcd 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 lcd_map[7:0] (i/o ram 0x240b) lcd_map[15:8] (i/o ram 0x240a) seg data register 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 lcd_seg0[5:0] to lcd_seg15[5:0] (i/o ram 0x2410[5:0] to 0x241f[5:0] dio data register 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 p0 ( sfr80 ) p1 (sfr 0x90) p2 ( sfr 0xa0 ) p3 ( sfr 0xb0 ) direction re gister : 0 = input, 1 = output 4 5 6 7 4 5 6 7 4 5 6 7 4 5 6 7 p0 ( sfr 0x80 ) p1 ( sfr 0x 90) p2 ( sfr 0xa0 ) p3 ( sfr 0xb0 ) v3p3sys vbat v3p3d dio gndd mission brownout lcd/sleep low high high-z v3p3sys vbat v3p3d dio gndd mission brownout lcd/sleep low high high-z not recommended recommended 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 61 seg dio 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 pin # 45 44 43 42 41 39 38 37 36 35 34 33 32 31 30 29 internal re sources con figurable (see table 47) ? ? y y y y y y y y y y ? ? ? ? the configuration for pins segdio 16 to segdio 31 is shown in table 49 , and the configuration for pins segdio 32 to segdio 45 is shown in table 50. the configuration for pins segdio 51 to segdio 55 is shown in table 51. table 49 : data/direction registers for segdi o16 to segdio31 seg dio 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 pin # 28 27 25 24 23 22 21 20 19 18 17 16 11 10 9 8 configuration: 0 = dio, 1 = lcd 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 lcd_map[23:16] (i/o ram 0x2409) lcd_map[31:24] (i/o ram 0x2408) seg data register 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lcd_segdio16[5:0] to lcd_segdio31[5:0] (i/o ram 0x2420[5:0] to 0x242f[5:0]) dio data register 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lcd_segdio16[0 ] to lcd_segdio31[0] (i/o ram 0x2420[0] to 0x242f[0]) direction re gister : 0 = input, 1 = output 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 lcd_segdio16[1] to lcd_segdio31[1] (i/o ram 0x2420[1] to 0x242f[1]) table 50 : data/direction registers for segdio32 to segdio45 segdio 32 33 34 35 36 37 38 39 40 41 42 43 44 45 pin # 7 6 5 4 3 2 1 100 99 98 97 96 95 94 configuration: 0 = dio, 1 = lcd 0 1 2 3 4 5 6 7 0 1 2 3 4 5 lcd_map[39:32] (i/o ram 0x2407) lcd_map[45:40] (i/o ram 0x2406[5:0]) seg data register 32 33 34 35 36 37 38 39 40 41 42 43 44 45 lcd_segdio32[5:0] to lcd_segdio45[5:0] (i/o ram 0x2430[5:0] to 0x243d[5:0]) dio data register 32 33 34 35 36 37 38 39 40 41 42 43 44 45 lcd_segdio32[0] to lcd_segdio45[0] (i/o ram 0x2430[0] to 0x243d[0]) direction re gister: 0 = input, 1 = output 32 33 34 35 36 37 38 39 40 41 42 43 44 45 lcd_segdio32[1] to lcd_segdio45[1] (i/o ram 0x2430[1] to 0x243d[1]) table 51 : data/direction registers for segdio51 to segdio55 segdio 51 52 53 54 55 pin # 53 52 51 47 46 ? ? ? configuration: 0 = dio, 1 = lcd 3 4 5 6 7 ? ? ? lcd_map[55:48] (i/o ram 0x2405) seg data register 51 52 53 54 55 ? ? ? 71m6543f/h and 71M6543G/gh data sheet 62 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 lcd_segdio51[5:0] to lcd_segdio55[5:0] (i/o ram 0x2443[5:0] to 0x2447[5:0]) dio data register 51 52 53 54 55 ? ? ? lcd_segdio51[0] to lcd_segdio55[0] (i/o ram 0x2443[0] to 0x2447[0]) direction re gister: 0 = input, 1 = output 51 52 53 54 55 ? ? ? lcd_segdio51[1] to lcd_segdio55[1] (i/o ram 0x2443[1] to 0x2447[1]) 2.5.10.3 lcd drivers the lcd drivers are grouped into up to six co mmons (com0 ? com5) and up to 56 segment drivers . the lcd interface is flexible and can drive 7 - segment digits, 14- segment digits or enunciator symbols. a voltage doubler and a contrast dac generate vlcd from either vbat or v3p3sys, depending on the v3p3sys voltage. the voltage doubler, while capable of driving into a 500 k load , is able to generate a maximum lcd voltage that is with in 1 v of twice the supply voltage . the doubler and d ac operate from a trimmed low - power reference. t he configuration of the vlcd generation is controlled by the i/o ram field lcd_vmode[1:0] (i/o ram 0x2401[7:6]) . it is decoded into lcd_ext, ldac_e, and lcd_bste . table 52 details the lcd_ v mode[1:0] configurations. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 63 table 52: lcd_vmode configurations lcd_vmode [1:0] lcd_ext ldac_e lcd_bste description 11 1 0 0 external vlcd connected to the vlcd pin . 10 0 1 1 lcd boost is enabled. maximum vlcd voltage is 2*v3p3l - 1. vlcd = max(2*v3p3l - 1, 2. 6 5(1+ lcd_dac[4:0] /31) 01 0 1 0 lcd boost is disabled. the maximum vlcd voltage is v3p3l. vlcd = max(v3p3l, 2. 6 5 (1+ lcd_dac[4:0] /31) 00 0 0 0 vlcd=v3p3l, the lcd dac and lcd boost are dis - abled. in lcd mode, this setting causes the lowest battery current. note s : 1. lcd_ext, ldac_e and lcd_bste are 71m6543 internal signals which are decoded from the lcd_vmode[1:0] control field setting ( i/o ram 0x2401[7:6] ). each of these decoded signals, when asserted, has the effect indicated in the description column above, and as summarized below. lcd_ext : when set, the vlcd pin expects an external supply voltage ldac_e : whe n set, lcd dac is enabled lcd_bste : when set, the lcd boost circuit is enabled 2. v3p3l is an internal supply rail that is supplied from either the vbat pin or the v3p3sys pin , depending on the v3p3sys pin voltage. when the v3p3sys pin drops below 3.0 vdc, the 71m6543 switches to brn mode and v3p3l is source d from the vbat pin, otherwise v3p3l is sourced from the v3p3sys pin while in msn mode. when using the vlcd boost ci rcuit, use care when setting the lcd_dac[4:0] (i/o ram 0x240d[4:0]) value to ensure that the lcd manufacturer?s recommended operating voltage specification is not exceeded. the voltage doubler is active in all lcd modes including the lcd mode when lcd_bste = 1 . current dissipation in lcd mode can be reduced if the boost circuit is disabled and the lcd system is operated directly from vbat. the lcd dac uses a low - power reference and, within the constraints of vbat and the voltage doubler, generate s a vlcd voltage of 2. 6 5 vdc + 2. 6 5 * lcd_dac[4:0] /3 1. two fuse bytes increase the accuracy of the lcd_dac. lcdadj12 and lcdadj0 indicate the actual vlcd output voltage when the dac is programmed to 12 and 0 respectively. the lcd_bat (i/o ram 0x2402[7]) bit causes the lcd system to use the battery voltage in all power modes . this may be use ful when an external supply is available for the lcd system. the advantage of connecting the external supply to vbat, r ather than vlcd is that the lcd dac is still a ctive. if lcd_ext = 1, the vlcd pin must be driven from an external source. in this case, the lcd dac ha s no effect. the lcd system ha s the ability to drive up to six segments per seg driver. if the display is confi gured with six back planes, the 6 - way m ultiplexing reduces the number of seg pins required to drive a display and therefore enhance s the number of dio pins available to the application. refer to the lcd_mode[2:0] field (i/o ram 0x2400[6:4]) settings ( table 53 ) for the different lcd multiplexing choices. if 5 - state multiplexing is selected, segdi o27 is converted to com4. if 6 - state multiplexing is selected, segdio26 is converted to com5. these conversions override the seg/dio mapping of segdio26 and segdio27. additionally, independent of lcd_mode[2:0], if lcd_allcom = 1 ( i/o ram 0x2400[3]) , then segdio26 and segdio27 become com4 and com5 if their lcd_map [ ] bits are set. the lcd_on ( i/o ram 0x240c[0 ]) and lcd_blank ( i/o ram 0x240c[1] ) bits are an easy way to either blank the lcd display or turn it fully on. neither bit aff ect s the contents of the lcd data stored in the lcdseg_dio[ ] registers . in comparison, lcd_rst ( i/o ram 0x240c[2] ) clears all lcd data to zero. lcd_rst affects only pins that are configured as lcd . 71m6543f/h and 71M6543G/gh data sheet 64 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 a small amount of power can be saved by programming the lcd frequency to the lowest value that provides satisfactory lcd visibility over the required temperature range. table 53 shows all i/o ram registers that control the operation of the lcd interface. table 53: lcd configurations name location rst wk dir description lcd_allcom 2400[3] 0 ? r/w configures all 6 seg/com pins as com. has no effect on pins whose lcd_map bit is zero. lcd_bat 2402[7] 0 ? r/w connects the lcd power supply to vbat in all mod es. lcd_e 2400[7] 0 ? r/w enables the lcd display. when disabled, vlc2, vlc1, and vlc0 are ground as are the com and seg outputs if their lcd_map bit is 1. lcd_on lcd_blank 240c[0] 240c[1] 0 0 ? ? r/w r/w lcd_on = 1 turns on all lcd segments without affecting the lcd data. similarly, lcd_blank = 1 turns off all lcd segments without affecting the lcd data. if both bits are set, all lcd segments are turned on . lcd_rst 240c[2] 0 ? r/w clear all bits of lcd data. these bits affect segdio pins that are configured as lcd drivers. lcd_dac[4:0] 240d[4:0] 0 ? r/w th is register controls the lcd contrast dac which adjust s the vlcd voltage and has an output range of 2. 6 5 vdc to 5 .3 vdc . the vlcd voltage is vlcd = 2. 6 5 + 2. 6 5 * lcd_dac[4:0] /3 1 thus, the lsb of the dac is 85.5 mv. the maximum dac output voltage is limited by v3p3 sys, vbat, and whether lcd_bste is set . lcd_clk[1:0] 2400[1:0] 0 ? r/w sets the lcd clock frequency (1/t). see definition of t in figure 17 . note: fw = 32768 hz 00 - fw/2^9, 01 - fw/2^8, 10 - fw/2^7, 11 - fw/2^6 lcd_mode[2:0] 2400[6:4] 0 ? r/w the lcd bias and multiplex mode. lcd_mode output 000 4 states, 1/3 bias 001 3 states, 1/3 bias 010 2 states, ? bias 011 3 states, ? bias 100 static display 101 5 states, 1/3 bias 110 6 states, 1/3 bias lcd_vmode[1:0] 2401[7:6] 00 00 r/w this register s pecifies how vlcd is generated. lcd_vmode description 11 external vlcd 10 lcd boost and lcd dac enabled 01 lcd dac enabled 00 no boost and no dac. vlcd = vbat or v3p3sys t he lcd can be driven in static, ? bias, and 1/3 bias modes. figure 17 defines the com waveforms. note that com pins that are not require d in a specific mode maintain a segment off state rather tha n gnd, vcc, or high impedance . the segment driver s segdio 22 an d segdio23 can be configured to blink at either 0.5 hz or 1 hz. the blink rate is con trolled by lcd_y (i/o ram 0x2400[2]) . there can be up to six pixels/segments connected to each of these driver pin s . the i/o ram fields lcd_blkmap 22[ 5 :0] (i/o ram 0x2402[5:0]) and lcd_blkmap 23 [ 5:0] (i/o ram 0x2401[5:0]) i dentif y which pixels, if any, are to blink. lcd_blkmap22[5:0] and lcd_blkmap23[5:0] are non - volatile. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 65 the lcd bias may be compensated for temperature using the lcd_dac [4:0] field ( i/o ra m 0x240d[4:0 ]). the bias may be adjusted from 1.4 v below the 3.3 v supply (v3p3sys in msn mode and vbat in brn and lcd mode s ). when the lcd_dac[4:0] field is set to 000, the dac is bypassed and powered down. this setting can be used to reduce current i n lcd mode. figure 17: lcd w aveforms seg46 through seg50 cannot be configured as dio pins. display data for these pins are written to i/o ram registers lcd_seg46[5:0] through lcd_seg50[5:0] (see table 54). table 54 : lcd data registers for segdio46 to segdio55 seg dio 46 47 48 49 50 51 52 53 54 55 pin # 93 92 58 57 56 53 52 51 47 46 configuration : always lcd pins see 2.5.10.2 seg data register lcd_segdio46[5:0] (i/o ram 0x243e[5:0] lcd_segdio47[5:0] (i/o ram 0x243f[5:0]) lcd_segdio48[5:0] (i/o ram 0x2440[5:0] lcd_segdio49[5:0] (i/o ram 0x2441[5:0]) lcd_segdio50[5:0] (i/o ram 0x2442[5:0]) lcd_segdio51[5:0] (i/o ram 0x2443[5:0]) lcd_segdio52[5:0] (i/o ram 0x2444[5:0]) lcd_segdio53[5:0] (i/o ram 0x2445[5:0]) lcd_segdio54[5:0] (i/o ram 0x2446[5:0]) lcd_segdio55[5:0] (i/o ram 0x2447[5:0]) the lcd_map[ 47 :46] ( i/o ram 0x2406[7:6] ) bits are used to determine whether seg46 and seg 47 are seg pins or their alternate function (see pins 93 and 92 in figure 43). if the lcd_map[ 47:46 ] bit s are 1 , then the pin s are configured as seg pin s . if the lcd_map[ 4 7:46 ] bit s are 0, then the pin s are configured as their alternate function s (tmux2out and tm uxout , respectively ). static (lcd_mode=100) com0 com1 com2 com3 com4 com5 seg_on seg_off (1/2) (1/2) (1/2) (1/2) (1/2) 1/2 bias, 2 states (lcd_mode = 010 ) com0 com1 com2 com3 com4 com5 seg_on seg_off (1/2) (1/2) (1/2) (1/2) 0 1 1/2 bias, 3 states (lcd_mode = 011 ) com0 com1 com2 com3 com4 com5 seg_on seg_off (1/2) (1/2) (1/2) 0 1 2 1/3 bias, 3 states (lcd_mode = 011 ) com0 com1 com2 com3 com4 com5 seg_on seg_off (2/3) 0 1 2 (1/3) 1/3 bias, 4 states (lcd_mode = 000 ) com0 com1 com2 com3 com4 com5 seg_on seg_off 0 1 2 1/3 bias, 6 states (lcd_mode = 110 ) com0 com1 com2 com3 com4 com5 seg_on seg_off 0 1 2 3 3 4 5 t 71m6543f/h and 71M6543G/gh data sheet 66 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 for example, if lcd_map[46] = 1, then pin 93 (tmux2out/seg46) is configured as seg46, and if lcd_map[46]=0 , then pin 93 is configured as tmux2out. the seg pins with alternate ice interface function ( see pins 56- 58 in figure 43 ) are forced to their alternate ice interface function ( i.e., e_rxtx, e_tclk and e_rst) if the ice_e pin (pin 59) is driven high, and in this ca se, the bits lcd_map[50 :48 ] ( i/o ram 0x2405[2:0] ) bit s are ? don?t care ? bits . if the ice_e pin i s driven low, then lcd_map[50 :48 ] bits m ust written with 1 in order to configure these pins as seg pin s . if the ice_e pin is low and lcd_map[50 :48 ] are written with 0, then these pins are tied to an internal pullup . 2.5.11 eeprom interface the 71m6543 provides hardware support for either a two - pin or a three - wire ( - wire) type of eeprom interfa ce. the interfaces use the eectrl (sfr 0x9f) and eedata (sfr 0x9e) registers for communication . 2.5.11.1 two -p in eeprom interface the dedicated 2 - pin serial interface communicates with external eeprom devices . the interface is mul tiplexed onto the segdio2 ( sdck ) and segdio3 ( sdata) pins and is selected by setting dio_eex [1:0] = 0 1 ( i/o ram 0x2456[7:6] ). the mpu communicates with the interface through the sfr registers eedata and eectrl . if the mpu wishes to write a byte of data to the eeprom, it places the data in eedata and then writes the transmit code to eectrl . this initiates the transmit operation which is finished when the busy bit falls . int5 is also asserted when busy falls . the mpu can then check the rx_ack bit to see if the eeprom acknowledged the trans mission. a byte is read by writing the receive comm and to eectrl and waiting for the busy bit to fall . upon completion, the received data is in eedata . the serial transmit and receive clock is 78 khz during each transmission, and then holds in a high state until the next transmission . the eectrl bits wh en the two - pin interface is selected are shown in table 55. table 55: eectrl bits for 2 - pin interface status bit name read/ write reset state polarity description 7 error r 0 positive 1 when an illegal command is received. 6 busy r 0 positive 1 when serial data bus is busy. 5 rx_ack r 1 positive 1 indicates t hat the eeprom sent an ack bit. 4 tx_ack r 1 positive 1 indicates when an ack bit has been sent to the eeprom . 3:0 cmd[3:0] w 0000 positive cmd[3:0] operation 0000 no- op command. stops the i 2 c clock ( sdck ). if not issued, sdck keeps toggling. 0010 receive a byte from the eeprom and send ack. 0011 transmit a byte to the eeprom. 0101 issue a stop sequence. 0110 receive the last byte from the eeprom and do not send ack. 1001 issue a start sequence. others no operation, set the error bit. the eeprom interface can also be operated by controlling the dio 2 and dio 3 pins directly. the direction of the dio line can be changed from input to output and an output value can be written with a single write operation, thus avoiding collisions (see table 14 port registers (segdio0 -15) ). therefore, no resistor is required in series sdata to protect against collisions. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 67 2.5.11.2 three -w ire ( - wire) eeprom interface with single data pin a 500 khz three - wire interface, using sdata, sdck , and a dio pin for cs is available . the interface is selected by setting dio_eex [1:0] = 10. the eectrl bits when the three - wire interface is selected are shown in table 56. when eectrl is written, up to 8 bits from eedata are either written to the eeprom or read from the eeprom, depending on the values of the eectrl bits. 2.5.11.3 three -w ire ( - wire /spi ) eeprom interface with separate di/do pins if dio_eex[1:0] = 11 , the 71m6543 three - wire interface is the same as above, except di and do are separate pins. in this case, segdio3 becomes do and segdio 8 becomes di. the timing diagrams are the same as for dio_eex [1:0] = 10 except that all output data appears on do and all input data is expected on di. in this mode, di is ignored w hile data is being received on do. this mode is compatible with spi modes 0,0 and 1,1 where data is shifted out on the falling edge of the clock and is strobed in on the rising edge of the clock. table 56: eectrl bits for the 3 -w ire interface control bit name read/ write description 7 wfr w wait for ready . if this bit is set, the trailing edge of busy is de layed until a rising edge is seen on the data line . this bit can be used during the last byte of a write command to cause the int5 interrupt to occur when the eeprom has finished its internal write sequence . this bit is ignored if hiz=0. 6 busy r asserted while the serial data bus is busy . when the busy bit falls, an int5 interrupt occurs. 5 hiz w indicates that the sd signal is to be floated to high impedance immedi ately after the last sdck rising edge. 4 rd w indicates that eedata ( sfr 0x9e ) is to be filled with data from eeprom. 3 :0 cnt[3:0] w specifies the number of clocks to be issued . allowed values are 0 through 8 . if rd = 1, cnt bits of data are read msb first, and right justified into the low order bits of eedata . if rd = 0, cnt bits are sent msb first to the eeprom, shifted out of the msb of eedata . if cnt[3:0] is zero, sdata simply obey s the hiz bit . the timing diagrams in figure 18 through figure 22 describe the 3 - wire eeprom interface behavior . all commands begin when the eectrl register is written . transactions start by first raising the dio pin that is connected to cs . multiple 8 -b it or less commands such as those shown in figure 18 through figure 22 are then sent via eectrl and eedata . when the transaction is finished, cs must be lowered . at the end of a read transaction, the eeprom driv es sdata, but transition s to hiz (high impedance) when cs falls . the firmware should then immediately issue a write command with cnt=0 and hiz=0 to take control of sdata and force it to a low - z state. figure 18: 3 - w ire interface . write command, hiz=0. sclk (output) busy (bit) cnt cycles (6 shown) sdata (output) write -- no hiz d2 d3 d4 d5 d6 d7 eectrl byte written int5 sdata output z (loz) 71m6543f/h and 71M6543G/gh data sheet 68 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 figure 19: 3 - w ire interface . write command, hiz=1 figure 20: 3 - w ire interface . read command. figure 21: 3 - wire interface. write command when cnt=0 figure 22: 3 - w ire interface . write command when hiz =1 and wfr=1. 2.5.12 spi slave port the slave spi port communicates directly with the mpu data bus and is able to read and write data ram and configuration ram (i/o ram) locations . it is also able to send commands to the mpu . the interface to the slave port consists of the s pi_ csz, s p i_c ki , s pi_ di and s p i_ do pins . these pins are multi plexed with the combined dio/ lcd segment driver pins seg dio 3 6 to seg dio39 (pins 3, 2, 1 and 100) . additionally, the spi interface allows flash memory to be read and to be prog rammed. to facilitate flash pro gramming, cycling power or asserting reset causes the spi port pins to default to spi mode. the spi port is disabled by clearing the spi_e bit (i/o ram 0x270c[4]) . possible applications for the spi interface are: cnt cycles (6 shown) write -- with hiz int5 eectrl byte written sclk (output) busy (bit) sdata (output) d2 d3 d4 d5 d6 d7 (hiz) (loz) sdata output z cnt cycles (8 shown) read d0 d1 d2 d3 d4 d5 int5 d6 d7 eectrl byte written sclk (output) busy (bit) sdata (input) sdata output z (hiz) cnt cycles (0 shown) write -- no hiz d7 int5 not issued cnt cycles (0 shown) write -- hiz int5 not issued eectrl byte written eectrl byte written sclk (output) busy (bit) sdata (output) sclk (output) busy (bit) sdata (output) (hiz) sdata output z sdata output z (loz) cnt cycles (6 shown) write -- with hiz and wfr eectrl byte written sclk (output) busy (bit) sdata (out/in) d2 d3 d4 d5 d6 d7 busy ready (from eeprom) int5 (from 6520) sdata output z (hiz) (loz) 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 69 1) an external host reads data from ce locations to obtain metering information. this can be used in applications where the 71m6543 function as a smart front - end with preprocessing capability. since the addresses are in 16-bit format , any type of xram data can be accessed: ce, mpu, i/o ram, but not sfrs or the 80515 - internal register bank. 2) a communication link can be established via the spi interface: by writing into mpu memory locations, the external host can initiate and control processes in the 71m6543 mpu. w riting to a ce or mpu location normally generates an interrupt, a function that can be used to signal to the mpu that the byte that had just been written by the external host must be read and processed. data can also be inserted by the external host without generating an interrupt. 3) an external dsp can access front - end data generated by the adc. this mode of operation uses the 71m6543 as an analog front - end (afe). 4) flash programming by the external host (spi flash mode) . spi transactions a typical spi transaction is as follows. while spi_csz is high, the port is held in an initialized/reset state. during t his state, spi_do is held in high impedance state and all transitions on spi_clk and spi_di are ignored. when spi_csz falls, the port begin s the t ransaction on the first rising edge of spi_clk. as shown in table 57 , a transaction consists of an optional 16 bit address, an 8 bit command, an 8 bit status byte, followed by one or more bytes of data. the transaction ends when spi_csz is raised. some trans actions may consist of a command only. when spi_csz rises, spi command bytes that are not of the form x000000 0 cause the spi_cmd (sfr 0xfd) register to be updated and then cause an interrupt to be issued to the mpu. the exception is if the transaction wa s a single byte. in this case, the spi_cmd byte is always updated and the interrupt issued. spi_cmd is not cleared when spi_csz is high. the spi port supports data transfers up to 10 mb/s. a serial read or write operation requires at least 8 clocks per byte, guaranteeing spi access to the ram is no faster than 1.25 mhz, thus ensuring that spi access to dram is always possible. table 57 : spi transaction fields field name required size (bytes) description address yes, except single byte transaction 2 16- bit address. the address field is not required if the transaction is a simple spi command . command yes 1 8 - bit command . this byte can be used as a command to the mpu. in multi - byte transactions, the msb is the r/w bit. unl ess the transaction is multi - byte and spi_ cmd is exactly 0x80 or 0x00, the spi_cmd register is updated and an spi interrupt is issued. otherwise, the spi_cmd register is unchanged and the interrupt is not issued. s tatus yes, if transaction includes data 1 8 - bit status field, indicating the status of the previous transaction. this byte is also available in the mpu memory map as spi_stat (i/o ram 0x2708) . see table 59 for the contents. d ata yes, if transaction includes data 1 or more the read or write data. address is auto incremented for each new byte. the spi_stat byte is output on every spi transaction and indicates the parity of the previous transaction and the error status o f the previous transaction. potential error s ources are: ? 71m6543 not ready ? t ransaction not ending on a byte boundary. spi safe mode 71m6543f/h and 71M6543G/gh data sheet 70 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 someti mes it is desirable to prevent the spi interface from writing to arbitrary ram locations and thus disturbing mpu and ce operation. this is especially true in afe applications. for this reason, the spi safe mode wa s created. in spi safe mode , spi write o peration s are disabled except for a 16 byte transfer region at address 0x 400 to 0x 40f. if the spi host needs to write to other addresses, it must use the spi_cmd register to request the write operation from the mpu . spi safe mode is enabled by t he spi_sa fe bit (i/o ram 0x270c[3]) . single - byte transaction if a transaction is a single byte, the byte is interpreted as spi_cmd. regardless of the byte value, single - byte transactions always update the spi_cmd register and cause an spi interrupt to be generated. multi - byte transaction as shown in figure 23 , multi - byte operations consist of a 16 bit addres s field, an 8 bit cmd, a status byte, and a sequence of data bytes. a multi byte transaction is three or more bytes. a15 a14 a1 a0 c0 0 31 x d6 d1 d0 d7 d6 d1 d0 c5 c6 c7 (from host) spi_csz (from host) spi_ck (from host) spi_di (from 6543) spi_do 8 bit cmd 16 bit address data[addr] data[addr+1] 15 16 23 24 32 39 extended read . . . serial read a15 a14 a1 a0 c0 c5 c6 c7 x 8 bit cmd 16 bit address data[addr] data[addr+1] extended write . . . serial write d6 d1 d0 d7 d6 d1 d0 x hi z hi z status byte st7 st6 st5 st0 d7 40 47 0 31 15 16 23 24 32 39 40 47 status byte d7 st7 st6 st5 st0 (from host) spi_csz (from host) spi_ck (from host) spi_di (from 6543) spi_do figure 23: spi slave port - typical multi - byte read and w rite operations table 58 : spi c ommand sequence s c ommand sequence d escription addr 1xxx xxxx status byte0 ... byten read data starting at addr. addr is auto - increment ed until spi_csz is raised. upon completion, spi_cmd ( sfr 0xfd ) is updated to 1xxx xxxx and an spi interrupt is generated. the exception is if the com mand byte is 1000 0000. in this case, no mpu interrupt is generated and spi_cmd is not updated. 0xxx xxxx addr byte0 ... byten write data starting at addr. addr is auto - increment ed until spi_csz is raised. upon completion, spi_cmd is updated to 0xxx xxxx and an spi interrupt is generated. the exception is if the command byte is 0000 0000. in this case, no mpu interrupt is generated and spi_cmd is not updated. table 59: spi registers name location rst wk dir description ex_spi 2701[7] 0 0 r/w spi interrupt enable bit. spi_cmd sfr fd[7:0] ? ? r spi command. the 8 - bit command from the bus master. spi_e 270c[4] 1 1 r/w spi port enable bit. it enables the spi interface on pins segdio36 ? segdio39. ie_spi sfr f8[7] 0 0 r/w spi interrupt flag. set by hardware, cleared by writing a 0. spi_safe 270c[3] 0 0 r/w limits spi writes to spi_cmd and a 16 byte region in dram when set. no other write operations are permitted. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 71 name location rst wk dir description spi_stat 2708[7:0] 0 0 r spi_stat contains the status results from the previous spi transaction bit 7 - 71m6543 ready error: the 71m6543 was not ready to read or write as directed by the previous command. bit 6 - read data parity: this bit is the parity of all bytes read from the 71m6543 in the previous command. does not include the spi_stat byte. bit 5 - write data par ity: this bit is the overall parity of the bytes written to the 71m6543 in the previous command. i t includes cmd and addr bytes. bit 4 : 2 - bottom 3 bits of the byte count. does not in clude addr and cmd bytes. one, two, and three byte instructions return 111. bit 1 - spi flash mode: this bit is zero when the test pin is zero. bit 0 - spi flash mode ready: used in spi flash mode. indicates that the flash is ready to receive another write instruction. spi flash mode (sfm) in normal operati on, the spi slave interface can not read or write the flash memory. however, the 71m6543 supports a special flash mode (sfm) which facilitates initial programming of the flash memory. when the 71m6543 is in this mode, the spi can erase, read, and write the flash memory . other memor y elements such as xram and io ram are not accessible in this mode. in order to protect the flash contents, several operations are required before the sfm mode is successfully invoked. in sfm mode, the 71m6543 supports n byte reads and dual - byte writes to flash memory . see the spi transaction description on page 69 for the format of read and write commands. since the flash write op eration is always based on a two - byte word, the initial address must always be even. data is written to the 16 - bit flash memory bus after the odd word is written. when the 71M6543G/gh is operating sfm, spi single - byte transacti ons are used to write to fl_bank[1:0] ( sfr 0xb6[1:0]) . during an spi single - byte transaction, spi_cmd[1:0] will over -wr ite the contents of fl_bank[1:0] (sfr 0xb6[1:0]) . this will allow for access of the entire 128 kb flash memory while operating in sfm. in sfm mode, the mpu is completely halted . for this reason, the interrupt feature described in the spi transaction section above is not available in sfm mode. the 71m6543 must be reset by the wd timer or by the reset pin in order to exit sfm mode. invoking sfm the following conditions must be m et prior to invoking sfm: ? ice_e = 1. this disables the watchdog and adds another layer of protection against inadvertent flash corruption. ? the external power source (v3p3sys, v3p3a) is at the proper level (> 3.0 vdc) . ? preboot = 0 ( sfr 0xb2[7]) . this validates the state of the secure bit (sfr 0xb2[6]) . ? secure = 0. this i/o ram register i ndicates that spi secure mode is not enabled. operations are limited to sfm mass erase mode if the secure bit = 1 (flash read back is not allowed in secure mo de). ? flsh_unlock[3:0] = 0010 ( i/o ram 0x2702[7:4]) . the i/o ram r egisters sfmm ( i/o ram 0x2080 ) and sfms (i/o ram 0x2081) a re used to invoke sfm. only the spi interface has access to these two registers. this eliminates an indirect path from the mpu for 71m6543f/h and 71M6543G/gh data sheet 72 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 disabling the watchdog. sfmm and sfms need to be written to in sequence in order to invoke sfm. this sequential write process prevent s inadvertent entering of sfm. the sequence for invoking sfm is: ? first, write to sfmm ( i/o ram 0x2080 ) register . th e value written to this register defines the sfm mode. o 0xd1: mass erase mode. a flash mass erase cycle is invoked upon entering sfm. o 0x2e: flash read back mode. sfm is entered for flash read back purposes. flash writes will not be blocked and it is up to the user to guarantee that only previously unwritten locations are written. this mode is not accessible when spi secure mode is set. o sfm is not invoked if any other pattern is written to th e sfmm register. ? next, write 0x 96 to the sfms ( i/o ram 0x2081 ) register . this write invoke s sfm provided that the previous write operation to sfmm met the requirements. writing any other pattern to this register does not invoke sfm. addi tionally, any write operations to this register automatically reset the previo usly written sfmm register values to zero. sfm d etails the following occur s upon entering sfm. ? the ce is disabled. ? the mpu is halted. once the mpu is halted it can only be restarted with a reset. this reset can be accomplished with the reset pin , a watchdog reset , or by cycling power (without battery at the vbat pin) . ? the flash control logic is reset in case the mpu was in the middle of a flash write operation or erase cycle. ? mass erase is invoked if specified in the sfmm ( i/o ram 0x2080 ) register (see invoking sfm, above) . the secure bit ( sfr 0xb2[6] ) is cleared at the end of this and all mass erase cycles. ? all spi read and write operation s now refer to flash instead of xram space. the spi host can access the current state of the pending multi -c ycle flash access by performing a 4 - byte spi write of any address and checking the status field. all spi write operations in sfm mode must be 6 - byte write transaction s that write two bytes to an even address. the write transactions must contain a command byte of 0x00 which is the form that does not create an mpu interrupt. auto incrementing is disabled for write operation s. spi read transactions can make use of auto increment an d may access single bytes. the command byte must always be 0x80 in sfm read transactions. spi commands in sfm interrupts are not generated in sfm since the mpu is halted. the format of the commands is shown in the spi t ransactions description on page 69. spi transactions 2.5.13 hardware watchdog timer a n independent, robust, fixed- duration, watchdog timer (wdt) is included in the 71m6543. it uses the rtc crystal oscillator as its time base and must be refreshed by the mpu firmware at least every 1.5 seconds. when not re freshed on time , the wdt overflows and the part is reset as if the reset pin were pulled high, except that the i/o ram bits are in the same state as after a wake - up from slp or lcd modes (see the i/o ram description in 5.2 for a list of i/o ram bit states after reset and wake - up). four thousand, one hundred ck32 cycles (or 125 ms) after the wdt overflow, the mpu is launched from program address 0x0000 . the watchdog timer is also reset when t he internal signal wake=0 (see 3.4 wake - up behavior ). the wdt is disabled when the ice_e pin is pulled high. for details, see 3.3.4 watchdog timer (wdt) reset . 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 73 2.5.14 test ports (tmuxout and tmux2out p in s ) two independent multiplexers allow the selection of internal analog and digital signals for the tmuxout and tmux2out pins. these pins are multiplexed with the seg47 and seg46 function. in order to function as test pins, lcd_map[46] ( i/o ram 0x2406[6]) and lcd_map[47] ( i/o ram 0x2406[7] ) must be 0. one of the digital or analog signals listed in table 61 can be selected to be output on the tmuxout pin . the function of the multiplexer is controlled with the i/o ram register tmux [4:0] (i/o ram 0x2502[4:0] , as shown in table 60. one of the digital or analog signals listed in table 61 can be selected to be output on the tmux 2 out pin. the function of the multiplexer is controlled with the i/o ram register tmux 2 [4:0] (i/o ram 0x2503[4:0]) , as shown in . the tmux and tmux2 i/o ram locations are non - volatile and their contents are preserved by battery power and across resets. the tmuxout and tmux2out pin s may be used for diagnosis purposes or in production test. the rtc 1 - second output may be used to calibrate the crystal oscillator. the rtc 4- second output provides even higher precision. table 60: tmux[4 :0] selections tmux[5:0] signal name description 1 rtclk 32.768 khz clock waveform 9 wd_rst indicates when the mpu has reset the watchdog timer. can be monitored to determine spare time in the watchdog timer. a ckmpu mpu clock ? see table 8 d v3aok bit indicates that the v3p3a pin voltage is 3.0 v. the v3p3a and v3p3sys pins are expected to be tied together at the pcb level. the 71m654 3 monitors the v3p3a pin voltage only. e v3ok bit indicates that the v3p3a pin voltage is 2.8 v. the v3p3a and v3p3sys pins are expected to be tied together at the pcb level. the 71m654 monitors the v3p3a pin voltage only. 1b mux_sync internal multiplexer frame sync signal. see figure 4 and figure 5 . 1c ce_busy interrupt se e 2.3.3 on page 25 and figure 12 on page 46 1d ce_xfer interrupt 1f rtm output from ce see 2.3.5 on page 26 note: all tmux[5:0] values which are not shown are reserved. 71m6543f/h and 71M6543G/gh data sheet 74 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 table 61: tmux2[4 :0] selections tmux2[4:0] signal name description 0 wd_ovf indicates when the watchdog timer has expired (overflowed). 1 pulse_1s one second pulse with 25% duty cycle. this signal can be used to measure the deviation of the rtc from an ideal 1 second interval. multiple cycles should be averaged together to filter out jitter. 2 pulse_4s four second pulse with 25% duty cycle. this signal can be used to measure the deviation of the rtc from an ideal 4 second interval. multi ple cycles should be averaged together to filter out jitter. the 4 second pulse provides a more precise measurement than the 1 second pulse. 3 rtclk 32.768 khz clock waveform 8 spare[1] bit ? i/o ram 0x2704[1] copies the value of the bit stored in 0x2704[1]. for general purpose use. 9 spare[2] bit ? i/o ram 0x2704[2] copies the value of the bit stored in 0x2704[2]. for general purpose use. a wake indicates when a wake event has occurred. b mux_sync internal multiplexer frame sync signal. see figure 4 and figure 5 . c mck see 2.5.3 on page 50 . e gndd digital gnd. use this signal to make the tmux2out pin static. 12 int0 ? dig i/o interrupt 0. see 2.4.9 on page 40 . also see figure 12 on page 46 . 13 int1 ? dig i/o 14 int2 ? ce_pulse 15 int3 ? ce_busy 16 int4 - vstat 17 int5 ? eeprom/spi 18 int6 ? xfer, rtc 1f rtm_ck (flash) see 2.3.5 on page 26 . note: all tmux 2[ 4 :0] values which are not shown are reserved. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 75 3 functional description 3.1 theory of operation the energy delivered by a power source into a load can be expressed as: = t dt t i t v e 0 ) ( ) ( assuming phase angles are constant, the following formulae apply: ? p = real energy [wh] = v * a * cos * t ? q = reactive energy [varh] = v * a * sin * t ? s = apparent energy [vah] = 2 2 q p + for a practical meter, not only voltage and current amplitudes, but also phase angles and harmonic con tent may change constantly . thus, simple rms measurements are inherently inaccurate . a modern solid - state electricity meter ic such as the teridian 71m6543 functions by emulat ing the integral oper ation above, i.e. it processes current and voltage samples through an adc at a constant frequency . as long as the adc resolution is high enough and the sample frequency is beyond the harmonic range of interest, the current and voltage samples, multiplied with the time period of sampling yield s an accurate quantity for the momentary energy . summing - up the momentary energy quantities over time result s in accumulated energy. figure 24 : voltage , current, momenta ry and accumulated energy figure 24 shows the shapes of v(t), i(t), the momentary power and the accumulated power, resulting from 50 samples of the voltage and current signals over a period of 20 ms . the application of 240 vac and 100 a results in an accumulation of 480 ws (= 0.133 wh) over the 20 ms period, as indicated by the a ccumulated p ower curve . the described sampling method works reliably, even in the presence of dynamic phase shift and harmonic distortion. 3.2 battery modes shortly after system power (v3p3sys) is applied, the 71m6543 is in mission mode (msn mode). msn mode means that the part is operating with system power and that the internal pll is stable. this mode is the normal operating mode where the part is ca pable of measuring energy. -500 -400 -300 -200 -100 0 100 200 300 400 500 0 5 10 15 20 current [a] voltage [v] energy per interval [ws] accumulated energy [ws] 71m6543f/h and 71M6543G/gh data sheet 76 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 when system power is not available, the 71m654 3 is in one of three battery modes: ? brn mode (brownout mode) ? lcd mode (lcd - only mode) ? slp mode (sleep mode) . an internal comparator monitors the voltage at the v3p3sys pin (note that v3p3sys and v3p3a are typically connected together at the pcb level). when the v3p3sys dc voltage drops below 2 . 8 vdc, the comparator resets an internal power status bit called v3ok . as soon as system power is removed and v3ok = 0 , the 71m654 3 is forced to brn mode. the mpu continues to execute code when the system transitions from msn to brn mode or from brn to msn mode. a soft reset should be executed when returning from brn to msn mode in order to re - initialize the i/o ram. depending on the mpu code, t he mpu can choose to stay in brn mode, or transition to lcd or to slp mode ( via the i/o ram bits lcd_only , i/o ram 0x28b2[6] and sleep, i/o ram 0x28b2[7] ) . brn mode is similar to msn mode except that resources powered by system power, such as the adc and the ce, are not available (see table 62), and that the supply current is drawn from the vbat pin. in brn mode, the pll continues to function at the sa me frequency as in msn mode. the mpu can configure brn mode as it desires. for instance, it may choose to minimize battery power by reducing the pll or mpu clock speed (see 3.2.1 brn mode , for the recommended settings to realize minimum power consumption in brn mode). when system power is restored, the 71m6543 automatically transition s from any of the battery modes (brn, lc d, slp) back to msn mode. figure 25 shows a state diagram of the various operatin g modes, with the possible transitions between modes . when the part wakes - up under battery power, the part automatically enter s brn mode (see 3.4 wake - up behavior ). from brn mode, the part may enter either lcd mode or slp mode, as controlled by the mpu. figure 25 : operation modes state diagram v3p3sys rises v3p3sys falls msn brn lcd sleep or vbat insufficient system power battery power lcd_only reset & vbat sufficient reset wake flags wake event reset & vbat insufficient v3p3sys rises v3p3sys rises slp wake event vbat insufficient vbat insufficient vstat=001 vstat=00x 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 77 transitions from both lcd and slp mode to brn mode c a n b e initiated by the following events: ? w ake - up timer time out. ? p ushbutton (pb) is activated . ? a rising edge on segdio4, segdio52 or segdio55. ? activity on the rx or opt_rx pins. the mpu has access to a variety of registers that signal the event that caused the wake up. see 3.4 wake - up behavior for details. table 62 shows the circuit functions available in each operating mode. table 62 : available circuit functions circuit function system power battery power msn (mission mode) brn (brownout mode) lcd sleep pll_fast=1 pll_fast=0 pll_fast=1 pll_fast=0 ce (computation engine) yes yes -- 1 -- -- -- fir yes yes -- -- -- -- adc, vref yes yes -- -- -- -- pll yes yes yes yes b oost 2 -- battery measurement yes yes yes yes -- -- temperature sensor yes yes yes yes yes yes max mpu clock rate 4.92mhz (from pll) 1.57mhz (from pll) 4.92mhz (from pll) 1.57mhz (from pll) -- -- mpu_div clk. divider yes yes yes yes -- -- ice yes yes yes yes -- -- dio pins yes yes yes yes -- -- w atchdog timer yes yes yes yes -- -- lcd yes yes yes yes yes -- lcd boost yes yes yes yes yes eeprom interface (2 - wire) yes yes yes yes -- -- eeprom interface (3 - wire) yes yes yes yes -- -- uart (full speed) yes yes yes yes -- -- optical tx modulation 38.4khz 38.9khz 38.4khz 38.9khz -- -- flash read yes yes yes yes -- -- flash page erase yes yes yes yes -- -- flash write yes yes yes yes -- -- ram read and write yes yes yes yes -- -- wakeup timer yes yes yes yes yes yes osc and rtc yes yes yes yes yes yes dram data preservation yes yes yes yes -- -- nv ram data preservation yes yes yes yes yes yes notes: 1. ?--? indicates that the corresponding circuit is not active 2. ?boost? implies that the lcd boost circuit is active (i.e., lcd_vmode[1:0] = 10 ( i/o ram 0x2401[7:6] )). t he lcd boost circuit requires a clock from the pll to function. thus, the pll is automatically kept active if lcd boost is active while in lcd mode, ot herwise the pll is de - activated . 71m6543f/h and 71M6543G/gh data sheet 78 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 3.2.1 brn mode in brn mode, most non - metering digital functions are active ( as shown in table 62) i ncluding ice, uart, eeprom, lcd and rtc. in brn mode, the pll continues to function at the same frequency as msn mode. it is up to the mpu to scale down the pll (using pll_fast, i/o ram 0x2200[4] ) or the mpu fre quency (using mpu_div[2:0], i/o ram 0x2200[2:0] ) in order to sa ve power. from brn mode, the mpu can choose to enter lcd or slp modes. when system power is re stored while the 71m6543 is in brn mode , the part automatical ly transition s to msn mode . the recommended minimum power configuration for brn mode is as follows: ? rce0 = 0x00 ( i/o ram 0x2709[7:0] ) - remote sensors disabled ? lcd_bat = 1 ( i/o ram 0x2402[7] ) - lcd powered from vbat ? lcd_vmode[1:0] = 0 ( i/o ram 0x2401[7:6] ) - 5v lcd boost disabled ? ce6 = 0x00 ( i/o ram 0x2106 ) - ce, rtm and chop are disabled ? mux_div[3:0] = 0( i/o ram 0x2100[7:4]) - the adc multiplexer is disabled ? adc_e = 0 ( i/o ram 0x2704[4] ) - adc disabled ? vref_cal = 0 ( i/o ram 0x2704[7] ) ? v ref not driven out ? vref_dis = 1 ( i/o ram 0x2704[6] ) - vref disabled ? pre_e = 0 ( i/o ram 0x2704[5] - pre - amp disabled ? bcurr = 0 ( i/o ram 0x2704[3] ) - battery 100a current load off ? tmux[5:0] = 0x0e ( i/o ram 0x2502[5:0] ) ? tmuxout output set to a dc value ? tmux2[4:0] = 0x0e ( i/o ram 0x250 3 [4:0] ) ? tmuxout2 output set to a dc value ? ckgn = 0x24 ( i/o ram 0x2200 ) - pll set slow, and mpu_div[2:0] (i/o ram 0x2200[2:0] ) set to maximum ? temp_per [2:0] = 6 ( i/o ram 0x28a0[2:0] ) - temp measurement set to automatic every 512 s ? temp_bsel = 1 ( i/o ram 0x28a0[7] ) - temperature sensor monitors vbat ? pcon | = 1 ( sfr 0 x 87 ) - at t he end of the main brn loop, halt the mpu and wait for an interrupt ? the baud rate registers are adjusted as needed ? all unused interrupts are disabled 3.2.2 lcd mode lcd mode may be commanded by the mpu at any time by setting the lcd_only control bit ( i/o ram 0x2 8b2 [ 6 ] ). however, it is recommended that the lcd_only control bit be set by the mpu only after the 71m6543 has entered brn mode. for example, i f the 71m6543 is in msn mode when lcd_only is set , the duration of lcd mode is very brief and the 71m6543 imm ediately 'wake s'. in lcd mode, v3p3d is disabled, and the vbat pin supplies the lcd current . before asserting lcd_only mode, it is recommended that the mpu minimize pll current by reducing the output fre quency of the pll to 6.29 mhz (i.e., write pll_fast = 0, i/o ram 0x2200[4] ). the lcd boost system requires a clock from the pll for its operation . thus, if the lcd boost system is enabled (i.e., lcd_vmode[1:0] = 10, i/o ram 0x2401[7:6] ), then the pll is automatically kept active during lcd mode, otherwise t he pll is de - activated. in lcd mode, the data contained in the lcd_seg registers is displayed using the segment driver pins. up to two lcd segments connected to the pins segdio22 and segdio23 can be made to blink without the involvement of the mpu, which is disabled in lcd mode. to minimize battery power consumption, only segments that are used should be enabled. after the transition from lcd mode to msn or brn mode, the pc (program counter) is at 0x0000, the xram is in an undefined state, and c onfiguration i/o ram bits are reset (see table 71 for i/o ram state upon wake) . the d ata stored in non - volatile i/o ram locations is pre served in lcd mode (the shaded locations in table 71 are non - volatile). 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 79 3.2.3 slp mode the slp mode may be commanded by the mpu whenever main system power is absent by asserting the sleep bit (i/o ram 0x28b2[7]) . the purpose of the slp mode is to consume the least power while still maintaining the rtc, temperature compensation of the rtc, and the non - volatile portions of the i/o ram. in slp mode, the v3p3d pin is disconnected, removing all sources of leakage from vbat and v3p3sys. the non- volatile memory domain and the basic functions, such as temperature sensor, oscillator, and rtc, are powered by the vbat_rtc input. in this mode, the i/o configuration bits, lcd configuration bits, and nv ram values are preserved and rtc and oscillator continue to run. this mode can be exited only by system power - up or one of the wake methods described in 3.4 wake - up behavi or . if the sleep bit is asserted when v3p3sys pin power is present (i.e., while in msn mode), the 71m6543 enters slp mode, resetting the internal wake signal, at which point the 71m6543 begins the standard wake from sleep procedures as described in 3.4 wake - up behavior . after the transition from slp mode to msn or brn mode the pc is at 0x0000, the xram is in an undefined state, and the i/o ram is only partially preserved (see the description of i/o ram stat es in 5.2 ). the non - volatile sections of the i/o ram are preserved unless reset goes high. 71m6543f/h and 71M6543G/gh data sheet 80 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 3.3 fault and reset behavior 3.3.1 events at power - down power fa ult detection is performed by internal comparators that monitor the voltage at the v3p3a pin and also monitor the internally generated vdd pin voltage (2.5 vdc). the v3p3sys and v3p3a pins must be tied together at the pcb level, so that the comparators, wh ich are internally connected only to the v3p3a pin, are able to simultaneously monitor the common v3p3sys and v3p3a pin voltage. the following discussion assumes that the v3p3a and v3p3sys pins are tied together at the pcb level. during a power fail ure, as v3p3a falls, two thresholds are detected: ? the first threshold, at 3 .0 vdc ( vstat[2:0] = 001 , sfr 0xf9[2:0] ) , warns the mpu that the analog modules are no longer accurate. other than warning the mpu, the hardware takes no action when this threshold is crossed. this comparison produces an internal bit named v3oka . ? the second threshold, at 2.8 vdc , cause s the 71m6543 to switch to battery power. this switching happen s while the flash and ram systems are still able to read and write. this comparison pr oduces an internal bit named v3ok . the power quality is reflected by the vstat[2:0] register in i/o ram space, as shown in table 63. the vstat[2:0] register is located at sfr address f9 and occupies bits 2 : 0. the vstat[2:0] field can only be read. in addition to the state of the main power, the vstat[2:0] register provide s information about the internal vdd voltage under battery power. note that if system power (v3p3a) is above 2.8 vdc , the 71m6543 always switch es from battery to system power. table 63: vstat[2:0] (sfr 0xf9[2:0]) vstat[2:0] description 000 system power ok. v3p3a > 3.0 vdc . analog modules are functional and accurate. 001 system power is l ow. 2.8 vdc < v3p3a < 3.0 vdc . analog modules not accurate. switch over to battery power is imminent. 010 the ic is on b att ery power and vdd is ok. vdd > 2.25 vdc . the ic has f ull digital functionality. 011 the ic is on b att ery power and 2.25 vdc > vdd > 2.0 vdc . flash write operation s are inhibited. 101 the ic is on b att ery power and vdd < 2.0, which means that the mpu is nearly out of vol tage. a reset occur s in 4 cycles of th e crystal clock ck32 . the response to a system power fault is almost entirely controlled by firmware. during a power failure, system power slowly fall s . thi s fall in power is monitored by internal comparator s that cause the hardware to automatically switch over to taking power from the v bat input. an interrupt notifies the mpu that the part is now battery powered. at this point, it is the mpu?s responsibility to reduce power by slowing the clock rate, disabling the pll, etc. precision analog components such as the bandgap reference, the bandgap buffer, and the adc are powered only by the v3p3a pin and become inaccurate and ultimately unavailable as the v3p3a pin voltage continues to drop (i.e., circuits powered by the v3p3a pi n are not backed by the vbat pin) . when the v3p3a pin falls below 2.8 vdc, the adc clocks are halted and the am plifiers are unbiased . meanwhile, control bits such as adc_e bit (i/o ram 0x2704[4]) are not af fected, since their i/o ram storage is powered fr om the vdd pin (2.5 vdc). the vdd pin is supplied with power through an internal 2.5 vdc regulator that is connected to the v3p3d pin. in turn, the v3p3d pin is switched to receive power from the vbat pin when the v3p3sys pin drops below 3.0 vdc. note that the v3p3sys and v3p3a pins are typically tied together at the pcb level. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 81 3.3.2 ic behavior at low battery voltage when system power is not present, the 71m6543 relies on the vbat pin for power. if the vbat voltage is not sufficient to maintain vdd at 2.0 vdc or greater, the mpu cannot operate reliably. low vbat voltage can occur while the part is operating in brn mo de, or while it is dormant in slp or lcd mode. two cases can be distinguished, depending on mpu code: ? case 1: system power is not present , and the part is waking from slp or lcd mode . in this case, the hardware checks the value of vdd to determine if pr ocessor operation is possible. if it is not possible, the part configures itself for brn operation, and holds the processor in reset (wake=0). in this mode, vbat powers the 1.0 vdc reference for the lcd system , the vdd regulator, the pll, and the fault c omparator. the part remain s in this waiting mode until vdd becomes high due to system power being applied or the vbat battery being replaced or recharged. ? case 2: the part is operating under vbat power and vstat [2:0] (sfr 0xf9[2:0]) becomes 101, in dica ting that vdd falls below 2.0 vdc . in this cas e , the firmware has two choices: 1) one choice is to assert the sleep bit ( i/o ram 0x28b2[7]) immediately. this assertion preserve s the remaining charge in vbat. of course, if the battery voltage is not increased, the 71m6543 enter s case 1 a s soon as it t ries to wake up. 2) the alternati ve choice is to enter the waiting mode described in case 1 immediately. specifically, if the firmwar e does not assert the sleep bit , the hardware reset s the processo r four ce32 clock cycles (i.e. 122 s) after vstat [2:0] becomes 101 and, as described in case 1, it begin s waiting for vdd to become greater than 2 .0 vdc . the mpu wake s up when system power returns , or when vdd becomes greater than 2.0 vdc . in either case, when vdd recovers, and when the mpu wakes up, the wf_badvdd flag ( i/o ram 0x28b0[2] ) can be read to determine that the processor is recovering from a bad vbat condition. the wf_badvdd fl ag remain s set until the next time wake falls. this flag is independent of the other wf flags. in all cases, low vbat voltage does not corrupt rtc operation, the state of nv memory, or the state of non- volatile memory . these circuits depend on the vbat_rtc pin for power. 3.3.3 reset sequence when the reset pin is pulled high, all digital activity in the chip stops, with the exception of the oscillator and rtc . additionally, all i / o ram bits are forced to their rst state. a r eliable reset does not occur unti l reset has been high at least for 2 s. note that tmux and the rtc are not reset unless the test pin is pulled high while reset is high . the reset control bit ( i/o ram 0x 2200[3] ) performs an identical reset to the reset pin except that a significan tl y shorter reset timer is used. once initiated, the reset sequence wait s until the reset timer tim es out . the time out occur s in 4100 ce32 cycles (125 ms) , at which time the mpu begin s executing its pre - boot and boot sequences from address 0x00 00. see 2.5.1.1 for a detailed description of the pre -boot and boot sequences . if system power is not present, th e reset timer duration is two ce32 c ycles, at which time the mpu begins executing in brn mode, starting at address 0x00 00. a softer form of reset is initiated when the e_rst pin of the ice interface is pulled low . this event causes the mpu and other regis ters in the mpu core to be reset but does not reset the remainder of the 71m6543 . it does not trigger the reset sequence. this type of reset is intended to reset the mpu program, but not to make other changes to the chip?s state. 3.3.4 watchdog timer (wdt) reset the watchdog timer (wd t ) i s described in 2.5.13 . a status bit, wf_ovf (i/o ram 0x28b0[4]) , is set when a wdt overflow occurs. similar to the other wake flags, this bit is powered by the non - volatile supply and can be read by the mpu to determine if the part is initializing after a wd overflow event or after a power -up . the wf_ovf bit is clea red by the reset pin. there is no internal digital state that could deactivate the wd t . for debug purposes, however, the wd t can be disabled by raising the ice_e pin to 3.3 vdc . 71m6543f/h and 71M6543G/gh data sheet 82 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 in normal operation, the wd t is reset by periodically writing a one to the wd_rst control bit i/o ram 0x28b4[7]) . the watchdog timer is also reset when the 71m6543 wakes from lcd or slp mode , and when ice_e=1. 3.4 wake - up behavior as described above, the part always wake s up in msn mode when system power is restored . as stated in 3.2 battery modes , t ransition s from both lcd and slp mode to brn mode can be initiated by a wake - up timer time out, when the p ushbutton (pb) input is activated , a rising edge on segdio4, segdio52 or segdio55, or by activity on the rx or opt_rx pins. 3.4.1 wake on hardware events the followin g pin signal events wake the 71m6543 from slp or lcd mode: a high level on the pb pin, either edge on the rx pin, a rising edge on the segdio4 pin, a high level on the segdio52 pin, or a high level on the segdio55 pin or either edge on the opt_rx pin. see table 64 for de - bounce details on each pin and for further details on the opt_rx/segdio55 pin. t he segdio4 , seg dio52, and seg dio55 pins must be configured as dio inputs and their wake enable ( ew_x bits) must be set. in slp and lcd modes, the mpu is held in reset and cannot poll pins or react to interrupts. when one of the hardware wake events occurs, the internal wake signal rises and within thr ee ck32 cycles the mpu begins to execute. the mpu can de ter mine which one of the pins awakened it by checking the wf_pb , wf_rx , wf_segdio4 , wf_dio52 , or wf_dio55 flags (see table 64) . if the part is in slp or lcd mode, it can be awakened by a high level on the pb pin. this pin is normally pulled to gnd and can be connected externally so it may be pulled high by a push button depression . some pins are de - bounced to reject emi noise . detection hardware ignore s all transitions after the initial transition . table 64 shows which pins ar e equipped with de- bounce circuitry. pins that do not have de - bounce circuits must still be high for at least 2 s to be recognized. the wake enable and flag bits are shown in table 64. the wake flag bits are set by hardware when the mpu wakes from a wake event . note that the pb flag is set whenever the pb is pushed, even if the part is already awake. table 66 lists the events that clear the wf flags. in addition to push buttons and timers, the part can also reboot due to the reset pin, the reset bit (i/o ram 0x2200[3]) , the wdt, the cold start detector, and e_rst. as seen in table 64 , each of these mechanisms has a flag bit to alert the mpu to the source of the wakeup. if the wakeup is caused by return of syst em power, there is no active wf flag and the vstat[2:0] field ( sfr 0xf9[2:0]) indicate s that system power is stable . table 64 : wake enable and flag bits wake enable wake flag de - bounce description name location name location wake_arm 28b2[5] wf_tmr 28b1[5] no wake on timer. ew_pb 28b3[3] wf_pb 28b1[3] yes wake on pb. * ew_rx 28b3[4] wf_rx 28b1[4] 2 s wake on either edge of rx. ew_dio4 28b3[2] wf_dio4 28b1[2] 2 s wake on segdio4. ew_dio52 28b3[1] wf_dio52 28b1[1] yes wake on segdio52. * ew_dio55 28b3[0] wf_dio55 28b1[0] yes opt_rxdis = 1: wake on dio55 with 64 ms de - bounce . * opt_rxdis = 0: wake on either edge of opt_rx with 2 s de - bounce . opt_rxdis: i/o ram 0x2457[2] always enabled wf_rst 28b0[6] 2 s wake after reset. always enabled wf_rstbit 28b0[5] no wake after reset bit. always enabled wf_erst 28b0[3] 2 s wake after e_rst. (ice must be enabled) 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 83 wake enable wake flag de - bounce description name location name location always enabled wf_ovf 28b0[4] no wake after wd reset. always enabled wf_cstart 28b0[7] no wake after cold start - the first application of power. always enabled wf_badvdd 28b0[2] no wake after insufficient vbat voltage. * this pin is sampled every 2 ms and must remain high for 64 ms to be declared a valid high level. this pin is high - level sensitive. table 65 : wake bits name location rst wk dir description ew_dior 28b3[2] 0 ? r/w connects segdio4 to the wake logic and permits segdio4 rising to wake the part. this bit has no effect unless segdio4 is configured as a digital input. ew_dio 52 28b3[1] 0 ? r/w connects dio52 to the wake logic and permits dio52 high level to wake the part. this bit has no effect unless dio52 is configured as a digital input. ew_dio 55 28b3[0] 0 ? r/w connects dio55 to the wake logic and permits dio55 high level to wake the part. this bit has no effect unless dio55 is configured as a digital input. wake_arm 28b2[5] 0 ? r/w arms the wake timer and loads it with the value in wake_tmr ( i/o ram 0x2880) register . when slp or lcd mode is asserted by the mpu, the wake timer become s active. ew_pb 28b3[3] 0 ? r/w connects the pb pin to the wake logic and permits pb high level to wake the part. pb is always configured as an input. ew_rx 28b3[4] 0 ? r/w connects the rx pin to the wake logic and permits rx rising to wake the part. see 3.4.1 for de - bounce issues. wf_dio 4 28b1[2] 0 ? r segdio4 flag bit. if segdio4 is configured to wake the part, this bit is set whenever segdio4 rises . it is held in reset if segdio 4 is not configured for wakeup. wf_dio 52 28b1[1] 0 ? r seg dio52 flag bit. if seg dio52 is configured to wake the part, this bit is set whenever seg dio52 is a high level . it is held in reset if seg di o 52 is not configured for wakeup. wf_dio 55 28b1[0] 0 ? r seg dio55 flag bit. if seg dio55 is configured to wake the part, this bit is set whenever seg dio55 is a high level . it is held in reset if segdio 55 is not configured for wakeup. wf_tmr 28b1[5] 0 ? r indicates that the wake timer caused the part to wake up. wf_pb 28b1[3] 0 ? r indicates that the pb pin caused the part to wake. wf_rx 28b1[4] 0 ? r indicates that rx pin caused the part to wake. wf_rst wf_rstbit wf_erst wf_cstart wf_badvdd 28b0[6] 28b0[5] 28b0[3] 28b0[7] 28b0[2] * * * * * ? r indicates that the rst pin, e _ rst pin, reset bit ( i/o ram 0x2200[3]) , the cold start detector, or low voltage on the vbat pin caused the part to re set. *see table 66 for details. 71m6543f/h and 71M6543G/gh data sheet 84 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 table 66: clear events for wake flags flag wake on: clear events wf_tmr timer expiration wake falls wf_pb pb pin high level wake falls wf_rx either edge rx pin wake falls wf_dio4 segdio4 rising edge wake falls wf_dio52 segdio52 high lev el wake falls wf_dio55 if opt_rxdis = 1 ( i/o ram 0x2457[2] ), wake on segdio55 high if opt_rxdis = 0 wake on either edge of opt_rx wake falls wf_rst reset pin driven high wake falls, wf_cstart, wf_rstbit, wf_ovf, wf_badvdd wf_rstbit r e s e t bit is set ( i/o ram 0x2200[3] ) wake falls, wf_cstart, wf_ovf, wf_badvdd, wf_rst wf_erst e_rst pin driven high and the ice interface must be enabled by driving the ice_e pin high. wake falls, wf_cstart, wf_rst, wf_ovf, wf_rstbit wf_ovf watchdog (wd) reset wake falls, wf_cstart, wf_rstbit, wf_badvdd, wf_rst wf_cstart cold - start (i.e., after the application of first power) wake falls, wf_rstbit, wf_ovf, wf_badvdd, wf_rst note: ?wake falls? implies that the internal wake signal has been reset, which happens automatically upon entry into lcd mode or sleep mode (i.e., when the mpu sets the lcd_only bit ( i/o ram 0x28b2[6] ) or the sleep ( i/o ram 0x28b2[7] ) bit) . when the internal wake signal resets, all wake flags are reset. since the various wake flags are automatically reset when wake falls, it is not necessary for the mpu to reset these flags before entering lcd mode or sleep mode. also, other wake events can cause the wake flag to reset, as indicated above (e.g., the wf_rst flag can also be reset by any of the following flags setting : wf_cstart , ws_rstbit , wf_ovf , wf_badvdd ) 3.4.2 wake on timer if the part is in slp or lcd mode, it can be awakened by the wake t imer. until th is timer times out, the mpu is in reset due to the internal wake signal being low. when the wake t imer times out, wake rises and within three ck32 cycles, the mpu begins to execute. the mpu can determine that the timer woke it by checking the wf_tmr (i/o ram 0x28b1[2] ) wake flag. the wake t imer begins timing when the part enters lcd or slp mode. it s duration is controlled by the wake_tmr[7:0] register (i/o ram 0x2880) . the timer duration is wake_tmr[7:0] +1 seconds. the wake t imer is armed by setting wake_arm = 1 ( i/o ram 0x28b2[5] ) . it must be armed at least three rtc cycles before either slp or lcd modes are initiated. setting wake_arm presets the timer with the value in wake_tmr and rea dies the timer to start when the mpu writes to the sleep (i /o ram 0x28b2[7] ) or lcd_only (i/o ram 0x28b2[6]) bits. the timer is neither reset nor disarmed w hen the mpu wakes - up. thus, once armed and set, the mpu continue s to be awakened wake_tmr [7:0] seconds after it requests slp mode or lcd mode (i.e., once written, the wake_tmr[7:0] register holds its value and does not have to be re - written each time the mpu enters slp or lcd mode. also, since wake_tmr[7:0] is non - volatile, it also holds its value through resets and power failures). 3.5 data flow and mpu/ce communication the data flow b etween the compute engine ( ce ) and the mpu is shown in figure 26. in a typical application, t he 32- bit ce se quen tially processes the samples from the adc inputs , performing calculations to measure 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 85 active power (wh), reactive power (varh), a 2 h, and v 2 h for four - quadrant metering . these measurements are then accessed by the mpu, processed further and output using th e peripheral devices available to the mpu. both the ce and multiplexer are controlled by the mpu via shared registers in the i/o ram and in ram. the ce outputs a total of six discrete signals to the mpu. these consist of four pulses and two interrupts: ? ce_busy ? xfer_busy ? wpulse, vpulse (pulses for active and reactive energy) ? xpulse, ypulse (auxiliary pulses) these interrupts are connected to the mpu interrupt service inputs as external interrupts. ce_busy indicates that the ce is actively processing data. this signal occurs once every multiplexer cycle (typically 396 s), and indicates that the ce has updated status information in its cestatus register (ce ram 0x80) . xfer_busy indicates that the ce is updating data to the output region of the ram. t his update occur s when ever the ce has finished generating a sum by completing an accumulation interval determined by sum_samps[12:0], i/o ram 0x2107[4:0], 2108[7:0], (typically every 1000 ms). interrupts to the mpu occur on the falling edges of the xfer _busy and ce_busy signals. wpulse and vpulse are typically used to signal energy accumulation of real (wh) and reactive (varh) energy. tying wpulse and vpulse into the mpu interrupt system can support pulse counting. xpulse and ypulse can be used to signa l events such as sags and zero crossings of the mains voltage to the mpu. tying these outputs into the mpu interrupt system relieves the mpu from having to read the cestatus register at every occurrence of the ce_busy interrupt in order to detect sag or z ero crossing events. refer to 5.4 ce interface description on page 120 for additional information on setting up the device using the mpu firmware. figure 26: mpu/ce data flow mpu ce i/o ram (configuration ram) pulses samples wpulse vpulse xpulse ypulse control processed metering data mux control control interrupts ceconfig cestatus xram ce_busy xfer_busy 71m6543f/h and 71M6543G/gh data sheet 86 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 4 application information 4.1 connecting 5 v devices all digital input pins of the 71m6543 are compatible with external 5 v devices. i/o pins configured as inputs do not require current - limiting resistors when they are connected to external 5 v devices. 4.2 directly connected sensor s figure 27 through figure 30 show voltage - sensing resistive dividers, current - sensing current tr ansformers (cts) and current - sensing res is tive shunts and how they are connected to the voltage and current inputs of the 71m6543 . all input signals to the 71m6543 sensor inputs are voltage signals providing a scaled representation of either a sensed volta ge or current. the analog input pins of the 71m654 3 are designed for sensors with low source impedance. rc filters with resistance values higher than those implemented in the teridian demo boards must not be used . please refer to the demo board schemati cs for complete sensor input circuits and corresponding component values. v in r out v3p3a vadcn (n = 8, 9 or 10) figure 27 : resistive voltage divide r (voltage sensing) i in iadcn v3p3a v out i out r burden ct 1:n noise filter (n = 0, 1,...7) figure 28 . ct with single - ended input connection (current sensing) i in iadcn iadcn+1 v3p3a v out i out r burden ct 1:n bias network and noise filter (n = 0, 2, 4 or 6) figure 29: ct with differential in put connection (current sensing) i in r shunt iadcn iadcn+1 v3p3a v out bias network and noise filter (n = 2, 4 or 6) figure 30: differentia l resistive shunt connections (current sensing) 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 87 4.3 system s using 71m6xx 3 isolated sensor s and current shunts figure 31 shows a typical connection for current shunt sensors; using the 71m 6xx3 ( polyphase) isolated s ensor s . note that one shunt current sensor is connected without isolation, which is the neutral current sensor in this example ( connected to pins ia dc0-ia dc1 ). each 71m 6xx3 device is electrically isolated by a low - cost pulse transformer. th e 71m6543 current sensor inputs must be configured for remote sensor communication s , as described in 2.2.8 71m6xx3 isolated sensor interface (page 22). flexible remapping using the i/o ram registers muxn_sel[3:0] allows the sequence of analog input pins to be different from the standard configuration (a corresponding ce code must be used) . see figure 2 for the afe configuration corresponding to figure 31. mpu rtc timers iadc0 vadc8 ( va) iadc 2 vadc9 (vb) xin xout rx tx tx rx com0...5 v3p3a v 3 p 3 sys vbat vbat_rtc iadc 4 vadc10 (vc) seg gnda gndd seg/dio dio ice c b a neutral load 8888.8888 pulses, dio ir amr power fault comparator modul- ator serial ports oscillator/ pll mux and adc lcd driver dio, pulses compute engine flash memory ram 32 khz regulator shunt current sensors power supply teridian 71m6543f/ 71m6543h/ 71M6543G/ 71M6543Gh temperature sensor vref iadc 6 battery pwr mode control wake-up neutral i 2 c or wire eeprom 9/17/2010 iadc1 iadc 3 iadc 5 iadc 7 rtc battery v3p3d battery monitor spi interface host lcd display resistor dividers pulse transformers 3x teridian 71m6xx3 note: this system is referenced to neutral 71m6xx3 71m6xx3 71m6xx3 } in* } ia } ib } ic *in = neutral current figure 31: system using three - remotes and one- local (neutral) sensor 71m6543f/h and 71M6543G/gh data sheet 88 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 4.4 system using current transformers figure 32 shows a polyphase system using four current transformers to support optional neutral current sensing for anti - tamper purposes. the neutral current sensing ct can be omitte d if neutral current sens ing is not required . the system is referenced to neutral (i.e., the neutral rail is tied to v3p3a and v3p3sys). mpu rtc timers iadc2 vadc8 ( va) iadc 4 vadc9 (vb) xin xout rx tx tx rx com0...5 v3p3a v 3 p 3 sys vbat vbat_rtc iadc 6 vadc10 (vc) seg gnda gndd seg/dio dio ice a b c neutral load 8888.8888 pulses, dio ir amr power fault comparator modul- ator serial ports oscillator/ pll mux and adc lcd driver dio, pulses compute engine flash memory ram 32 khz regulator current transformers power supply teridian 71m6543f/ 71m6543h/ 71M6543G/ 71M6543Gh temperature sensor vref iadc 0 battery pwr mode control wake-up neutral i 2 c or wire eeprom 9/17/2010 iadc3 iadc 5 iadc 7 iadc 1 rtc battery v3p3d battery monitor spi interface host lcd display resistor dividers note: this system is referenced to neutral } ia } ib } ic } in* *in = optional neutral current figure 32 . system using current transformers 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 89 4.5 metrology temperature compensation 4.5.1 distinction b etween standard and high - precision parts since the vref band - gap amplifier is chopper - stabilized, as set by the chop_e[1:0] (i/o ram 0x2106[3:2]) control field , the dc offset voltage, which is the most significant long - term drift mechanism in the voltage reference s (vref), is automatically removed by the chopper circuit. both the 71m6543 and the 71m6xx3 feature chopper circuits for their respective vref voltage reference. since the variation in the bandgap reference vol tage (vref) is the major contributor to me asurement error across temperatures , teridian implements a two step procedure to trim and characterize the vref voltage reference during the device manufacturing process . the first step in the process is applied to both all parts ( 71m6543f , 71m6543h , 71M6543G, 71M6543Gh) . in this first step, the reference voltage (vref) is trimmed to a target value of 1.195v. during this trimming process, the trimt[7:0] ( i/o ram 0x2309 ) val ue is stored in non - vol atile fuses. trimt[7:0] is trimmed to a value that results in minimum vref variation with temperature. for the 71m6543f and 71M6543G device s ( 0.5% energy accuracy ), the trimt[7:0] value can be read by the mpu during initialization in order to calculate parabolic temperature compensation coefficients suitab le for each individual 71m6543f and 71M6543G device. the resulting temperature coefficient for vref in the 71m6543f and 71M6543G is 40 ppm/ c. considering the factory calibration temperature of vref to be +22c and the industrial temperature range ( - 40 c to +85c), the vref error at the temperature extremes for the 71m6543f and 71M6543G device s can be calculated as: % 252 . 0 2520 / 40 ) 22 85 ( + = + = ? ? ppm c ppm c c o o o and % 248 . 0 2480 / 40 ) 22 40 ( ? = ? = ? ? ? ppm c ppm c c o o o the above calculation implies that both the voltage and the current measurements are individually subject to a theoretical maximum error of approximately 0.25%. when the voltage sample and current sample are multiplied together to obtain the energy per sa mple, the voltage error and current error combine resulting in approximately 0.5% maximum energy measurement error. however, this theoretical 0.5% error considers only the voltage reference (vref) as an error source. in practice, other error sources exis t in the system. t he principal remaining error sources are the current sensors (shunts or cts) and their corresponding signal conditioning circuits, and the resistor voltage divider used to measure the voltage. the 71m6543f and 71M6543G 0.5% grade device s should be used in class 1% de signs, to allow margin for the other error sources in the system. the 71m6543h and 71M6543Gh device s ( 0.1% energy accuracy ) goes through an additional process of characterization during production which makes it suitable to hi gh- accuracy applications. the additional process is the characteriza tion of the vol tage reference (vref) over temperature. the coefficients for the voltage reference are stored in additional non - volatile trim fuses. the mpu can read these trim fuses during initialization and calculate parabolic temperature compensation coefficients suitable for each individual 71m6543h and 71M6543Gh device. the resulting temperature coefficient for vref in the 71m6543h and 71M6543Gh is 1 0 ppm/ c. t he vref error at t he temperature extremes for the 71m6543h and 71M6543Gh device s can be calculated as: % 063 . 0 630 / 10 ) 22 85 ( + = + = ? ? ppm c ppm c c o o o and % 062 . 0 620 / 10 ) 22 40 ( ? = ? = ? ? ? ppm c ppm c c o o o when the voltage sample and current sample are multiplied together to obtain the energy per sample, the voltage error and current error combine resulting in approximately 0. 126 % maximum energy 71m6543f/h and 71M6543G/gh data sheet 90 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 measurement error. the 71m6543 h and 71M6543Gh 0. 1 % grade device s should be used in class 0.2 % and class 0.5% de signs, to allow margin for the other error sources in the system. the preceding discussion in this section also applies to the 71m6603 (0.5%), 71m6 11 3 (0.5%) and 71m6203 (0.1%) remote sensors. refer to the 71m6xxx data sheet for details. 4.5.2 temperature coefficients for the 71m6543f and 71M6543G the equations provided below for c alculating tc1 and tc2 apply to the 71m6543f and 71M6543G (0.5% energy accuracy) . in order to obtain tc1 and tc2, the mpu reads trimt[7:0] ( i/o ram 0x2309 ) and uses the tc1 and tc2 equations provided . ppmc and ppmc2 are then calculated from tc1 and tc2, as shown. the resulting tracking of the refer ence voltage (vref) is within 4 0 ppm /c , corresponding to a 0.5% energy measurement accuracy. see 4.5.1 distinction between standard and high - precision parts . trimt c v tc ? ? = 95 . 4 275 ) / ( 1 trimt c v tc ? + ? = 00028 . 0 557 . 0 ) / ( 2 2 1 4632 . 22 tc ppmc ? = 2 116 . 1150 2 tc ppmc ? = see 4.5.5 and 4.5.6 below for further temperature compensation details. 4.5.3 temperature coefficients for the 71m6543h and 71M6543Gh t he 71m6543h and 71M6543Gh undergo a two - pass factory trimming process which stores additional trim fuse value s . the additional trim fuse values characteriz e the device ?s vref behavior at various tempera tures. the values for tc1 and tc2 are calculated from the values read from the trimt[7:0] ( i/o ram 0x2309 ), trimbgb[15:0] (info pa ge 0x92 and 0x93) and trimbgd[7:0] (info page 0x94) non- volatile on - chip fuses using the equations provided . the resulting tracking of the refer ence voltage is within 10 ppm /c , corresponding to a 0.126% energy measurement accuracy . the equations for deriving ppcm and ppmc2 f rom tc1 and tc2 are also provided . see 4.5.1 distinction between standard and hig h - precision parts . tc 1 ( ? trimt + 1 . 587 ? ??????? ? ??????? trimt c v tc ? ? ? = 00028 . 0 557 . 0 ) / ( 2 2 1 4632 . 22 tc ppmc ? = 2 116 . 1150 2 tc ppmc ? = trimt[7:0] trims the vref voltage for minimum variation with temperature. the trimt[7:0] fuses are read by the mpu directly at i/o ram address 0x2309[7:0] . during the second pass trim for the 71m6543h and 71M6543Gh , vref is further characterized at 85 c and 22 c, and the resulting fuse trim values are stored in trimbgb[15:0] and trimbgd[7:0] , respectively. trimbgb[15:0] and trimbgd[7:0] cann ot be read directly by the mpu. see 5.3 reading the info page (71m6543h and 71M6543Gh only) on page 118 for information on how to read the info page trim fuses. see 4.5.5 and 4.5.6 below for further temperature compensation details. 4.5.4 temperature coefficients for the 71m6 xx 3 refer to the 71m6xxx data sheet for the eq u ations that are applicable to each 71m6xx3 part number and the corresponding temperature coefficients. 4.5.5 temperature compensation for vref and shunt sensors this section discusses metrology temperature compensat ion for the meter designs where current shunt sensors are used in conjunction with teridian?s 71m6xx3 remote isolated sensors, as shown in figure 31. s ensors that are directly connected to the 71m6543 are affected by the voltage variation in the 71m6543 vref due to temperature. on the other hand, shunt sensors that are connected to 71m 6xx3 remote sensor are affected by the vref in the 71m 6xx3 . the vre f in both the 71m6543 and 71m 6xx3 can be 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 91 compensated digitally using a second - order polynomial function of temperature. the 71m6543 and 71m 6xx3 feature temperature sensors for the purposes of temperature compensating their corresponding vref. the compensa tion computations must be implemented in mpu firmware . referring to figure 31 , the vadc8 (va) , vadc9 (vb) and vadc10 (vc ) voltage sensors are always di rectly connected to the 71m6543. thus, the precision of the voltage sensors is primarily affected by vref in the 71m654 3 . the temperature coefficient of the resistors used to implement the voltage divider s for the voltage sensors (see figure 27 ) determine the behavior of the voltage division ratio with respect to temperature. it is recommended to use resistors with low temperature coef ficients, while forming the entire voltage divider using resistors belonging to the same technology family, in order to minimize the temperature dependency of the voltage division ratio . the resistors must also have suitable voltage ratings. the 71m654 3 al so may have one local current shunt sensor that is connected directly to it via the iadc0 - iadc1 input pins , and therefore this local current sensor is also affected by the vref in the 71m654 3 . the shunt current sensor resistance has a temperature depende ncy, which also may require compensation , depending on the required accuracy class . the i adc2 - iadc3 , i adc4 - iadc5 and i adc6 - iadc7 current sensors are isolated by the 71m 6xx3 and depend on the vref of the 71m 6xx3 , plus the variation of the corresponding remote shunt current sensor with temperature. the mpu has the responsibility of computing the necessary sample gain compensation values required for each sensor channel based on the sensed temperature. teridian provides demonstration code that implements the gain_adj x compensation equation shown below. the resulting gain_adj x values are stored by the mpu in five ce ram locations gain_adj0 - gain_adj 5 ( ce ram 0x40 - 0x4 4 ). the demonstration code thus provides a suitable implementation of temperature compensation, but other methods are possible in mpu firmware by utilizing the on - chip temperature sensors while storing the sample gain adjustment results in the ce ram gain_adj x storage locations for use by the ce . the demonstration code maintains five separate sets of ppmc and ppmc 2 coefficients and computes five separate gain_adj x values based on the sensed temperature using the equation below: 23 2 14 2 2 _ 100 2 _ 10 16385 _ ppmc x temp ppmc x temp adjx gain ? ? + ? ? + = the gain_adj x values stored by the mpu in ce ram are used by the ce to gain adjust (i.e., multiply) the sample in each corresponding sensor channel. a gain_adj x value of 16,384 (i.e . , 2 14 )corresponds to unity gain, while values less than 16,384 attenuate the samples and values greater than 16,384 amplify the samples . in the above equation , temp_x is the deviation from nominal or calibration temperature expressed in mul tiples of 0.1 c . t he 10x and 100x factors seen in the above equation are due to 0.1 o c scaling of temp_x . for example, if the calibration (reference ) temperature is 22 o c and the measured temperature is 27 o c, then 10* temp_x = (27 - 22) x 10 = 50 (decimal), which represents a +5 o c deviation from 22 o c. in the demonstration code, temp_x is calculated in the mpu from the stemp[10:0] temperature sensor reading using the equation provided below and is scaled in 0.1c units. see 2.5.5 71m6 543 temperature sensor on page 55 for the equation to calculate temperature in degrees c from the stemp[10:0] value. table 67 shows the five gain_adj x equation output storage location s and the voltage or current sensor channels for which they compensate for the 1 local / 3 remote configuration shown in figure 31. table 67 : gain_adjn compensation channels ( figure 2 , figure 31, table 1 ) gain adjustment output ce ram address sensor channel (s) (pin names) compensation for: gain_adj0 0x40 vadc8 ( va) vadc9 ( vb) vadc10 (vc ) vref in 71m6543 and voltage divider resistors gain_adj 1 0x41 iadc0 - iadc1 vref in 7 1m6543 and shunt (neutral current) gain_adj 2 0x42 iadc2 - iadc3 vref in 71m6xx3 and shunt (phase a) gain_adj 3 0x43 iadc4 - iadc5 vref in 71m6xx3 and shunt (phase b) 71m6543f/h and 71M6543G/gh data sheet 92 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 gain_adj 4 0x44 iadc6 - iadc7 vref in 71m6xx3 and shunt (phase c ) in the demonstration code, the shape of the temperature compensation second - order parabolic curve is determined by the values stored in the ppmc (1 st order coefficient) a nd ppmc2 (2 nd order coefficient) , which are typically setup by the mpu at initializati on time from values that are stored in eeprom. to disable temperature compensation in the demonstration code, ppmc and ppmc2 are both set to zero for each of the five gain_adj x channels. to enable temperature compensation, the ppmc and ppmc2 coefficients are set with values that match the expected temperature variation of the shunt current sensor (if required ) and the corresponding vref voltage reference (summed together) . the shunt sensor requires a second order polynomial compensation which is determined by the ppmc and ppmc2 coefficient s for the corresponding current measurement channe l. the corresponding vref voltage reference also requires the ppmc and ppmc2 coefficients to match the second order temperature behavior of the voltage refer ence. the ppmc and ppmc2 values associated with the shunt and with the corresponding vref are summed together to obtain the compensation coefficients for a given current - sensing chan nel (i.e., the 1 st order ppmc coefficients are summed together, and the 2 nd order ppmc2 coefficients are summed together). in the 71m6543f and 71M6543G , the required vref compensation coefficients ppmc and ppmc2 are calculated from readable on - chip non- volatile fuses (see 4.5.2 temperature coefficients for the 71m6543f ). these coefficients are designed to achiev e 40 ppm/c for vref in the 71m6543f and 71M6543G . ppmc and ppmc2 coefficients are similarly calculated for the 71m6xx3 remote sensor (see 4.5.4 temperature coefficients for the 71m6xx3 ). for the 71m6543h and 71M6543Gh ( 0.1% ener gy accuracy ), coefficients specific to each individual device can be calculated from values read from additional on- chip fuses that characterize the vref behavior of each individual part across industrial temperatures (see 4.5.3 temperature coefficients for the 71m6543h ). the resulting tracking of the refer ence vref voltage is within 10 ppm /c . for the current channels, t o determine the ppmc and ppmc2 coefficient s for the shunt current sensors , the designer must either know the average temperature curve of the shunt from its manufacturer?s data sheet or obtain the se coefficients by laboratory characterization of the shunt used in the design. 4.5.6 temperature compensation of vref and current transformers this section discusses metrology temperature compensation for meter designs where current transformer (ct) sensors are used, as shown in figure 32. se nsors that are directly connected to the 71m6543 are affected by the voltage variation in the 71m6543 vref due to temperature. the vref in the 71m6543 can be compensated digitally using a second - order polynomial function of temperature. the 71m6543 featu res a temperature sensor for the purposes of temperature compensating its vref. the compensation computations must be implemented in mpu firmware and written to the corresponding gain_adjx ce ram location . referring to figure 32 , the vadc8 (va) , vadc9 (vb) and vadc10 (vc ) voltage sensors are directly connected to the 71m6543. thus, the precision of the voltage sensors is primarily affected by vref in the 71m654 3 . the temperature coefficient of the resistors used to implement the voltage dividers for the voltage sensors (see figure 27 ) determine th e behavior of the voltage division ratio with respect to temperature. it is recommended to use resistors with low temperature coefficients, while forming the entire voltage divider using resistors belonging to the same technology family, in order to minimi ze the temperature dependency of the voltage division ratio. the resistors must also have suitable voltage ratings. the current transformers are directly connected to the 71m6543 and are therefore primarily affected by the vref temperature dependency in th e 71m6543 . for best performance, it is recommended to use the differential signal conditioning circuit, as shown in figure 29 , to connect the cts to th e 71m6543. c urrent transformers may also require temperature compensation. the copper wire winding in the ct has dc resistance with a temperature coefficient, which makes the voltage delivered to the burden resistor temperature dependent, and the burden re sistor also has a temperature coefficient. thus, each ct sensor channel needs to compensate for the 71m6543 vref, and optionally for the temperature dependency of the ct and its burden resistor depending on the required accuracy class. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 93 the mpu has the resp onsibility of computing the necessary sample gain compensation values required for each sensor channel based on the sensed temperature. teridian provides demonstration code that implements the gain_adj x compensation equation shown below. the resulting gain_adj x values are stored by the mpu in five ce ram locations gain_adj0 - gain_adj5 ( ce ram 0x40 - 0x4 4 ). the demonstration code thus provides a suitable implementation of temperature compensation, but other methods are possible in mpu firmware by utilizing the on - chip temperature sensor while storing the sample gain adjustment results in the ce ram gain_adjn storage locations. the demonstration code maintains five separate sets of ppmc and ppmc 2 coefficients and computes five separate gain_adjn values base d on the sensed temperature using the equation below: 23 2 14 2 2 _ 100 2 _ 10 16385 _ ppmc x temp ppmc x temp adjx gain ? ? + ? ? + = the gain_adjn values stored by the mpu in ce ram are used by the ce to gain adjust (i.e., multiply) the sample in each corresponding sensor channel. a gain_adj x value of 16,384 ( i.e. , 2 14 )corresponds to unity gain, while values less than 16,384 attenuate the samples and values greater than 16,384 amplify the samples. in the above equation, temp_x is the deviation from nominal or calibration temperature expressed in mul tiples of 0 .1 c . t he 10x and 100x factors seen in the above equation are due to 0.1 o c scaling of temp_x . for example, if the calibration (reference) temperature is 22 c and the measured temperature is 27 c, then 10* temp_x = (27 - 22) x 10 = 50 (decimal), which represents a +5 c deviation from 22 c. in the demonstration code, temp_x is calculated in the mpu from the stemp[10:0] temperature sensor reading using the equation provided below and is scaled in 0.1c units. see 2.5.5 71m6543 temperature sensor on page 55 for the equation to calculate temperature in c from the stemp[10:0] reading. table 68 shows the five gain_adj x equation output storage locations and the voltage or current measurements for which they compensate. table 68 : gain_adjx compensation channels ( figure 3 , figure 32, table 2 ) gain adjustment output ce ram address sensor channel(s) (pin names) compensation for: gain_adj0 0x40 vadc8 (va) vadc9 (vb ) vadc10 (vc ) vref in 71m6543 and voltage divider resistors gain_adj 1 0x41 iadc0 - iadc1 vref in 71m6543 , ct and burden resistor ( neutral current ) gain_adj 2 0x42 iadc2 - iadc3 vref in 71m6 543, ct and burden resistor ( phase a ) gain_adj 3 0x43 iadc4 - iadc5 vref in 71m6 543, ct and burden resistor ( phase b ) gain_adj 4 0x44 iadc6 - iadc7 vref in 71m6 543, ct and burden resistor ( phase c ) in the demonstration code, the shape of the temperature compensation second - order parabolic curve is determined by the values stored in the ppmc (1 st order coefficient) and ppmc2 (2 nd order coefficient), which are typically setup by the mpu at initialization time from values that are stored in eeprom. to disable temperature compensation in the demonstration code, ppmc and ppmc2 are both set to zero for each of the five gain_adj x channels. to enable temperature compensation, the ppmc and ppmc2 coefficients are set with values that match the expected vref temperature variation and optionally the corresponding sensor circuit (i.e., the ct and bur den resistor for current channels or the resistor divider network for the voltage channels) . in the 71m6543f and 71M6543G (0.5% energy accuracy) , the required vref compensation coefficients ppmc and ppmc2 are calculated from readable on - chip non- volatile fuses (see 4.5.2 temperature coefficients for the 71m6543f ). these coefficients are designed to achieve 40 ppm / c for vref. for the 71m6543h and 71M6543Gh ( 0.1% energy accuracy ), coefficients specific to each individual device can be calculated from values read from additional on - chip fuses that characterize the vref 71m6543f/h and 71M6543G/gh data sheet 94 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 behavior of each individual part across industrial temperatures (see 4.5.3 temperature coefficients for the 71m6543h ). the resulting tracking of the refer ence vref voltage is within 10 ppm /c . 4.6 connecting i 2 c eeproms i 2 c eeproms or other i 2 c compatible devices should be connected to the dio pins segdio 2 and segdio3 , as shown in figure 33. pullup resistors of roughly 10 k ? to v3p3d (to ensure operation in brn mode) should be used for both sd c k and sdata signals . the dio_eex ( i/o ram 0x2456[7:6] ) field must be set to 01 in order to convert the dio pins segdio2 and segdio3 to i 2 c pins scl and sdata . figure 33: i 2 c eeprom connection 4.7 connecting three - wire eeproms wire eeproms and other compatible devices should be connected to the dio pins segdio2 and segdio3 , as described i n 2.5.11 eeprom interface on page 66. 4.8 uart0 (tx/rx) the uart0 rx pin should be pulled down by a 10 k? resistor and additionally protected by a 100 pf ce ramic capacitor, as shown in figure 34. figure 34 : connections for uart0 4.9 optical interface (uart1) the opt_tx and opt_rx pins can be used for a regular serial interface ( by connecting a rs_232 tran sceiver for example) , or they can be used to directly operate optical components (for example, an infrared diode and phototransistor implementing a flag inter face ) . figure 35 shows the basic connections tx rx 71m6543 10 k 100 pf rx tx dio 2 dio 3 eeprom s d c k sda ta v3p3d 10 k 10 k 71m6543 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 95 for uart1 . the opt_tx pin becomes active when the control field opt_txe ( i/o ram 0x2456[3:2]) is set to 0 0. the polarity of the opt_tx and opt_rx pins can be inve rted with the configuration bits , opt_txinv (i/o ram 0x2456[0]) and opt_rxinv (i/o ram 0x2457[1]) , re spectively. the opt_tx output may be modulated at 38 khz when system power is present . modulation is not available in brn mode . the opt_txmod bit ( i/o ram 0x2456[1]) enables modulation . the duty cycle is controlled by opt_fdc[1:0] (i/o ram 0x2457[5:4] ) , which can select 50%, 25%, 12.5%, and 6.25% duty cycle . a 6.25% duty cycle means opt_tx is low for 6.25% of the period. the opt_rx pin uses digital si gnal thresholds. it may need an analog filter when receiving modulated optical signals. with modulation, an optical emitter can be operated at higher current than nominal, enabling it to increase the distance along the optical path. if operation in brn mode is desired, the external co mponents should be connected to v3p3d. however, it is recommended to limit the current to a few ma. figure 35 : connection for optical com ponents 4.10 connecting the reset pin even though a functional meter does not necessarily need a reset switch, it is useful to have a reset push button for prototyping as shown in figure 36 , left side. the reset signal may be sourced from v3p3sys (functional in msn mode only), v3p3d ( msn and brn modes), or vbat (all modes, if a battery is present) , or from a combination of thes e sources, depending on the application. for a production meter, the reset pin should be protected by the by the external components shown in figure 36 , right side. r1 should be in the range of 100 ? and mounted as closely as possible to the ic. s ince the 71m6543 generates its own power - on reset, a reset button or circuitry, as shown in figure 36, is only required for test units and prototypes. opt_tx r 2 r 1 opt_rx 71m6543 v3p3sys phototransistor led 1 0 k ? 100 pf v3p3sys 71m6543f/h and 71M6543G/gh data sheet 96 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 r 1 reset 71m6533 dgnd 100 r 1 reset 71m6533 dgnd 100 figure 36 : external components for the reset pin: push - button (left), production circuit (right) 4.11 connecting the emulator port pins even when the emulator is not used, small shunt capacitors to ground (22 pf) should be used for protection from emi as illustrated in figure 37 . production boards should have the ice_e pin connected to ground. figure 37 : external c omponents for the emulator interface 4.12 flash programming 4.12.1 flash programming via the ice port operational or test code can be programmed into the flash memory using either an in - circuit emulator or the flash programmer module (tfp -2 ) available from teridian . the flash programming procedure uses the e_rst, e_rxtx, and e_tclk pins. 4.12.2 flash programming via the spi port it is possible to erase, read and program the flash memory of the 71m6543 via the spi port. see 2. 5.12 for a detailed description. 4.13 mpu demonstration code all application - specific mpu functions mentio ned in 4 application information are featured in the demonstration c source code supplied by teridian . the code is available as part of the demo nstration kit for the 71m6543 . the demonstrati on kits come with the 71m6543 pre programmed with demo nstration firmware and mounted on a functional sample meter demo board . the demo boards allow for quic k and efficient evaluation of the ic without having to write firmware or having to supply an in - circuit emulator (ice). e_rst 71m6543 e_tclk 62 62 ? 62 ? 22 pf 22 pf 22 pf lcd segments ice_e v3p3d e_rxt (optional) r 1 reset 71m6543 gndd v3p3d r 2 vbat/ v3p3d reset switch 1k 0.1f 10k 71m6543 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 97 4.14 crystal oscillator the oscillator of the 71m6543 drives a standard 32.768 khz watch crystal. the oscillator has been designed specifi cally to handle these crystals and is compatible with their high impedance and limited power handling capability. the oscillator power dissipation is very low to maximize the lifetime of any battery backup device attached to the vbat_rtc pin. board layout s with minimum capacitance from xin to xout require less battery current. good layouts have xin an d xout shielded from each other and also keep the xin and xout traces short and away from lcd and digital signals. since the oscillator is self - biasing, an external resistor must not be connected across the crystal. 4.15 meter calibration once the teridian 71m6543 energy meter device has been installed in a meter system, it must be calibrated . a complete calibration incl udes the following: ? establishment of the reference temperature for factory calibration (e.g., typically 22 c). ? calibration of the metrology section, i.e. , calibration for errors of the current sensors, voltage di viders and signal conditioning components a s well as of the in ternal reference voltage (vref) at the reference temperature ( e.g. , typically 22 c). ? calibration of the oscillator frequency using the rtc a _adj register ( i/o ram 0x2504). the metrology section can be calibrated using the gain and phase adjustment factors accessible to the ce . the gain adjust ment is used to compensate for tolerances of components used for signal conditioning, especially the resistive components . phase adjustment is provided t o compensate for phase shifts introduced by the current sensors or by the effects of reactive power supplies . due to the flexibility of the mpu firmware, any calibration method, such as calibration based on energy, or current and voltage can be implemented . it is also possible to implement segment - wise calibration (de pending on current range). the 71m6543 supports common industry standard calibration techniques, such as single - point (ener gy - only), multi - point (energy, vrms, irms), and auto- calibration. ter idian provides a calibration spreadsheet file to facilitate the calibration process. contact your teridian representative to obtain a copy of the latest calibration spreadsheet file for the 71m6543. 71m6543f/h and 71M6543G/gh data sheet 98 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 5 firmware interface 5.1 i/o ram map ? functional order in table 69 and table 70 , unimplemented (u) and reserved (r) bits are shaded in light gray. unimpl emented bits are identified with a ?u?. unimplemented bits have no memory storage, writing them has no effect, and reading them always returns zero. reserved bits ar e identified with an ?r?, and must always be written with a zero. writing values other than zero to reserved bits may have undesirable side effects and must be avoided. non - volatile bits are shaded in dark gray. non - volatile bits are backed - up during power failures if the system includes a battery connected to the vbat pin. the i/o ram location s listed in table 69 have sequential addresses to facilitate reading by the mpu (e.g., in order to verify their contents). these i/o ram locations are u sually modified only at boot -up . the addresses shown in table 69 are an alternative sequential address to the addresses from table 70 which are used throughout this document. for instance, equ[2:0] can be accessed at i/o ram 0x200 0 [7:5] or at i/o ram 0x2106[7:5] . table 69: i/o ram map ? functional order, basic configuration name addr bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 ce6 2000 equ[2:0] u chop_e[1:0] rtm_e ce_e ce5 2001 u sum_samps[12:8] ce4 2002 sum_samps[7:0] ce3 2003 u ce_lctn[ 6/ 5:0] ce2 2004 pls_maxwidth[7:0] ce1 2005 pls_interval[7:0] ce0 2006 diff6 _e diff4 _e diff2 _e diff0 _e rfly_dis fir_len [1:0] pls_inv rce0 2007 chopr[1:0] rmt6 _e rmt4 _e rmt2 _e tmuxr6 [2:0] rtmux 2008 u tmuxr4 [2:0] u tmuxr2 [2:0] fovrd 2009 u u r u u u u u mux5 200a mux_div[3:0] mux10_sel mux4 200b mux9_sel mux8_sel mux3 200c mux7_sel mux6_sel mux2 200d mux5_sel mux4_sel mux1 200e mux3_sel mux2_sel mux0 200f mux1_sel mux0_sel temp 2010 temp_bsel temp_pwr osc_comp temp_bat tbyte_busy temp_per[2:0] lcd0 2011 lcd_e lcd_mode[2:0] lcd_allcom lcd_y lcd_clk[1:0] lcd1 2012 lcd_vmode[1:0] lcd_blnkmap23[5:0] 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 99 name addr bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 lcd2 2013 lcd_bat r lcd_blnkmap22[5:0] lcd_map6 2014 lcd_map[55:48] lcd_map5 2015 lcd_map[47:40] lcd_map4 2016 lcd_map[39:32] lcd_map3 2017 lcd_map[31:24] lcd_map2 2018 lcd_map[23:16] lcd_map1 2019 lcd_map[15:8] lcd_map0 201a lcd_map[7:0] dio_r5 201b u u u u u dio_rpb[2:0] dio_r4 201c u dio_r11[2:0] u dio_r10[2:0] dio_r3 201d u dio_r9[2:0] u dio_r8[2:0] dio_r2 201e u dio_r7[2:0] u dio_r6[2:0] dio_r1 201f u dio_r5[2:0] u dio_r4[2:0] dio_r0 2020 u dio_r3[2:0] u dio_r2[2:0] dio0 2021 dio_eex[1:0] u u opt_txe[1:0] opt_txmod opt_txinv dio1 2022 dio_pw dio_pv opt_fdc[1:0] u opt_rxdis opt_rxinv opt_bb dio2 2023 dio_px dio_py u u u u u u int1_e 2024 ex_eex ex_xpulse ex_ypulse ex_rtc t u ex_rtc1m ex_rtc1s ex_xfer int2_e 2025 ex_spi ex_wpulse ex_vpulse wake_e 2026 ew_rx ew_pb ew_dio 4 ew_dio 52 ew_dio 55 sfmm 2080 sfmm[7:0]* sfms 2081 sfms[7:0]* notes: * sfmm and sfms are accessible only through the spi slave port. see 2.5.1.1 flash memory for details. 71m6543f/h and 71M6543G/gh data sheet 100 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 table 70 lists bits and registers that may have to be accessed on a frequent basis. reserved bits have lighter gray background, and non- volatile bits have a darker gray background. table 70 : i/o ram map ? functional order name addr bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 ce and adc mux5 2100 mux_div[3:0] mux10_sel[3:0] mux4 2101 mux9_sel[3:0] mux8_sel[3:0] mux3 2102 mux7_sel[3:0] mux6_sel[3:0] mux2 2103 mux5_sel[3:0] mux4_sel[3:0] mux1 2104 mux3_sel[3:0] mux2_sel[3:0] mux0 2105 mux1_sel[3:0] mux0_sel[3:0] ce6 2106 equ[2:0] u chop_e[1:0] rtm_e ce_e ce5 2107 u sum_samps[12:8] ce4 2108 sum_samps[7:0] ce3 2109 u ce_lctn[ 6 :0] (71M6543G/gh), ce_lctn[5:0] (71m6543f/h) ce2 210a pls_maxwidth[7:0] ce1 210b pls_interval[7:0] ce0 210c diff6 _e diff4 _e diff2 _e diff0 _e rfly_dis fir_len [1:0] pls_inv rtm0 210d u u u u u u rtm0[9:8] rtm0 210e rtm0[7:0] rtm1 210f rtm1[7:0] rtm2 2110 rtm2[7:0] rtm3 2111 rtm3[7:0] clock generation ckgn 2200 u u adc_div pll_fast reset mpu_div[2:0] vref trim fuses trimt 2309 trimt[7:0] lcd/dio lcd0 2400 lcd_e lcd_mode[2:0] lcd_allcom lcd_y lcd_clk[1:0] lcd1 2401 lcd_vmode[1:0] lcd_blnkmap23[5:0] lcd2 2402 lcd_bat r lcd_blnkmap22[5:0] lcd_map6 2405 lcd_map[55:48] lcd_map5 2406 lcd_map[47:40] lcd_map4 2407 lcd_map[39:32] lcd_map3 2408 lcd_map[31:24] 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 101 name addr bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 lcd_map2 2409 lcd_map[23:16] lcd_map1 240a lcd_map[15:8] lcd_map0 240b lcd_map[7:0] lcd4 240c u u u u u lcd_rst lcd_blank lcd_on lcd_dac 240d u u u lcd_dac[4:0] segdio0 2410 u u lcd_seg0[5:0] ? ? u u ? segdio15 241f u u lcd_seg15[5:0] segdio16 2420 u u lcd_segdio16[5:0] ? ? u u ? segdio 45 243d u u lcd_segdio45[5:0] segdio 46 243e u u lcd_seg46[5:0] ? ? u u ? segdio 50 2442 u u lcd_seg50[5:0] segdio 51 2443 u u lcd_segdio51[5:0] ? ? u u ? segdio 5 5 2447 u u lcd_segdio55[5:0] dio_r5 2450 u r r r u dio_rpb[2:0] dio_r4 2451 u dio_r11[2:0] u dio_r10[2:0] dio_r3 2452 u dio_r9[2:0] u dio_r8[2:0] dio_r2 2453 u dio_r7[2:0] u dio_r6[2:0] dio_r1 2454 u dio_r5[2:0] u dio_r4[2:0] dio_r0 2455 u dio_r3[2:0] u dio_r2[2:0] dio0 2456 dio_eex[1:0] u u opt_txe[1:0] opt_txmod opt_txinv dio1 2457 dio_pw dio_pv opt_fdc[1:0] u opt_rxdis opt_rxinv opt_bb dio2 2458 dio_px dio_py u u u u u u nv bits sparenv 2500 u u u u r fovrd 2501 u u r u u u u u tmux 2502 u u tmux[ 5 :0] tmux2 2503 u u u tmux2[4:0] rtc1 2504 u rtca_adj[6:0] 71m6xx3 interface 71m6543f/h and 71M6543G/gh data sheet 102 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 name addr bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 remote2 2602 rmt_rd[15:8] remote1 2603 rmt_rd[7:0] rbits int1_e 2700 ex_eex ex_xpulse ex_ypulse ex_rtc t u ex_rtc1m ex_rtc1s ex_xfer int2_e 2701 ex_spi ex_wpulse ex_vpulse u u u u u secure 2702 flsh_unlock[3:0] r flsh_rde flsh_wre r analog0 2704 vref_cal vref_dis pre_e adc_e bcurr spare[2:0] version 2706 version[7:0] intbits 2707 u int6 int5 int4 int3 int2 int1 int0 flag0 sfr e8 ie_eex ie_xpulse ie_ypulse ie_rtc t u ie_rtc1m ie_rtc1s ie_xfer flag1 sfr f8 ie_spi ie_wpulse ie_vpulse u u u u pb_state stat sfr f9 u u u pll_ok u vstat[2:0] remote0 sfr fc u perr_rd perr_wr rcmd[4:0] spi1 sfr fd spi_cmd[7:0] spi0 2708 spi_stat[7:0] rce0 2709 chopr[1:0] rmt6 _e rmt4 _e rmt2 _e tmuxr6 [2:0] rtmux 270a u tmuxr4 [2:0] u tmuxr2 [2:0] info_pg 270b u u u u u u u info_pg dio3 270c u u port_e spi_e spi_safe u u u nv ram and rtc nvramxx 2800- 287f nvram[0] ? nvram[7f] ? direct access wake 2880 wake_tmr[7:0] stemp1 2881 stemp[10:3] stemp0 2882 stemp[2:0] u u u u u bsense 2885 bsense[7:0] lkpaddr 2887 lkpautoi lkpaddr[6:0] lkpdata 2888 lkpdat[7:0] lkpctrl 2889 u u u u u u lkp_rd lkp_wr rtc0 2890 rtc_wr rtc_rd u rtc_fail u u u u rtc2 2892 rtc_sbsc[7:0] rtc3 2893 u u rtc_sec[5:0] rtc4 2894 u u rtc_min[5:0] 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 103 name addr bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 rtc5 2895 u u u rtc_hr[4:0] rtc6 2896 u u u u u rtc_day[2:0] rtc7 2897 u u u rtc_date[4:0] rtc8 2898 u u u u rtc_mo[3:0] rtc9 2899 rtc_yr[7:0] rtc10 289b u u u u u rtc_p[16:14] rtc11 289c rtc_p[13:6] rtc12 289d rtc_p[5:0] rtc_q[1:0] rtc13 289e u u rtc_tmin[5:0] rtc14 289f u u u rtc_thr[4:0] temp 28a0 temp_bsel temp_pwr osc_comp temp_bat tbyte_busy temp_per[2:0] wf1 28b0 wf_cstart wf_rst wf_rstbit wf_ovf wf_erst wf_badvdd u u wf2 28b1 u u wf_tmr wf_rx wf_pb wf_dio 4 wf_dio 52 wf_dio 55 misc 28b2 sleep lcd_only wake_arm u u u u u wake_e 28b3 u u u ew_rx ew_pb ew_dio 4 ew_dio 52 ew_dio 55 wdrst 28b4 wd_rst temp_start u u u u u u mpu ports port3 sfr b0 dio_dir[15:12] dio[15:12] port2 sfr a0 dio_dir[11:8] dio[11:8] port1 sfr 90 dio_dir[7:4] dio[7:4] port0 sfr 80 dio_dir[3:0] dio[3:0] flash erase sfr 94 flsh_erase[7:0] flshctl sfr b2 preboot secure u u flsh_pend flsh_pstwr flsh_meen flsh_pwe fl_bank sfr b6 u u u u u u fl_bank[1:0] pgadr sfr b7 flsh_pgadr[ 5 :0] u u i 2 c eedata sfr 9e eedata[7:0] eectrl sfr 9f eectrl[7:0] 71m6543f/h and 71M6543G/gh data sheet 104 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 5.2 i/o ram map ? alphabetical order table 71 lists i/o ram bits and registers in alphabetical order. bits with a write direction (w in column dir ) are written by the mpu into configuration ram. typically, they are initially stored in flash memory and copied to the configuration ram by the mpu. some of the more frequently programmed bits are mapped to the mpu sfr memory spa ce. the remaining bits ar e mapped to the address space 0x2xxx. bits with r (read) direction can be read by the mpu. columns labeled rst and wk describe the bit values upon reset and wake, respectively. no entry in one of these columns means the bit is either read - only or is pow ered by the nv supply and is not initia lized. write - only bits return zero when they are read. locations that are shaded in grey are non- volatile (i.e., battery - backed) . table 71 : i/o ram map ? alphabetical order name location rst wk dir description adc_e 2704[4] 0 0 r/w enables adc and vref. when disabled, reduces bias current . adc_div 2200[5] 0 0 r/w adc_div c ontrols the r ate of the adc and fir clocks. the adc_div setting determines whether mck is divided by 4 or 8: 0 = mck/4 1 = mck/8 the resulting adc and fir clock is as shown below. pll_fast = 0 pll_fast = 1 mck 6.291456 mhz 19.660800 mhz adc_div = 0 1.572864 mhz 4.9152 mhz adc_div = 1 0.786432 mhz 2.4576 mhz bcurr 2704[3] 0 0 r/w connects a 100 a load to the battery selected by temp_bsel . bsense[7:0] 2885[7:0] ? ? r the result of the battery measurement. see 2.5.7 71m6543 battery monitor on page 57 . ce_e 2106[0] 0 0 r/w ce enable. ce_lctn[ 6 :0] 2109[ 6 :0] 31 31 r/w ce program location. the starting address for the ce program is 1024* ce_lctn . ( ce_lctn[6:0] , 2109[6:0] for 71M6543G, 71M6543Gh) ( ce_lctn[5:0] , 2109[5:0] for 71m6543f, 71m6543h) chip_id[15:8] chip_id[7:0] 2300[7:0] 2301[7:0] 0 0 0 0 r r these bytes contain the chip identification as shown below . chip_id[15:8] chip_id[7:0 ] 71m6543f 0x04 0x10 71m6543 h 0x04 0x11 71m6543 g 0x05 0x10 71m6543 gh 0x05 0x11 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 105 name location rst wk dir description chop_e[1:0] 2106[3:2] 0 0 r/w chop enable for the reference bandgap circuit. the value of chop change s on the rising edge of the internal muxsync signal according to the value in chop_e[1:0] : 00 = toggle 1 01 = positive 10 = reversed 11 = toggle 1 except at the mux sync edge at the end of an accumulation interval . chopr[1:0] 2709[7:6] 00 00 r/w the chop settings for the remote sensor. 00 = auto chop. change every mux frame. 01 = positive 10 = negative 11 = auto chop (s ame as 00 ) diff0 _e 210c[4] 0 0 r/w enables iadc0 - iadc1 differential configuration. diff2 _e 210c[5] 0 0 r/w enables iadc2 - iadc3 differential configuration. diff4 _e 210c[6] 0 0 r/w enables iadc4 - iadc5 differential configuration. diff6 _e 210c[7] 0 0 r/w enables iadc6 - iadc7 differential configuration. dio_r2[2:0] dio_r3[2:0] dio_r4[2:0] dio_r5[2:0] dio_r6[2:0] dio_r7[2:0] dio_r8[2:0] dio_r9[2:0] dio_r10[2:0] dio_r11[2:0] dio_rpb[2:0] 2455[2:0] 2455[6:4] 2454[2:0] 2454[6:4] 2453[2:0] 2453[6:4] 2452[2:0] 2452[6:4] 2451[2:0] 2451[6:4] 2450[2:0] 0 0 0 0 0 0 0 0 0 0 0 ? r/w connects pb and dedicated i/o pins dio2 through dio11 to internal resources. if more than one input is connected to the same resource, the multiple column below specifies how they are combined. dio_rx resource multiple 0 none ? 1 reserved or 2 t0 (timer0 clock or gate) or 3 t1 (timer1 clock or gate) or 4 io interrupt (int0) or 5 io interrupt (int1) or dio_dir[15:12] dio_dir[11:8] dio_dir[7:4] dio_dir[3:0] sfr b0[7:4] sfr a0[7:4] sfr 90[7:4] sfr 80[7:4] f f r/w programs the direction of the first 16 dio pins. 1 indicates output. ignored if the pin is not configured as i/o. see dio_pv and dio_pw for special option for dio0 and dio1 outputs. see dio_eex [1:0] for special option for seg dio2 and seg dio3. note that the direction of dio pins above 15 is set by segdiox[1] . see port_e to avoid power - up spikes. dio[15:12] dio[11:8] dio[7:4] dio[3:0] sfr b0[3:0] sfr a0[3:0] sfr 90[3:0] sfr 80[3:0] f f r/w the value on the first 16 dio pins. pins configured as lcd read zero. when written, changes data on pins configured as outputs. pins configured as lcd or input ignore writes. note that the data for dio pins above 15 is set by segdiox[0] . 71m6543f/h and 71M6543G/gh data sheet 106 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 name location rst wk dir description dio_eex[1:0] 2456[7:6] 0 ? r/w when set, converts seg dio3 and seg dio2 to interface with external eeprom. segdio2 becomes sdck and segdio3 becomes bi - directional sdata, but only if lcd_map[2] and lcd_map[3] are cleared. dio_eex[1:0] function 00 disable eeprom interface 01 2 - wire eeprom interface 10 3 - wire eeprom interface 11 3 - wire eeprom interface with separate do ( seg dio3) and di (seg dio8) pins. dio_pv 2457[6] 0 ? r/w causes v pulse to be output on seg dio1, if lcd_map[1] =0. dio_pw 2457[7] 0 ? r/w causes wpulse to be output on seg dio0, if lcd_map[0]= 0. dio_px 2458[7] 0 ? r/w causes xpulse to be output on seg dio6 , if lcd_map[6]= 0. dio_py 2458[6] 0 ? r/w causes ypulse to be output on seg dio7 , if lcd_map[7]= 0. eedata[7:0] sfr 9e 0 0 r/w serial eeprom interface data . eectrl[7:0] sfr 9f 0 0 r/w serial eeprom interface control . status bit name read/ write reset state polarity description 7 error r 0 positive 1 when an illegal command is received. 6 busy r 0 positive 1 when serial data bus is busy. 5 rx_ack r 1 positive 1 indicates that the eeprom sent an ack bit. equ[2:0] 2106[7:5] 0 0 r/w specifies the power equation. equ[2:0] description element 0 element 1 element 2 recommended mux sequence 3 2 element, 4w, 3 del a va(i - ib)/ 0 vc ic ia va ib b c vc 4 2 element, 4w, 3 wye va(ia - ib)/2 vb(ic - ib)/2 0 ia va ib v i vc 5 * 3 element, 4w, 3 ye va ia vb ib vc c ia a ib vb ic v note: *the available ce codes implement s only equ a tion 5. co n tact your local t eridi a n representative to obtain ce c o de for equation 3 and 4. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 107 name location rst wk dir description ex_xfer ex_rtc1s ex_rtc1m ex_rtct ex_spi ex_eex ex_xpulse ex_ypulse ex_wpulse e x_vpulse 2700[0] 2700[1] 2700[2] 2700[3] 2701[7] 2700[7] 2700[6] 2700[5] 2701[6] 2701[5] 0 0 r/w interrupt enable bits. these bits enable the xfer_busy, the rtc_1sec, etc. the bits are set by hardware and cannot be set by writing a 1. the bits are reset by writing 0. note that if one of these interrupts is to enabled, its corresponding 8051 ex ena ble bit must also be set. see 2.4.9 interrupts , for details . ew_dio4 28b3[2] 0 ? r/w connects seg dio4 to the wake logic and permits seg dio4 rising to wake the part. this bit has no effect unless dio4 is configured as a digital input. ew_dio52 28b3[1] 0 ? r/w connects seg dio52 to the wake logic and permits seg dio52 rising to wake the part. this bit has no effect unless seg dio52 is configured as a digital input. ew_dio55 28b3[0] 0 ? r/w connects seg dio55 to the wake logic and permits the seg dio55 rising edge to awaken the part. this bit has no effect unless seg dio55 is configured as a digital input. ew_pb 28b3[3] 0 ? r/w connects pb to the wake logic and permits the pb rising edge to a wake n the part. pb is always configured as an input. ew_rx 28b3[4] 0 ? r/w connects rx to the wake logic and permits the rx rising edge to a wake n the part. see the wake description in 3.4 wake on timer for de - bounce issues. fir_len [1:0] 210c[ 2: 1] 0 0 r/w determines t he number of adc cycles in the adc decimation fir filter. pll_fast = 1: fir_len[1:0] adc cycles 00 141 01 288 10 384 pll_fast = 0: fir_len[1:0] adc cycles 00 135 01 276 10 not allowed the adc lsb size and full - scale values depend on the fir_len[1:0] setting. refer to table 83 on page 126 and table 105 on page 144 for details. 71m6543f/h and 71M6543G/gh data sheet 108 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 name location rst wk dir description fl_bank[1:0] sfr b6[1:0] 01 01 r/w flash bank selection (71M6543G and 71M6543Gh only) the program memory of the 71M6543G/gh consists of a fixed lower bank of 32 kb, addressable at 0x0000 to 0x7fff plus an upper banked area of 32 kb, addressable at 0x8000 to 0xffff. the i/o ram register fl_bank is used to switch one of four memory banks of 3 2 kb each into the address range from 0x8000 to 0xffff. note that when fl_bank = 0, the upper bank is the same as the lower bank. fl_bank[1:0] address range for lower bank (0x0000 - 0x7fff) address range for upper bank (0x8000 - 0xffff) 00 0x0000 - 0x7fff 0x0000 - 0x7fff 01 0x0000 - 0x7fff 0x8000 - 0xffff 10 0x0000 - 0x7fff 0x10000 - 0x17fff 11 0x0000 - 0x7fff 0x18000 - 0x1ffff flsh_erase[7:0] sfr 94[7:0] 0 0 w flash erase initiate flsh_erase is used to initiate either the flash mass erase cycle or the flash page erase cycle. specific patterns are expected for flsh_erase in order to initiate the appropriate erase cycle. (default = 0x00). 0x55 ? initiate flash page erase cycle. must be proc eeded by a write to flsh_pgadr [ 5 :0] ( sfr 0xb7 ) . 0xaa ? initiate flash mass erase cycle. must be proceeded by a write to flsh_meen ( sfr 0xb2 ) and the debug (cc) port must be enabled. any other pattern written to flsh_erase ha s no effect. flsh_meen sfr b2[1] 0 0 w mass erase enable 0 = mass erase disabled (default). 1 = mass erase enabled. must be re - written for each new mass erase cycle . flsh_pend sfr b2[3] 0 0 r indicates that a posted flash write is pending. if another flash write is attempted, it is ignored. flsh_pgadr[ 5 :0] sfr b7[7: 2 ] 0 0 w flash page erase address flash page address (page 0 thru 63) that is erased during the page erase cycle. (default = 0x00). must be re - written for each new page erase cycle. flsh_pstwr sfr b2[2] 0 0 r/w enables posted flash writes. when 1, and if ce_e = 1, flash write requests are stored in a one element deep fifo and are executed when ce_busy falls. flsh_pend can be read to determine the status of the fifo. if flsh_pstwr = 0 or if ce_e = 0, flash writes are immediate. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 109 name location rst wk dir description flsh_pwe sfr b2[0] 0 0 r/w program write enable 0 = movx commands refer to external ram space, normal operation (default). 1 = movx @ dptr ,a moves a to external program space (flash) @ dptr . this bit is automatically reset after each byte written to flash. writes to this bit are inhibited when interrupts are enabled. flsh_rde 2702[2] ? ? r indicates that the flash may be read by ice or spi slave. flsh_rde = (! secure ) flsh_unlock[3:0] 2702[7:4] 0 0 r/w must be a 2 to enable any flash modification. see the description of flash se curity for more details. flsh_wre 2702[1] ? ? r indicates that the flash may be written through ice or spi slave ports. ie_xfer ie_rtc1s ie_rtc1m ie_rtc t ie_spi ie_eex ie_xpulse ie_ypulse ie_wpulse ie_vpulse sfr e8[0] sfr e8[1] sfr e8[2] sfr e8[3] sfr f8[7] sfr e8[7] sfr e8[6] sfr e8[5] sfr f8[4] sfr f8[3] 0 0 r/w interrupt flags for external interrupts 2 and 6 . these flags monitor the source of the int6 and int2 interrupts (external interrupts to the mpu core) . the se flags are set by hardware and must be cleared by the software interrupt hand ler. the iex2 ( sfr 0xc0[1] ) and iex6 ( sfr 0xc0[5] ) interrupt flags are automatically cleared by the mpu core when it vectors to the i nterrupt handler. iex2 and iex6 must be cleared by writing zero to their corresponding bit positions in sfr 0xc0, while writing ones to the other bit positions that are not being cleared. intbits 2707[6:0] ? ? r interrupt inputs. the mpu may read these bits to see the input to external in terrupts int0, int1, up to int6. these bits do not have any memory and are primarily intended for debug use. lcd_allcom 2400[3] 0 ? r/w configures seg/com bits as com. has no effect on pins whose lcd_map bit is zero. lcd_bat 2402[7] 0 ? r/w connects the lcd power supply to vbat in all modes. lcd_blnkmap23[5:0] lcd_blnkmap22[5:0] 2401[5:0] 2402[5:0] 0 ? r/w identifies which segments connected to seg23 and seg22 should blink. 1 means blink. the most significant bit corresponds to com5, the least significant, to com0. lcd_clk[1:0] 2400[1:0] 0 ? r/w sets the lcd clock frequency. note: f xtal = 32768 hz lcd_clk[1:0] lcd clock frequency 00 f xtal /2 9 01 f xtal /2 8 10 f xtal /2 7 11 f xtal /2 6 71m6543f/h and 71M6543G/gh data sheet 110 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 name location rst wk dir description lcd_dac[4:0] 240d[4:0] 0 ? r/w the lcd contrast dac. this dac controls the vlcd voltage and has an output range of 2. 6 5 v to 5 .3 v . the vlcd voltage is vlcd = 2. 6 5 + 2. 6 5 * lcd_dac[4:0]/ 31 thus, the lsb of the dac is 85.5 mv. the maximum dac output voltage is limited by v3p3sys, vbat, and whether lcd_bste = 1. lcd_e 2400[7] 0 ? r/w enables the lcd display. when disabled, vlc2, vlc1, and vlc0 are ground as are the com and seg outputs if their lcd_map bit is 1. lcd_map[55:48] lcd_map[47:40] lcd_map[39:32] lcd_map[31:24] lcd_map[23:16] lcd_map[15:8] lcd_map[7:0] 2405[7:0] 2406[7:0] 2407[7:0] 2408[7:0] 2409[7:0] 240a[7:0] 240b[7:0] 0 0 0 0 0 0 0 ? ? ? ? ? ? ? r/w r/w r/w r/w r/w r/w r/w enables lcd segment driver mode of combined segdio pins. pins that cannot be configured as outputs (seg48 through seg50) become inputs with internal pull ups when their lcd_map bit is zero. also, note that seg48 through seg50 are multiplexed with the in - circuit emulator signals. w hen the ice_e pin is high, the ice interface is enabled, and seg48 through seg50 become e_rxtx, e_tclk and e_rst, respectively. lcd_mode[2:0] 2400[6:4] 0 ? r/w selects t he lcd bias and multiplex mode. lcd_mode output 000 4 states, 1/3 bias 001 3 states, 1/3 bias 010 2 states, 1/2 bias 011 3 states, 1/2 bias 100 static display 101 5 states, 1/3 bias 110 6 states, 1/3 bias lcd_on lcd_blank 240c[0] 240c[1] 0 0 ? ? r/w r/w turns on or off all lcd segments without changing lcd data. if both bits are set, the lcd display is turned on. lcd_only 28b2[6] 0 0 w puts the 71m6543 to sleep, but with lcd display still active. ignored if system power is pr esent. it awakens when the wake t imer times out, when certain dio pins are raised, or when system power returns (s ee 3.2 battery mo des ) . lcd_rst 240c[2] 0 ? r/w clear all bits of lcd data. these bits affect segdio pins that are configured as lcd drivers. this bit does not auto clear. lcd_seg0[5:0] to lcd_seg15[5:0] 2410[5:0] to 241f[5:0] 0 ? r/w seg data for seg0 through seg15. dio data for these pins is in sfr space. lcd_segdio16[5:0] to lcd_segdio45[5:0] 2420[5:0] to 243d[5:0] 0 ? r/w seg and dio data for segdio16 through segdio45. if configured as dio, bit 1 is direction (1 is output, 0 is input), bit 0 is data, and the other bits are ig nored. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 111 name location rst wk dir description lcd_seg46[5:0] to lcd_seg50[5:0] 243e[5:0] to 2442[5:0] 0 ? r/w seg data for seg46 through seg50. these pins cannot be configured as dio. lcd_segdio51[5:0] to lcd_segdio55[5:0] 2443[5:0] to 2447[5:0] 0 ? r/w seg and dio data for segdio51 through segdio55. if configured as dio, bit 1 is direction (1 is output, 0 is input), bit 0 is data, and the other bits are ig nored. lcd_vmode[1:0] 2401[7:6] 00 00 r/w specifies how vlcd is generated. see 2.5.10.3 for the definition of v3p3l. lcd_vmode description 11 external vlcd 10 lcd boost and lcd dac enabled 01 lcd dac enabled 00 no boost and no dac. vlcd=v3p3l. lcd_y 2400[2] 0 ? r/w lcd blink frequency (ignored if blink is disabled). 1 = 1 hz , 0 = 0.5 hz lkpaddr[6:0] 2887[6:0] 0 0 r/w the address for reading and writing the rtc lookup ram . lkpautoi 2887[7] 0 0 r/w auto - increment flag. when set, lkpaddr [6:0] auto increment s every time lkp_rd or lkp_wr is pulsed. the incremented address can be read at lkpaddr. lkpdat[7:0] 2888[7:0] 0 0 r/w the data for reading and writing the rtc lookup ram. lkp_rd lkp_wr 2889[1] 2889[0] 0 0 0 0 r/w r/w strobe bits for the rtc lookup ram read and write. when set, the lkpaddr [6:0] and lkpdat registers is used in a read or write operation. when a strobe is set, it stay s set until the operation completes, at which time the strobe is cleared and lkpaddr [6:0 ] is incremented if lkpautoi is set. mpu_div[2:0] 2200[2:0] 0 0 r/w mpu clock rate is: mpu rate = mck rate * 2 - (2+ mpu_div [2:0]) . the maximum value for mpu_div[2:0] is 4. based on the default values of the pll_fast bit and mpu_div[ 2:0 ] , the power -up mpu rate is 6.29 mhz / 4 = 1. 5725 mhz. the minimum mpu clock rate is 38.4 khz when pll_fast = 1. mux0_sel[3:0] 2105[3:0] 0 0 r/w selects which adc input is to be converted during time slot 0. mux1_sel[3:0] 2105[7:4] 0 0 r/w selects which adc input is to be converted during time slot 1. mux2_sel[3:0] 2104[3:0] 0 0 r/w selects which adc input is to be converted during time slot 2. mux3_sel[3:0] 2104[7:4] 0 0 r/w selects which adc input is to be converted during time slot 3. mux4_sel[3:0] 2103[3:0] 0 0 r/w selects which adc input is to be converted during time slot 4. mux5_sel[3:0] 2103[7:4] 0 0 r/w selects which adc input is to be converted during time slot 5. mux6_sel[3:0] 2102[3:0] 0 0 r/w selects which adc input is to be converted during time slot 6. mux7_sel[3:0] 2102[ 7:4 ] 0 0 r/w selects which adc input is to be converted during time slot 7. 71m6543f/h and 71M6543G/gh data sheet 112 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 name location rst wk dir description mux8_sel[3:0] 2101[3:0] 0 0 r/w selects which adc input is to be converted during time slot 8. mux9_sel[3:0] 2101[ 7:4 ] 0 0 r/w selects which adc input is to be converted during time slot 9. mux10_sel[3:0] 2100[3:0] 0 0 r/w selects which adc input is to be converted during time slot 10. mux_div[3:0] 2100[7:4] 0 0 r/w mux_div[3:0] is the number of adc time slots in each mux frame. the maximum number of time slots is 11. opt_bb 2457[0] 0 ? r/w configures the input of the optical port to be a dio pin to allow it to be bit - banged. in this case, dio5 becomes a third high speed uart. refer to 2.5.9 uart and optical interface =under the ? bit banged optical uart (third uart )? sub - heading on page 57 . opt_fdc[1:0] 2457[5:4] 0 ? r/w selects opt_tx modulation duty cycle opt_fdc function 00 50% low 01 25% low 10 12.5% low 11 6.25% low opt_rxdis 2457[2] 0 ? r/w opt_rx can be configured as an input to the optical uart or as segdio55. opt_rxdis = 0 and lcd_map[55] = 0: opt_rx opt_rxdis = 1 and lcd_map[55] = 0: dio55 opt_rxdis = 0 and lcd_map[55] = 1: seg55 opt_rxdis = 1 and lcd_map[55] = 1: seg55 opt_rxinv 2457[1] 0 ? r/w inverts result from opt_rx comparator when 1. affects only the uart input. has no effect when opt_rx is used as a dio input. opt_txe [1,0] 2456[3:2] 00 ? r/w configures the opt_tx output pin. if lcd_map[51] = 0: 00 = dio51, 01 = opt_tx, 10 = wpulse, 11 = vpulse if lcd_map[51] = 1: xx = seg51 opt_txinv 2456[0] 0 ? r/w invert opt_tx when 1. this inversion occurs before modulation. opt_txmod 2456[1] 0 ? r/w enables modulation of opt_tx. when opt_txmod is set, opt_tx is modulated when it would otherwise have been zero. the modulation is applied after any inversion caused by opt_txinv . osc_comp 28a0[5] 0 ? r/w enables the automatic update of rtc_p [16:0] and rtc_q [1:0] every time the temperature is measured. pb_state sfr f8[0] 0 0 r the de - bounced state of the pb pin. perr_rd perr_wr sfr fc[6] sfr fc[5] 0 0 r/w the 71m6543 sets these bits to indicate that a parity error on the remote sensor has been detected. once set, the bits are remembered until they are cleared by the mpu. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 113 name location rst wk dir description pll_ok sfr f9[4] 0 0 r indicates that the clock generation pll is settled. pll_fast 2200[4] 0 0 r/w controls the speed of the pll and mck. 1 = 19.66 mhz (xtal * 600) 0 = 6.29 mhz (xtal * 192 ) pls_maxwidth[7:0] 210a[7:0] ff ff r/w pls_maxwidth[7:0] d etermines the maximum width of the pulse (low - going pulse if pls_inv =0 or high - going pulse if pls_inv =1 ). the m aximum pulse width is (2* pls_maxwidth [7:0] + 1)*t i . where t i is pls_interval [7:0] in units of ck_fir clock cycles. if pls_interval [7:0] = 0 or pls_maxwidth [7:0] = 255, no pulse width checking is performed and the output pulses have 50% duty cycle. see 2.3.6.2 vpulse and wpulse . pls_interval[7:0] 210b[7:0] 0 0 r/w pls_interval[7:0] d etermines the i nterval time between pulses . the time between output pulses is pls_interval [7:0] *4 in units of ck_fir clock cycles . if pls_interval [7:0] = 0, the fifo is not used and pulses are output as soon as the ce issues t hem. pls_interval[7:0] is calculated as follows: pls_interval[7:0] = f loor ( mux frame duration in ck_fir cycles / ce pulse updates per mux frame / 4 ) for example, since the 71m6543 ce code is written to generate 6 pulses in one integration interval, w he n the fifo is enabled (i.e., pls_interval [7:0] 0) and that the frame duration is 1950 ck_fir clock cycles, pls_interval[7:0] should be written with floor(1950 / 6 / 4) = 81 so that the five pulses are evenly spaced in time over the integration interval and the last pulse is issued just prior to the end of the interval . see 2.3.6.2 vpulse and wpulse . pls_inv 210c[0] 0 0 r/w inverts the polarity of wpulse and varpulse. normally, these pulses are active low. when inverted, they become active high. pls_inv has no effect on xpulse or ypulse. port_e 270c[5] 0 0 r/w enables outputs from the segdio0 - segdio15 pins. port_e = 0 blocks the momentary output pulse that occurs when seg dio0 - seg dio15 are reset on power - up . pre_e 2704[5] 0 0 r/w enables the 8x pre - amp lifier . preboot sfrb2[7] ? ? r indicates that pre - boot sequence is active. rcmd[4:0] sfr fc[4:0] 0 0 r/w when the mpu writes a non - zero value to rcmd , the 71m6543 issues a command to the appropriate remote sensor. when the command is complete, the 71m6543 clears rcmd. reset 2200[3] 0 0 w when set, writes a one to wf_rstbit and then cause s a reset. rfly_dis 210c[3] 0 0 r/w controls how the 71m6543 drives the power pulse for the 71m6xxx . when set, the power pulse is driven high and low. when cleared, it is driven high followed by an open circuit fly - back interval. 71m6543f/h and 71M6543G/gh data sheet 114 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 name location rst wk dir description rmt2 _e rmt4 _e rmt6 _ e 2709[3] 2709[4] 2709[5] 0 0 r/w enables the remote interface. rmt_rd[15:8] rmt_rd[7:0] 2602[7:0] 2603[7:0] 0 0 r response from remote read request. rtc a _adj[6:0] 2504 [6:0] 40 ? r/w register for a nalog rtc frequency adjust ment . rtc_fail 2890[4] 0 0 r/w indicates that a count error has occurred in the rtc and that the time is not trustworthy. this b it can be cleared by writing a 0 . rtc_p[16:14] rtc_p[13:6] rtc_p[5:0] 289b[2:0] 289c[7:0] 289d[7:2] 4 0 0 4 0 0 r/w rtc adjust. see 2.5.4 real - time clock (rtc) . 0x0ffbf rtc_p 0x10040 note: rtc_p[16:0] and rtc_q[1:0] for m a single 19 - bit rtc adjustment value. rtc_q[1:0] 289d[1:0] 0 0 r/w rtc adjust. see 2.5.4 real - time clock (rtc) . note: rtc_p[16:0] and rtc_q[1:0] form a single 19 - bit rtc adjustment value. rtc_rd 2890[6] 0 0 r/w freezes the rtc shadow register so it is suitable for mpu reads. when rtc_rd is read, it returns the status of the shadow register: 0 = up to date, 1 = frozen. rtc_sbsc[7:0] 2892[7:0] ? ? r time remaining since the last 1 second boundary. lsb=1/128 second. rtc_tmin[5:0] 289e[5:0] 0 ? r/w the target minutes register. see rtc_thr below . rtc_thr[4:0] 289f[4:0] 0 ? r/w the target hours register. the rtc_t interrupt occur s when rtc_min [5:0] becomes equal to rtc_tmin[5:0] and rtc_hr[4:0] becomes equal to rtc_thr[4:0] . rtc_wr 2890[7] 0 0 r/w freezes the rtc shadow register so it is suitable for mpu writes. when rtc_wr is cleared, the contents of the shadow register are written to the rtc counter on the next rtc clock (~1 khz). when rtc_wr is read, it return s 1 as long as rtc_wr is set. it c ontinue s to return one until the rtc counter actually updates. rtc_sec[5:0] rtc_min[5:0] rtc_hr[4:0] rtc_day[2:0] rtc_date[4:0] rtc_mo[3:0] rtc_yr[7:0] 2893[5:0] 2894[5:0] 2895[4:0] 2896[2:0] 2897[4:0] 2898[3:0] 2899[7:0] ? ? ? ? ? ? ? ? ? ? ? ? ? ? r/w the rtc interface. these are the year, month, day, hour, minute and second parameters for the rtc. the rtc is set by writing to these registers. year 00 and all others divisible by 4 are defined as a leap year. sec 00 to 59 min 00 to 59 hr 00 to 2 3 (00=midnight) day 01 to 07 (01=sunday) date 01 to 31 mo 01 to 12 yr 00 to 99 each write operation to one of these registers must be preceded by a write to 0x 20a0. rtm_e 2106[1] 0 0 r/w real time monitor enable. when 0 , the rtm output is low. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 115 name location rst wk dir description rtm0[9:8] rtm0[7:0] rtm1[7:0] rtm2[7:0] rtm3[7:0] 210d[1:0] 210e[7:0] 210f[7:0] 2110[7:0] 2111[7:0] 0 0 0 0 0 0 0 0 0 0 r/w four rtm probes. before each ce code pass, the values of these registers are serially output on the rtm pin. the rtm registers are ignored when rtm_e = 0. note that rtm0 is 10 bits wide. the others assume the upper two bits are 00. secure sfr b2[6] 0 0 r/w inhibits erasure of page 0 and flash memory addresses above the beginning of ce code as defined by ce_lctn[ 6/ 5:0]. also inhibits the reading of flash memory by ex ternal devices (spi or ice port). sleep 28b2[7] 0 0 w puts the 71m6543 to sleep. ignored if system power is present. the 71m6543 wake s when the wake timer times out, when push button is pushed, or when system power returns. spi_cmd sfr fd[7:0] ? ? r spi command. 8 - bit command from the bus master. spi_e 270c[4] 1 1 r/w spi port enable. enables the spi interface on pins seg dio 36 ? seg dio 39. requires that lcd_map[36 - 39] = 0. spi_safe 270c[3] 0 0 r/w l imits spi writes to spi_cmd and a 16 byte region in dram. no other writes are per mitted. spi_stat 2708[7:0] 0 0 r spi_stat contains the status results from the previous spi transaction bit 7 - 71m6543 ready error: the 71m6543 was not ready to read or write as directed by the previous command. bit 6 - read data parity: this bit is the parity of all bytes read from the 71m6543 in the previous command. does not include the spi_stat byte. bit 5 - write data par ity: this bit is the overall parity of the bytes written to the 71m6543 in the previous command. i t includes cmd and addr bytes. bit 4:2 - bottom 3 bits of the byte count. does not in clude addr and cmd bytes. one, two, and three byte instructions return 111. bit 1 - spi flash mode: this bit is zero when the test pin is zero. bit 0 - spi flash mode ready: used in spi flash mode. indicates that the flash is ready to receive another write instruction. stemp[10:3] stemp[2:0] 2881[7:0] 2882[7:5] ? ? ? ? r r the result of the temperature measurement. sum_samps[12:8] sum_samps[7:0] 2107[4:0] 2108[7:0] 0 0 r/w the number of multiplexer cycles (frames) per xfer_busy interrupt. maximum value is 8191 cycles. tbyte_busy 28a0[3] 0 0 r indicates that hardware is still writing the 0x 28a0 byte. additional writes to this byte are locked out while it is one. write duration could be as long as 6 ms. temp_22[10:8] temp_22[7:0] 230a[2:0] 230b[7:0] 0 ? r storage location for stemp [10:0] at 22c. stemp [10:0] is an 11 bit word. 71m6543f/h and 71M6543G/gh data sheet 116 ? 2008 ? 2011 teridian semiconductor corporation v1. 2 name location rst wk dir description temp_bat 28a0[4] 0 ? r/w causes vbat to be measured whenever a temperature measurement is per formed. temp_bsel 28a0[7 ] 0 ? r/w selects which battery is monitored by the temp erature sensor: 1 = vbat, 0 = vbat_rtc temp_per[2:0] 28a0[2:0] 0 ? r/w sets the period between temperature measurements. automatic measurements can be enabled in any mode (msn, brn, lcd, or slp). temp_per = 0 disables automatic temperature updates, in which case temp_start may be used by the mpu to initiate a one- shot temperature measurement. temp_per time (seconds) 0 no temperature updates 1 -6 ) per _ temp 3 ( 2 + 7 continuous updates temp_pwr 28a0[6 ] 0 ? r/w selects the power source for the temp sensor: 1 = v3p3d, 0 = vbat_rtc. this bit is ignored in slp and lcd modes, where the temp sensor is always powered by vbat_rtc. temp_start 28b4[6] 0 0 r/w when temp_per = 0 automatic temperature measurements are disabled, and temp_start may be set by the mpu to initiate a one - shot temperature measurement. temp_start is i gnored in slp and lcd modes. hard ware clears temp_start when the temperature measurement is complete. tmux[ 5 :0] 2502[5 :0] ? ? r/w selects one of 32 signals for tmuxout. see 2.5.14 for details. tmux2[ 4 :0] 2503[4:0] ? ? r/w selects one of 32 signals for tmux2out. see 2.5.14 for details. tmuxr2 [2:0] tmuxr4 [2:0] tmuxr6 [2:0] 270a[2:0] 270a[6:4] 2709[2:0] 000 000 r/w the tmux setting for the remote isolated sensors (71m6xx 3 ). version[7:0] 2706[7:0] ? ? r the silicon version index. this word may be read by firmware to determine the silicon version. version[7:0] 71m6543f/h silicon version 71M6543G/gh silicon version 0001 0001 a01 a01 0001 0011 a03 n/a 0001 0011 b01 n/a 0010 0010 b02 n/a vref_cal 2704[7] 0 0 r/w brings the adc reference voltage out to the vref pin. this feature is disabled when vref_dis =1. vref_dis 2704[6] 0 1 r/w disables the internal adc voltage reference. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 117 name location rst wk dir description vstat[2:0] sfr f9[2:0] ? ? r this word describes the source of power and the status of the vdd. vstat[2:0] description 000 system power ok. v3p3a>3.0v. analog modules are functional and accurate. [v3aok,v3ok]=11 001 system power low. 2.8v 71m6543f/h and 71M6543G/gh data sheet 118 ? 2008? 2011 teridian semiconductor corporation v1. 2 5.3 reading the info page (71m6543h and 71M6543Gh only) high precision trim fuse values provided in the 71m6543h and 71M6543Gh device s cannot be directly accessed through the i/o ram space. these trim fuses reside in a special area termed the ?info page?. the mpu gains access to the info page by setting the info_pg ( i/o ram 0x270b[0] ) control bit. once the info_pg bi t is set, info page contents are accessible in program memory space based at the address specified by the contents of ce_lctn[6/5:0] ( i/o ram 0x2109[5:0 ] ) in the 71m6543h and ce_lctn[6 :0] ( i/o ram 0x2109[6: 0]) in the 71M6543Gh . ce_lctn[5:0] in the 71m6543h and ce_lctn[6 :0] in the 71M6543Gh specif y a base address at a 1kb address boundary. thus, the base address for the info page is at 1024* ce_lctn[5 :0] in the 71m6543h and 1024* ce_lctn[6 :0] in the 71M6543Gh . table 72 provides a list of the available 71m6543h and 71M6543Gh trim fuses and their corresponding offsets relative to the info page base address. after reading the desired info page information, the mpu must reset the info_pg bit. table 72: info page trim fuses trim fuse object size address offset comments temp_85[10:8] temp_85[7:0] (11 - bits) 8 - bits 8 - bits 0x90 0x91 temp_85[10:0] holds the stemp[10:0] reading at 85c. 2?s complement format trimbgb[15:8] trimbgb[7:0] (16 - bits) 8 - bits 8 - bits 0x 92 0x 93 t rimbgb[15:0] holds the deviation of vref from its ideal value (1.195v) at 85c. lsb = 0.1 mv 2?s compl ement format trimbgd[7:0] (8 - bits) 8 - bits 0x 94 t rimbgd[7:0] holds the deviation of vref from its ideal value (1.195v) at 22c. lsb = 0.1 mv 2?s compl ement format lcdadj12[7:0] (8 - bits) 8 - bits 0x95 lcdadj12 = [vlcd - 3.676v] at 22c when lcd_dac=0c. lsb=5mv. two?s complement. lcdadj0[7:0] (8 - bits) 8 - bits 0x96 lcdadj0 = [vlcd - 2.65v] at 22c when lcd_dac=0. lsb=5mv. two?s complement. figure 38 . trim fuse bit mapping offset name bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0x90 temp_85[10:0] temp_85[10:8] 0x91 temp_85[7:0] 0x92 trimbgb[15:0] trimbgb[15:8] 0x93 trimbgb[7:0] 0x94 trimbgd[7:0] trimbgd[7:0] the code below provides an example for reading info page fuse trims . in this code example, the address, "px" is a pointer to the mpu? s code space. in assembly language, the info page data objects, which are read - only , must be accessed with the movc 8051 instruction. in c, info page trim fuses must be fetched with a pointer of the correct width, depending whether an 8 - bit or a 16 - bit dat a object is to be fetched. the case statements in the code example below perform casts to obtain a pointer of the correct size for each object, as needed. in assembly language, the mpu has to form 11 - bit or 16- bit values from two separate 8- bit fetches, de pending on the object being fetched. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 119 the byte values containing less than 8 valid bits are lsb justified. for example info page offset 0x90 is an 8- bit object, whose three lsbs are bits [10:8] of the complete temp_85[10:0] 11- bit object. the info page dat a objects are 2?s complement format and should be sign extended when read into a 16 - bit data type (see case _temp85 in the code example). #if high_precision_meter int16_t read_trim (enum etrimsel select) { uint8r_t *px; int16_t x; px = ((uint 16_t)select) + ((uint8r_t *)(ce3 << 10)); switch (select) { default: case _trimbgd: info_pg = 1; x = *px; info_pg = 0; break; case _trimbgb: info_pg = 1; x = *(uint16r_t*)px; info_pg = 0; break; case _temp85: info_pg = 1; x = *(uint16r_t*)px; info_pg = 0; if (x & 0x800) x |= 0xf800; break; } return (x); } #endif //#if high_precision_meter 71m6543f/h and 71M6543G/gh data sheet 120 ? 2008? 2011 teridian semiconductor corporation v1. 2 5.4 ce interface description 5.4.1 ce program the ce performs the precision computations necessary to accurately measure power. these computa tions include offset cancellation, phase compensation, product smoothing, product summation, frequency de tection, var calculation, sag detec tion and voltage phase measurement. all data computed by the ce is dependent on the selected meter equation as given by equ[2:0] ( i/o ram 0x2106[7:5] ). the standard ce program is supplied by teridian as a data image that can be merged with the mpu op erational code for meter applications . typically, this ce program covers most applications and does not need to be modified . other variations of ce code may be available from t erid ian . the description in this section applies to ce code revision ce43 a01a . 5.4.2 ce data format all ce words are 4 bytes . unless specified otherwise, they are in 32- bit two?s complement format (- 1 = 0xffffffff) . calibration para meters are defined in flash memory (or external eeprom) and must be copied to ce data memory by the mpu before enabling the ce . internal variables are used in internal ce calculations . input variables allow the mpu to control the behavior of the ce code . output variables are outpu ts of the ce calculations . the corresponding mpu address for the most signi ficant byte is given by 0x0000 + 4 x ce_address and by 0x0003 + 4 x ce_address for the least significant byte. 5.4.3 constants constants used in the ce data memory tables are: ? sampling frequency: f s = 32768 hz/15 = 2184.53 hz. ? f 0 is the fundamental frequency of the mains phases . ? imax is the external rms current corresponding to 250 mv pk at each iadc input . ? vmax is the external rms voltage corresponding to 250 mv pk at each vadc input. ? n acc , the accumulation count for energy measurements is sum_ samp s [12:0] (i/o ram 0x2107[4:0], 0x2108[7:0]) . this value also resides in sum_pre ( ce ram 0x 23 ) where it is used for phase angle measurement. ? the duration of the accumulation inte rval for energy measurements is sum_samps[12:0] /f s . ? x is a gain constant of the pulse generators. its value is determined by pulse_fast and pulse_slow (see table 78 ) . ? voltage lsb = vmax * 7.879810 - 9 v. ? vmax = 600 v, imax = 208 a, and kh = 3.2 wh/pulse are assumed as default settings. the system constants imax and vmax are used by the mpu to convert internal digital quantities (as used by the ce) to external, i.e. metering quantities. their values are determined by the scaling of the voltage and current sensors used in an actual meter. the lsb values used in this docu ment relate digital quantities at the ce or mpu interface to external meter input quantities. for exam ple, if a sag threshold of 80 v peak is desired at the meter input, the d igital value that should be pro grammed into sag_thr (ce ram 0x24) would be 80 v/ sag_thr lsb , where sag_thr lsb is the lsb value in the description of sag_thr ( table 79) . the parameters equ[2:0] , ce_e, and sum_samps[12:0] , essential to the function of the ce are stored in i/o ram (see 5.2 for details ). 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 121 5.4.4 environment before starting the ce using the ce_e bit ( i/o ram 0x2106[0]) , the mpu has to establish the proper envi ronment for the ce by implementing the following steps: ? locate the ce code in flash memory using ce_lctn[5:0] ( i/o ram 0x2109[5:0] ) in the 71m6543f/h and ce_lctn[6 :0] ( i/o ram 0x2109[6 :0] ) in the 71M6543G/gh ? load the ce data into ram. ? establish the equation to be applied in equ[2:0] (i/o ram 0x2106[7:5]) . ? establish the accumulation period and number of samples in sum_samps[12:0] (i/o ram 0x2107[4:0], 0x2108[7:0]) . ? establish the number of cycles per adc multiplexer frame ( mux_div[3:0] (i/o ram 0x2100[7:4]) ). ? apply proper values to muxn_sel , as well as proper selections for diffn_e ( i/o ram 0x210c[ ]) and rmtn_e ( i/o ram 0x2709[ ] in order to configure the analog inputs. ? initialize any mpu interrupts, such as ce_busy , xfer_busy, or the power - failure detection interrupt. when different ce codes are used, a different set of environment parameters need to be established. the exact values for these parameters are listed in the application notes and other documentation w hich accompanies the ce code. operating ce codes with environment parameters deviating from the values specified by teridian lead s to unpredictable results. typically, there are fifteen 32768 hz cycles per adc multiplexer frame (see 2.2.2 ). t his means that the product of the number of cycles per frame and the number of conversions per frame must be 14 (allowing for one settling cycle). the default configuration is fir_len = 0 1 , i/o ram 0x210c[1] (two cycles per conversion) and mux_div[3:0] = 7 (7 conversions per multiplexer cycle). sample configurations can be copied from demo code provided by teridian with the demo kits. 5.4.5 ce calculations referring to table 73 , the mpu selects the desired equation by writing the equ[2:0] ( i/o ram 0x2106[7:5] ). table 73 : ce equ[2:0] equations and element input mapping equ [2:0]* watt & var formula ( wsum/varsum) w0sum/ var0sum w1sum/ var1sum w2sum/ var2sum i0sq sum i1sq sum i2sq sum 2 va*ia + vb*ib ( 2 - element, 3 - w, 3 ? delta ) va * ia vb * ib n/a ia ib ? 3 va*(ia - ib)/2 + vc*ic (2 element, 4w 3 delta) va*(ia - ib)/2 ? vc*ic ia - ib ib ic 4 va*(ia - ib)/2 + vb*(ic - ib)/2 (2 element, 4w 3 wye) va*(ia - ib)/2 vb*(ic - ib)/2 ? ia - ib ic - ib ic 5 va*ia + vb*ib + vc*ic (3 element, 4w 3 wye) va*ia vb*ib vc*ic ia ib ic note: * only equ[2:0] = 5 is supported by the currently available ce code versions for the 71m6543. contact your local teridian representative for ce codes that support equations 2, 3 and 4. 71m6543f/h and 71M6543G/gh data sheet 122 ? 2008? 2011 teridian semiconductor corporation v1. 2 5.4.6 ce front - end data (raw data) access to the raw data provided by the afe is p ossible by reading ce ram addresses 0 through a , as shown in table 74 . in the expression mux n _sel [3:0] = x, ?n? refers to the multiplexer frame time slot number and ?x? refers to the desired adc input number or adc handle (i.e., iadc0 to vadc10 , or simply 0 to 10 decimal). the 71m6543 can support up to eleven sensor inputs, when all the current sensors are configured as single - ended inputs. if all the current sensor inputs are configured as differential (recommended for best performance), the number of input sen sor channels is reduced to seven (i.e., ia dc0 - 1 , i adc2- 3 , i adc4 - 5 , i adc6 -7 , va dc8 , v adc9 and v adc10 ). the mux n _sel [3:0] column in table 74 shows the mux n _sel handles for the various sensor input pins. for ex ample, if differential mode is enable d via control bit diff0 _e = 1 ( i/o ram 0x210c[4] ) , then the iadc0 - iadc1 input pins are combined together to form a single differential input and the corresponding mux n _sel handle is 0 (i.e., handle 1 is then unused) . similarly, the ce ram location column provides the ce ram address where the corresponding sample data is stored. contin uing with the same example, if diff0 _e = 1, the corresponding ce ram location where the samples for the iadc0 - iadc1 differential input are stored is ce ram 0. the iadc2 - 3 , i adc4-5 and i adc6 - 7 input s can be configured as direct - connected sensor s (i.e., dir ectly connected to the 71m654 3 ) or as remote sensor s (i.e., using a 71m6xx 3 isolated sensor). for example, i f the iadc2 - 3 remote sensor is disabled by rmt2 _e = 0 ( i/o ram 0x2007[3] ) and differential mode is enabled by diff2 _e = 1 ( i/o ram 0x210c[4] ) , then iadc2 - iadc3 form a differential input with a mux n _sel handle of 2 (i.e., handle 3 is then unused) , and the corresponding samples are stored in ce ram location 2. if the remote sensor enable bit rmt2 _e = 1 , diff2 _e = x (don?t care) , then the mux n _sel hand le is not required (i.e., the sensor is not connected to the 71m654 3 multiplexer , so mux n _sel does not apply), and the samples corresponding to this remote differential iadc2 - iadc3 input are stored in ce ram location 2 directly by the digital isolation interface (see figure 2 ). the voltage sensor inputs (va dc8, v adc9 and v adc10 ) are alw ays single - ended inputs and cannot be configured as remotes, so they do not have any associated configuration bits. vadc8 ( va) has a mux n _sel handle value of 8 , and its samples are stored in ce ram location 8 . vadc9 (vb ) has a mux n _sel han dle value of 9 and its samples are stored in ce ram location 9 . vadc10 ( vc ) has a mux n _sel han dle value of 10 and its samples are stored in ce ram location 10. table 74 : ce raw data access locations pin muxn_sel handle ce ram location diff0 _e diff0 _e 0 1 0 1 iadc0 0 0 0 0 iadc1 1 1 rmt2 _e, diff2 _e rmt2 _e, diff2 _e 0,0 0,1 1,0 1,1 0,0 0,1 1,0 1,1 iadc2 2 2 - - 2 2 2* 2* iadc3 3 3 rmt4 _e, diff4 _e rmt4 _e, diff4 _e 0,0 0,1 1,0 1,1 0,0 0,1 1,0 1,1 iadc4 4 4 - - 4 4 4* 4* iadc5 5 5 rmt6 _e, diff6 _e rmt6 _e, diff6 _e 0,0 0,1 1,0 1,1 0,0 0,1 1,0 1,1 iadc6 6 6 - - 6 6 6* 6* iadc7 7 7 there are no configuration bits for vadc8 , 9, 10 vadc8 (va) 8 8 vadc9 (vb) 9 9 vadc10 (vc) 10 10 *remote interface data 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 123 5.4.7 ce s tatus and control the ce status word is useful for generating early warnings to the mpu ( table 75) . it contains sag warnings for phase a, b, and c, as well as f0 , the derived clock operating at the fundamental input fre quency. the mpu can read the ce status word at every ce_busy interrupt. since the ce_busy inter rupt oc curs at the sample rate (i.e . , 2520.6 hz for mux_div[3:0] =6 or 2184.5 hz for mux_div[3:0] =7) , it is desirable to minimize the computation required in the interrupt handler of the mpu . table 75: cestatus register ce address name description 0x80 cestatus see description of cestatus bits in table 76. cestatus provides information about the status of voltage and input ac signal frequency, which are useful for generating an early power fail warning to initiate necessary data storage. cestatus re pre sents the status flags for the preceding ce code pass (ce_busy interrupt). the significance of the bits in cestatus is shown in table 76. table 76: cestatus bit definitions cestatus bit name description 31: 4 not used these unused bits are always zero. 3 f0 f0 is a square wave at the exact fundamental input frequency. 2 sag_ c normally zero. becomes one when vadc10 (vc) remains below sag_thr (ce ram 0x24) for sagcnt samples. does not return to zero until vadc10 (vc) rises above sag_thr . 1 sag_b normally zero . becomes one when vadc9 (vb) remains below sag_thr for sag_cnt samples . does not return to zero until vadc9 (vb) rises above sag_thr . 0 sag_a normally zero . becomes one when vadc8 (va) remains below sag_thr for sag_cnt samples . does not return to zero until vadc8 (va) rises above sag_thr . the ce is initialized by the mpu using ce config ( table 77 ). t his register contains in packed form sag_cnt, freqsel 0, freqsel 1, ext_pulse, pulse_slow, and pulse_fast . the ceconfig bit definitions are given in table 78. table 77: ceconfig register ce address name data description 0x20 ceconfig 0x 0030da 20 see description of the ce config bits in table 78. the ext_temp bit enables temperature compensation by the mpu, when set to 1. when 0, internal (ce) temperature compensation is enabled. the ce pulse generator can be controlled by either the mpu (external) or ce (internal) variables . control is by the mpu if ext _ pulse = 1 . in this case, the mpu controls the pulse rate by placing values into apulsew and apulser (ce ram 0x4 5 and 0x4 9) . by setting ext _ pulse = 0, the ce controls the pulse rate based on wsum_x (ce ram 0x84) and varsum_x (ce ram 0x88). the 71m6543 demo code creep function halts both internal and external pulse generation. 71m6543f/h and 71M6543G/gh data sheet 124 ? 2008? 2011 teridian semiconductor corporation v1. 2 table 78: ce config bit definitions (ce ram 0x20) ceconfig bit name default description 23 reserved 0 reserved. 22 ext_temp 0 when 1, the mpu controls temperature compensation via the gain_adjn ( ce ram 0x40- 0x42 ) , when 0, the ce is in control. 21 ed g e_int 1 when 1, xpulse produces a pulse for each zero - crossing of the mains phase selected by freqsel[1:0] , which can be used to interrupt the mpu. 20 sag_int 1 when 1, activates the ypulse/segdio7 output when a sag is detected (see 2.5.10 ) on the phase selected with freq - sel [ 1 :0] . 19: 8 sag_cnt 218 (0xda ) the n umber of consecutive voltage samples below sag_thr ( ce ram 0x24 ) before a sag alarm is declared. the default value is equivalent to 1 0 0 ms . 7 :6 freqsel[1:0] 0 freqsel [ 1 :0] selects the phase to be used for the frequency monitor, sag detection, the phase -to - phase lag calculation and for the zero crossing counter ( mainedge_x , ce ram 0x83 ). fr e q s e l [1:0] phase se lected phases selected ph_atob_x ph_a to c _x 0 0 a a-b a-c 0 1 b b-c b-a 1 0 c c -a c -b 1 1 not allowed 5 ext_pulse 1 when zero, causes the pulse generat o rs to respond to internal data. wpulse = wsum_x ( ce ram 0x84) , vpulse = varsum_x (ce ram 0x88.) otherwise, the generators respond to values the mpu places in apulsew and apulser (ce ram 0x4 5 and 0x4 9) 4 :2 reserved 0 reserved. 1 pulse_fast 0 when pulse_fast = 1, the pulse generator input is increased 16x . when pulse_slow = 1, the pulse generator input is re duced by a factor of 64. these two parameters control the pulse gain factor x (see table below). allowed values are e i ther 1 or 0. default is 0 for bo th (x = 6). pulse_ fast pulse_ slo w x 0 0 1.5 * 2 2 = 6 0 1 1.5 * 2 - 4 = 0.09375 1 0 1.5 * 2 6 = 96 1 1 do not use 0 pulse_slow 0 the freqsel[1:0] field in ceconfig ( ce ram 0x20[7:6] ) selects the ph ase that is utilized to generate a sag interrupt . thus, a sag_int event occurs when the selected phase has satisfied the sag event criteria as set by the sag_thr ( ce ram 0x24 ) register and the sag_cnt field in ceconfig (ce ram 0x20[19:8]). when the sag_int bit ( ce ram 0x20[20] ) is set to 1, a sag event generates a transition on the ypulse output. after a sag interrupt, the mpu should change the freqsel[1:0] setting to select the other phase, if it is powered. even though a sag interrupt is only generated on the selected phase, all three phases are simu ltaneously checked for sag. the presence of power on a given phase can be sensed by directly checking the sag_a , sag_b and sag_c bits in cestatus ( ce ram 0x80[0:1]). the ext_temp bit enables temperature compensation by the mpu, when set to 1. when 0, inte rnal (ce) temperature compensation is enabled. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 125 the ce pulse generator can be controlled by either the mpu (external) or ce (internal) variables. control is by the mpu if the ext _ pulse bit = 1 ( ce ram 0x20[5] ) . in this case, the mpu controls the pulse rate (external pulse generation) by placing values into apulsew and apulser (ce ram 0x4 5 and 0x4 9) . by setting ext _ pulse = 0, the ce controls the pulse rate based on wsum_x (ce ram 0x84) and varsum_x (ce ram 0x8 8). the 71m6543 demo code creep function halts both internal and external pulse generation. table 79 : sag threshold , phase measurement, and gain adjust control ce address name default description 0x 24 sag_thr 2.39*10 7 the voltage threshold for sag warnings. the default value is equivalent to 80 v rms if vmax = 600 v. 0x40 gain_adj0 16384 the assignments of these gain adjustments depends on the meter design. see 4.5.5 temperature compensation for vref and shunt sensors on page 90 or 4.5.6 temperature compensation of vref and current transformers on page 92. the default value of 16384 corresponds to unity gain. 0x41 gain_adj1 16384 0x42 gain_adj2 16384 0x43 gain_adj3 16384 0x44 gain_adj4 16384 5.4.8 ce transfer v ariables when the mpu receives the xfer_busy interrupt, it knows that fresh data is available in the transfer variables . ce trans fer variables are modified during the ce code pass that ends with an xfer_busy interrupt. they remain constant throughout each accumulation interval. in this data sheet, the names of ce transfer variables always end with _x. the transfer variables can be categorized as: ? fundamental energy measurement variables ? instantaneous (rms) values ? other measurement parameters fundamental energy measurement variables table 80 describes each transfer variable for fundamental energy measurement . all variables are signed 32- bit integers . accumulated variables such as wsum are internally scaled so they have at least 2x margin before overflow when the integration time is one second . additionally, the hardware does not permit output values to fold back upon overflow . table 80: ce transfer variables (with shunts) ce address name description c onfiguration 0x84 wsum_x the signed sum: w0sum_x+w1sum_x+w2sum_x . figure 31 (page 87) 0x85 w0sum_x the sum of wh samples from each wattmeter element . lsb w = 7.7562 *10 -13 vmax * imax wh. 0x86 w1sum_x 0x87 w2sum_x 0x88 varsum_x the signed sum: var0sum_x+var1sum_x+var2sum_x . 0x89 var0sum_x the sum of var h samples from each wattmeter element . lsb w = 7.7562 *10 -13 vmax * imax var h. 0x8a var1sum_x 0x8b var2sum_x 71m6543f/h and 71M6543G/gh data sheet 126 ? 2008? 2011 teridian semiconductor corporation v1. 2 table 81: ce transfer variables (with cts) ce address name description configuration 0x84 wsum_x the signed sum: w0sum_x+w1sum_x+w2sum_x . figure 32 (page 88) 0x85 w0sum_x the sum of wh samples from each wattmeter element . lsb w = 1.0856 *10 -12 vmax imax wh. 0x86 w1sum_x 0x87 w2sum_x 0x88 varsum_x the signed sum: var0sum_x+var1sum_x+var2sum_x . 0x89 var0sum_x the sum of var h samples from each wattmeter element . lsb w = 1.0856 *10 -12 vmax imax var h. 0x8a var1sum_x 0x8b var2sum_x w sum_x and varsum_x are the signed sum of phase - a, phase - b and phase - c wh or varh values ac cording to the metering equ ation specified in the control field equ[2:0] (i/o ram 0x2106[7:5]) . wn sum_x is the wh value ac cumulated for phase n in the last accumulation interval and can be computed based on the specified lsb value. for example , with vmax = 600 v and imax = 208 a, the lsb for wn sum_x is 0. 135 wh. 5.4.8.1 instantaneous energy measurement variables in sqsum_x and vn sqsum are the squared current and voltage samples acquired during the last accumulation interval. insqsum_x can be used for computing the neutral current. table 82 : ce energy measurement variables (with shunts) ce address name description configuration 0x8c i0sqsum_x neutral current: lsb i = 9.9045*10 - 13 * imax 2 a 2 h ( pre_e =0) lsb i = 6.1903125*10 - 14 * imax 2 a 2 h ( pre_e =1) figure 31 (page 87) 0x8d i1sqsum_x lsb i = 6.3968*10 - 13 * (imax 2 ) a 2 h 0x8e i2sqsum_x 0x8f i3sqsum_x 0x90 v0sqsum_x lsb v = 9.4045*10 - 13 *vmax 2 v 2 h 0x91 v1sqsum_x 0x92 v2sqsum_x tabl e 83 : ce energy measurement variables (with cts) ce address name description configuration 0x8c i0sqsum_x lsb i = 1.0856 *10 -12 * ( imax 2 ) a 2 h figure 32 (page 88) 0x8d i1sqsum_x 0x8e i2sqsum_x 0x8f i3sqsum_x 0x90 v0sqsum_x lsb v = 1.0856 *10 -12 * vmax 2 v 2 h 0x91 v1sqsum_x 0x92 v2sqsum_x 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 127 the rms values can be computed by the mpu from the squared current and voltage samples as follows: other t ransfer variables include those available for frequency and phase measurem ent, and those re flecting the count of the zero - crossings of the mains voltage and the battery voltage. these transfer variables are listed in table 84. mainedge_x reflects the number of half - cycles accounted for in the last accumulated interval for the ac signal of the phase specified in the freqsel [ 1 :0] field of the ceconfig register ( ce ram 0x20[7:6] ) . mainedge_x is useful for implementing a real - time clock based on the input ac signal. table 84 : other transfer variables ce address name description 0x82 freq_x fundamental frequency : lsb 6 32 10 509 . 0 2 2184 ? ? hz hz (for ct) lsb 6 32 10 587 . 0 2 2520 ? ? hz hz (for shunt) 0x83 mainedge_x the number of edge crossings of the selected voltage in the pre vious ac cumulation interval. edge crossings are either direction and are de bounced. 0x94 ph_atob_x voltage phase lag. the selection of the reference phase is based on freq sel [ 1:0] in the c ec onfig register: if freqsel [ 1 :0] s e lect s phase a: phase lag from a to b. if freqsel [ 1:0] select s phase b: phase lag from b to c. if freqsel [ 1:0] select s phase c: phase lag from c to a. a ngle in degrees is (0 to 360): ph_atob_x * 360/n acc + 2.4 *15/13 (for ct) a ngle in degrees is (0 to 360): ph_atob_x * 360/n acc + 2.4 (for shunt) 0x95 ph_atoc_x if freqsel [ 1:0] select s phase a: phase lag from a to c. if freqsel [ 1:0] select s phase b: phase lag from b to a. if freqsel [ 1:0] select s phase c: phase lag from c to b. angle in degrees is (0 to 360): ph_atoc _x * 360/n acc + 4.8*15/13 (for ct) angle in degrees is (0 to 360): ph_atoc _x * 360/n acc + 4.8*15/13 (for shunt) phase angle measurement accuracy can be increased by writing values > 1 into v_ang_cnt (see table 79). 5.4.9 pulse generation table 85 describes the ce pulse generation parameters . the combina tion of the ceconfig pulse_slow (ce ram 0x20[0] ) and pulse_fast (ce ram 0x20[1] ) bits control s the speed of the pulse rate. the default values of 0 and 0 maintain the original pulse rate given by the kh equation. wrate ( ce ram 0x21 ) controls the number of pulses that are generated per measured wh and varh quantities. the lower wrate is the slower the pulse rate for measured energy quantity. the metering con stant kh is derived from wrate as the amount of energy measured for each puls e. that is, if kh = 1wh/pulse, a power applied to the meter of 120 v and 30 a results in one pulse per se cond. if the load is 240 v at 150 a, ten pulses per second are generated. control is transferred to the mpu for pulse generation if ext_pulse = 1 (ce ram 0x20[5]) . in this case, the pulse rate is de termined by apulsew and a pulser (ce ram 0x4 5 and 0x4 9 ) . the mpu has to load acc s i rms n f lsb ixsqsum ix ? ? ? = 3600 acc s v rms n f lsb vxsqsum vx ? ? ? = 3600 71m6543f/h and 71M6543G/gh data sheet 128 ? 2008? 2011 teridian semiconductor corporation v1. 2 the source for pulse generation in apulsew and apulser to generate pulses. irrespective of the ext_pulse status , the output pulse rate controlled by apulsew and apulser is implemented by the ce only. by setting ext_pulse = 1 , the mpu is providing the source for pulse generation. if ext_pulse is 0 , w0sum_x and var0sum_x are the de fault pulse generation sources. in this case, creep cannot be con trolled since it is an mpu function. the maximum pulse rate is 3*f s = 7.5 khz . see 2.3.6.2 vpulse and wpulse (page 27 ) for details on how to adjust the timing of the out put pulses. the maximum time jitter is 1/6 of the multiplexer cycle period (nominally 67 s) and is independent of the number of pulses measured. thus, if the pulse generator is monitored for one second, the peak jitter is 67 ppm. after 10 seconds, the peak jitter is 6.7 ppm. the average jitter is always zero. if it is attempted to drive either pulse generator faster than its maximum rate, it simply output s at its maximum rate without exhibitin g any rollover characteristics. the actual pulse rate, using wsum as an example, is: hz x f wsum wrate rate s 46 2 ? ? ? = , where f s = sampling frequency (2184 . 53 hz), x = pulse speed factor derived from the ce variables pulse_slow (ce ram 0x20[0]) and pulse_fast (ce ram 0x20[ 1 ]) . table 85 : ce pulse generation parameters ce address name default description 0x21 wrate 227 kh = vmax*imax* k / ( wrate*n acc *x) wh/pulse where: k = 76.3594 when used with local sensors (ct or shunt) k = 54.5793 when used with 71m6xx3 remote sensors 0x22 kvar 6444 scale factor for var measurement. 0x23 sum_pre 2184 number of samples per accumulation interval, as specified in sum_samps[12:0] , i/o ram 0x2107[4:0], 0x2108[7:0] (n acc ). 0x4 5 apulsew 0 w h pulse (wpulse) generator input to be updated by the mpu when using external pulse generation . the output pulse rate is: apulsew * f s * 2 - 32 * wrate * x * 2 - 14 . thi s input is buffered and can be updated by the mpu during a conversion interval. the change take s effect at the beginning of the next interval. 0x4 6 wpulse_ctr 0 counter for wpulse output. 0x4 7 wpulse_ frac 0 unsigned numerator, containing a fraction of a pulse. the value in this register always count s up towards the next pulse. 0x4 8 wsum_ accum 0 roll - over accumulator for wpulse. 0x4 9 apulser 0 var h ( vpulse ) pulse generator input . 0x4 a vpulse _ctr 0 counter for vpulse output. 0x4 b vpulse _ frac 0 unsigned numerator, containing a fraction of a pulse. the value in this register always count s up towards the next pulse. 0x4 c vsum_accum 0 roll - over accumulator for vpulse . other ce parameters table 86 shows the quant ce parameters used for suppression of noise due to scaling and truncation effects. the equations for calculating the lsb weight of each quant parameter are provided at the bot tom of table 86. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 129 table 86 : ce parameters for noise suppression and code version ce address name default description 0x2 6 quant _ia 0 compensation factors for truncation and noise in current, real energy and reactive energy for phase a. 0x27 quant_wa 0 0x28 quant_ vara 0 0x2 a quant _ib 0 compensation factors for truncation and noise in current, real energy and reactive energy for phase b. 0x2b quant_wb 0 0x2c quant_varb 0 0x2 e quant _ic 0 compensation factors for truncation and noise in current, real energy and reactive energy for phase c. 0x2f quant_wc 0 0x30 quant_varc 0 0x31 quant_id 0 compensation factors for truncation and noise in current for phase d. lsb weights f or use with the 71m6xx3 isolated sensors : ) ( 10 20864 . 5 _ _ 2 2 10 amps imax lsb ix quant ? ? = ? ) ( 10 59147 . 8 _ _ 10 watts imax vmax lsb wx quant ? ? ? = ? ) ( 10 59147 . 8 _ _ 10 vars imax vmax lsb varx quant ? ? ? = ? lsb weights f or use with current transformers (cts): ) ( 10 08656 . 5 _ _ 2 2 13 amps imax lsb ix quant ? ? = ? ) ( 10 04173 . 1 _ _ 9 watts imax vmax lsb wx quant ? ? ? = ? ) ( 10 04173 . 1 _ _ 9 vars imax vmax lsb varx quant ? ? ? = ? 71m6543f/h and 71M6543G/gh data sheet 130 ? 2008? 2011 teridian semiconductor corporation v1. 2 5.4.10 ce calibration parameters table 87 lists the parameters that are typically entered to effect calibration of meter accuracy. table 87 : ce calibration parameters ce address name defau lt description 0x10 cal_ia 16384 these constants control the gain of their respective channels. the n ominal value for each parameter is 2 14 = 16384. the gain of each channel is directly proportional to its cal parameter. thus, if the gain of a channel is 1% low, cal shou ld be increased by 1%. 0x11 cal_va 16384 0x13 cal_ib 16384 0x14 cal_vb 16384 0x16 cal_ic 16384 0x17 cal_vc 16384 0x19 cal_i d 16384 0x1 2 phadj_a 0 these constants control the ct phase compensation. no com pensation occurs when phadj_x = 0. as phadj_x is increased, more compensation (lag) is introduced. the r ange is 2 15 ? 1. if it is desired to delay the current by the angle , the equations are : ? ? = tan tan x phadj 0168 . 0 1714 . 0 029615 . 0 2 _ 20 at 60hz ? ? ? = tan tan x phadj 01226 . 0 1430 . 0 0206 . 0 2 _ 20 at 50hz 0x1 5 phadj_b 0 0x1 8 phadj_c 0 0x12 dlyadj_a 0 the shunt delay compensation is obtained using the equation provided below: ( ) ? ? ? ? ? ? ? ? + ? ? ? ? ? ? ? ? + ? ? ? ? ? ? ? ? ? + ? = s s s rees rees f f c b f f ab f f a x dlyadj 2 sin 2 cos 2 2 cos 360 2 2 1 . 0 1 _ 2 2 14 deg deg where: a a 2 = 1 2 + = a b ? = 2 ? 2 + 4 ???? ? 2 ?? ? ? ? + 2 f is the mains frequency f s is the sampling frequency the table below provides the value of a for each channel: channel value of a (decimal) d yadj_a 13840 dlyadj_ b 11693 dlyadj_ c 9359 0x15 dlyadj_b 0 0x18 dlyadj_c 0 note: the current sensor inputs are not assigned to the a, b and c phases in a fixed manner. the assignments of phases a, b and c depends on how the iadc0 - 1, iadc2- 3, iadc4- 5, iadc6- 7 current sensing inputs are connected in the meter design. the ce code must be aware of these connections. see figure 31 and figure 32 for typical meter configurations. vadc8, vadc9 and vadc10 are assigned to voltage phases va, vb and vc in a fixed manner, respectively. the ce addresses listed in this table are assigned to phases a, b and c as indicated by their names. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 131 5.4.11 ce flow diagrams figure 39 through figure 41 show the data flow through the ce in simplified form. functions no t shown include delay compensation, sample interpolation, scaling and the processing of meter equations. figure 39 : ce data flow: multiplexer and adc figure 40 : ce data flow: scaling, gain control, intermediate variables for one phase vref multiplexer f s = 2184 hz ? mod deci - mator de - multiplexer f s = 2184 hz ia_raw ia vb va ib ic vc ib_raw va_raw vb_raw ic_raw vc_raw i d i d _raw 71m6543f/h and 71M6543G/gh data sheet 132 ? 2008? 2011 teridian semiconductor corporation v1. 2 figure 41 : ce data flow: squaring and summation stages v ia wa square wb vara varb va iasq vasq ibsq sum iasqsum_x vasqsum_x icsqsum_x sum wasum_x wbsum_x varasum_x varbsum_x sum_samps = 2184 mpu f0 i 2 v 2 wc varc wcsum_x varcsum_x ib ic vb vc icsq vbsq vcsq ibsqsum_x vbsqsum_x vcsqsum_x f0 id idsq idsqsum_x 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 133 6 71m6543 specifications this section provides the electrical specifications for the 71m6543. please refer to the 71m6xxx data sheet for the 71m6xx3 electrical specifications, pin - out and package mechanic al data. 6.1 a bsolute m aximum r atings table 88 shows the abs olu te maximum ratings for the device. stresses beyond absolute maximum ratings may cause permanent damage to the device. these are stress ratings only and functional operation at these or any other condition s beyond those indicated under recommended operating conditions ( see 6.3 ) is not implied. exposure to absolute - maximum - rated conditions for extended periods may affect device reliability. all voltages are with respect to gnda. table 88 : absolute maximum ratings voltage and current supplies and ground pins v3p3sys, v3p3a ? 0.5 v to + 4.6 v vbat , vbat_rtc - 0.5 v to + 4.6 v gndd - 0.1 v to +0.1 v analog output pins vref - 10 ma to +10 ma, - 0.5 v to v3p3a+0.5 v vdd - 10 ma to + 10 ma, - 0.5 to + 3.0 v v3p3d - 10 ma to +10 ma, - 0.5 v to 4.6 v vlcd - 10 ma to + 10 ma, - 0.5 v to + 6 v analog input pins i adc0 , i adc1 , i adc2 , i adc3 , i adc4 , i adc5 , i adc6 , i adc7, vadc8 , v adc9 and v adc10 -10 ma to +10 ma - 0.5 v to v3p3a+0.5 v xin, xout -10 ma to +10 ma - 0.5 v to + 3.0 v seg and segdio pins configured as seg or com drivers - 1 ma to + 1 ma, - 0.5 v to vlcd+0.5 v configured as digital inputs - 10 ma to + 10 ma, - 0.5 v to + 6 v configured as digital outputs - 10 ma to + 10 ma, - 0.5 v to v3p3d+0.5 v digital pins inputs (pb, reset, rx, ice_e, test) - 10 ma to + 10 ma, - 0.5 to 6 v outputs (tx) - 10 ma to + 10 ma, - 0.5 v to v3p3d+0.5 v temperature operating junction temperature (peak, 100ms) 140 c operating junction temperature (continuous) 125 c storage temperature ? 45 c to +165 c solder ing t emperature ? 10 second duration 250 c 71m6543f/h and 71M6543G/gh data sheet 134 ? 2008? 2011 teridian semiconductor corporation v1. 2 6.2 recommended external components table 89 : recommended external components name from to function value unit c1 v3p3a gnda bypass capacitor for 3.3 v supply 0.1 20% f c2 v3p3d gndd bypass capacitor for 3.3 v output 0.1 20% f csys v3p3sys gndd bypass capacitor for v3p3sys 1.0 30% f cvdd vdd gndd bypass capacitor for v dd 0.1 20% f cv lcd vlc d gndd bypass capacitor for v lcd pin 0.1 20% f xtal xin xout 32.768 khz crystal ? electrically equivalent to ecs .327 - 12.5- 17x or vishay xt26t, load capacitance 12.5 pf 32.768 khz cxs xin gnda load capacitor values for crystal de pend on crystal spec ification s and board parasit ics . nominal values are based on 4 pf board capacitance and include an allowance for chip capacitance. 15 10% pf cxl xout gnda 10 10% pf 6.3 r ecommended operating c onditions unless otherwise specified, a ll parameters listed under 6.4 performance specifications and 6.5 timing specifications are valid over the recommended operating conditions provided in table 90 below. table 90 : recommended operating conditions p arameter condition min typ max unit v3p3sys and v3p3a supply voltage for precision metering operation (msn mode) . voltages at vbat and vbat_rtc need not be present. vbat=0 v to 3.8 v vbat_rtc =0 v to 3.8 v 3.0 3.6 v vbat voltage (brn mode). v3p3sys is below the 2.8 v comparator threshold. either v3p3sys or vbat_rtc must be high enough to power the rtc module. v3p3sys < 2.8 v and max(vbat_rtc, v3p3sys) > 2.0 v 2.5 3.8 v vbat_rtc voltage. vbat_rtc is not needed to support the rtc and non - volatile memory unless v3p3sys<2.0 v v3p3sys<2.0 v 2.0 3.8 v operating temperature -40 +85 o c notes: 1. gnda and gndd must be connected together. 2. v3p3sys and v3p3a m u st be connected together. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 135 6.4 p erformance s pecifications 6.4.1 input logic levels table 91: i nput logic levels p arameter c ondition min t yp max u nit digital high - level input voltage 1 , v ih 2 v digital low - level input voltage 1 , v il 0.8 v input pullup current, i il e_rxtx, e_ rst , e_tclk opt_rx, opt_tx spi_csz (segdio36) other digital inputs vin=0 v, ice_e= 3.3 v 10 10 10 - 1 0 100 100 100 1 a a a a input pull down current, i ih ice_e, reset, test other digital inputs vin=v3p3d 10 - 1 0 100 1 a a note: 1. in battery powered modes, di gital inputs should be below 0.1 v or above v bat ? 0.1 v to minimize battery current. 6.4.2 o utput logic levels table 92 : output logic levels p arameter c ondition min t yp max u nit digital high - level output voltage v oh i load = 1 ma v3p3d ? 0.4 v i load = 15 ma (see notes 1, 2) v3p3d - 0.6 v digital low - level output voltage v ol i load = 1 ma 0 0.4 v i load = 15 ma (see note 1) 0 0.8 v note: 1. guaranteed by design; not production tested. 2. caution: the sum of all pull up currents must be compatible with the on- resistance of the internal v3p3d switch . s ee 6.4.6 v3p3d switch on page 139 . 71m6543f/h and 71M6543G/gh data sheet 136 ? 2008? 2011 teridian semiconductor corporation v1. 2 6.4.3 battery monitor table 93 : battery monitor performance specifications ( temp_bat = 1 ) parameter condition min typ max unit bv: battery voltage (definition) msn mode, temp_pwr = 1 brn mode, temp_pwr = temp_bsel ?? = 3 . 3 ? + ( ?????? ? 142 ) ? 0 . 0246 ? + ????? ? 297 ?? ?? = 3 . 291? + ( ?????? ? 142 ) ? 0 . 0255? + ????? ? 328 ?? v measurement error ? ? ? ? ? ? ? ? vbat bv vbat = 2.0 v 2.5 v 3 .0 v 4.0 v - 7.5 -5 -3 -3 7.5 5 3 5 % % % % input impedance in continuous measurement, msn mode. v (vbat_rtc)/i(vbat_rtc) v3p3 = 3.3 v , temp_bsel = 0, temp_per = 111, vbat_rtc = 3.6 v , 1 m? load applied with bcurr ibat( bcurr =1) - ibat( bcurr =0) v3p3 = 3.3 v 5 0 100 1 4 0 a 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 137 6.4.4 temperature monitor table 94: temperature monitor parameter condition min typ max unit temperature measurement equation for 71m6543f and 71M6543G (see note s 2 and 4) in msn, temp_pwr =1: ???? = 0 . 325 ? ????? + 22 in brn, temp_pwr = temp_bsel : ???? = 0 . 325 ? ????? + 0 . 00218 ? ?????? 2 ? 0 . 609 ? ?????? + 64 . 4 c temperature measurement equation for 71m6543h and 71M6543Gh (see note s 3 and 4) in msn, temp_pwr =1: if stemp 0: ???? = 0 . 325 ? ????? + 22 if stemp > 0: ???? = 63 ? ????? ???? _ 85 + 22 in brn, temp_pwr = temp_bsel : if stemp 0: ???? = 0 . 325 ? ????? + 0 . 00218 ? ?????? 2 ? 0 . 609 ? ?????? + 64. 4 if stemp > 0: ???? = 63 ? ????? ???? _ 85 + 0 . 00218 ? ?????? 2 ? 0 . 609 ? ?????? + 64 . 4 temperature error (71m6543) (see note 1) t a = 22 ? c -2 2 c vbat_rtc charge per measurement temp_ bsel = 0, temp_p wr =0, slp mode, vbat_rtc = 3.6 v 16 c duration of temperature measurement after setting temp_start (see note 1) 15 60 ms note s : 1. guaranteed by design; not production tested. 2. for the 71m6543f and 71M6543G, temp_85 fuses read 0. 3. for the 71m6543h and 71M6543Gh, temp_85 fuses 0. 4. the coefficients provided in these equations are typical. 71m6543f/h and 71M6543G/gh data sheet 138 ? 2008? 2011 teridian semiconductor corporation v1. 2 6.4.5 s upply c urrent the supply currents provided in table 95 below include only the current consumed by the 71m6543. refer to the 71m6xxx data sheet for additional current required when using a 71m6x03 remote sensor. table 95 : supply current performance specifications parameter condition device min typ max unit i1: v3p3a + v3p3sys current, normal operation polyphase : 4 currents, 3 voltages v3p3a = v3p3sys = 3.3 v, mpu_div [2:0] = 3 (614 khz mpu clock), no flash memory write, rtm_e =0, pre_e =0, ce_e =1, adc_e =1, adc_div =0, mux_div[3:0] =7, fir_len[1:0] =1, pll_fast =1 71m6543f/h 7.2 8.5 ma 71M6543G/gh 7.5 8.8 i1a: v3p3a + v3p3sys current, adc half rate ( adc_div=1 ) same as i1, except adc_div =1, fir_len =0 71m6543f/h 6.4 7.3 ma 71M6543G/gh 6.7 7.7 i1b: v3p3a + v3p3sys current, normal operation pll_fast =0 same as i1, except pll_fast =0 71m6543f/h 2.9 3.8 ma 71M6543G/gh 3.0 3.9 i1c: v3p3a + v3p3sys current, normal operation pre_e =1 same as i1, except pre_e =1 71m6543f/h 7.3 8.7 ma 71M6543G/gh 7.7 9.1 i1d: v3p3a + v3p3sys current, normal operation pre_e =1, adc_div =1, fir_len =0. (see note 1) same as i1, except pre_e =1, adc_div =1, fir_len =0. 71m6543f/h 6.5 7.5 ma 71M6543G/gh 6.9 7.9 i1e: v3p3a + v3p3sys current, normal operation pll_fast =0, pre_e =1. (see note 1) same as i1, except pre_e =1, pll_fast =0. 71m6543f/h 3.0 3.9 ma 71M6543G/gh 3.1 3.9 i2: v3p3a + v3p3sys dynamic current same as i1, except with varia tion of mpu_div[2:0] . 4.3 i - i 3 mpu_div 0 mpu_div = = 71m6543f/h 0.4 0.6 ma/ mhz 71M6543G/gh 0.5 0.65 vbat current i3: msn mode i4: brn mode i5: lcd mode (ext. vlcd) i6: lcd mode (boost, dac) i7: lcd mode (dac) i8: lcd mode (vbat) i9: slp mode ce_e =0 lcd_vmode[1:0] =3, also see note 3 lcd_vmode[1:0] =2, also see notes 1, 2 lcd_vmode[1:0] =1, also see notes 1, 2 lcd_vmode[1:0] =0, also see notes 1, 2 slp mode 71m6543 71m6543f/h 71M6543G/gh 71m6543 71m6543 71m6543 71m6543 71m6543 - 300 - 300 0 2.4 2.6 0.4 24 3.0 1.1 0 300 3.2 3.5 108 36 11 3.4 +300 na ma ma na a a a na vbat_rtc current i10: msn i11: brn i12: lcd mode i13: slp mode i14: slp mode (see note 1) lcd_vmode[1:0] =2, also see note 3 t a 25 c t a = 85 c 71m6543 71m6543f/g 71M6543G/gh 71m6543 71m6543 71m6543 - 300 0 240 260 1.8 0.7 1.5 300 410 420 4.1 1.7 3.2 na na na a a a i15: v3p3a + v3p3sys current, write flash with ice same as i1, except write flash at maximum rate, ce_e =0, adc_e =0. 71m6543f/g 7.1 8.7 ma 71M6543G/gh 7.3 8.7 notes: 1. guaranteed by design; not production tested. 2. lcd_dac[4:0] =5 (2.9v), lcd_clk[1:0] =2, lcd_mode[2:0] =6, all lcd_mapn bits = 0. 3. lcd_dac[4:0] =5 (2.9v), lcd_clk[1:0] =2, lcd_mode[2:0] =6, lcd_blank =0, lcd_on =1, all lcd_mapn bits = 1 and vlcd pin = 3.3v. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 139 6.4.6 v3p3d s witch table 96 : v3p3d switch performance specifications p arameter c ondition min t yp max unit on resistance ? v3p3sys to v3p3d | i v3p3d | 1 ma 10 on resistance ? vbat to v3p3d | i v3p3d | 1 ma , vbat>2.5v 10 v3p3d i oh , msn v3p3sys = 3v v3p3d = 2.9v 10 ma v3p3d i oh , brn vbat = 2.6v v3p3d = 2.5v 10 ma 6.4.7 internal power fault comparators table 97 : internal power fault comparators performance specifications p arameter condition min t yp max unit overall r esponse time 100mv overdrive, falling 100mv overdrive, rising 20 200 200 s s falling threshold 3.0 v comparator 2.8 v comparator difference 3.0v and 2.8v comparators v3p3 falling 2.8 3 2.75 5 0 2.93 2.81 136 3.03 2.87 220 v v mv falling threshold 2.25 v comparator 2.0 v comparator vdd (@vbat=3.0v) ? 2.25v comparator difference 2.25v and 2.0v comparators vdd falling 2. 2 1.9 0 0.25 0.15 2.25 2.00 0.35 0.25 2.5 2. 2 0 0.45 0.35 v v v v hysteresis, (r ising threshold - f alling thre shold ) 3.0 v comparator 2.8 v comparator 2.25 v comparator 2.0 v comparator t a = 22 c 22 25 10 10 45 42 33 28 65 60 60 60 mv mv mv mv 6.4.8 2.5 v v oltage r egulator ? system power table 98 : 2.5 v voltage regulator performance specifications p arameter c ondition min t yp max unit v2p5 v3p3 = 3.0 v - 3.8 v i load = 0 ma 2. 55 2. 6 5 2.7 5 v v2p5 load regulation v3p3 = 3.3 v i load = 0 ma to 5 ma 40 mv voltage overhead v3p3 sys - v2p5 i load = 5 ma, reduce v3p3d until v2p5 drops 200 mv 440 mv 71m6543f/h and 71M6543G/gh data sheet 140 ? 2008? 2011 teridian semiconductor corporation v1. 2 6.4.9 2.5 v v oltage r egulator ? battery power table 99 : low - power voltage regulator performance specifications p arameter c ondition min t yp max unit v2p5 vbat = 3.0 v - 3.8 v, v3p3 = 0 v, i load = 0 ma 2. 55 2. 6 5 2.7 5 v v2p5 load regulation vbat = 3.3 v, v3p3 = 0 v, i load = 0 ma to 1 ma 4 0 mv voltage overhead 2v ? vbat - vdd i load = 0 ma, vbat = 2.0 v , v3p3 = 0 v. 200 mv 6.4.10 c rystal o scillator table 100 : crystal oscillator performance specifications p arameter c ondition min t yp max unit maximum output power to crystal crystal connected , see note 1 1 w xin to xout capacitance (see note 1) 3 pf capacitance change on xout rtc_adj = 7f to 0, bias voltage = unbiased vpp = 0.1 v 15 pf note: 1. guaranteed by design; not production tested. 6.4.11 phase - locked loop ( pll ) table 101 : pll performance specifications parameter condition min typ max unit pll power -up settling time pll_fast =0, v3p3 = 0 to 3.3 v step measured from first edge of mck (tmux2out pin) 3 ms pll_fast settling time pll_fast rise pll_fast fall v3p3=0, vbat=3.8 to 2.0 v 3 3 ms ms pll slp to msn settling time pll_fast =0 3 ms 6.4.12 lcd d rivers table 102 : lcd drivers performance specifications parameter condition min typ max unit vlcd current vlcd=3.3, all lcd map bits=0 vlcd=5.0, all lcd map bits=0 2 3 ua ua note: 1. these specifications apply to all com and seg pins. 1. lcd_vmode =3, lcd_on =1, lcd_blank =0, lcd_mode =6, lcd_clk =2. 2. output load is 74 pf per seg and com pin. 6.4.13 vlcd generator table 103 : vlcd generator specifications 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 141 parameter condition min typ max unit vsys to vlcd switch impeda nce v3p3 = 3.3 v , rvlcd=removed, lcd_bat =0, lcd_vmode [1:0] =0, ?ilcd=10 a 750 ? vbat to vlcd switch impeda nce v3p3 = 0 v , vbat = 2.5 v , rvlcd =removed, lcd_bat =1, lcd_vmode [1:0] =0, ?ilcd=10 a 700 ? lcd boost frequenc y lcd_vmode [1:0] = 2 , rvlcd = removed, cvlcd = removed pll_fast =1 pll_fast =0 820 786 khz khz vlcd ioh current (vlcd(0) - vlcd(ioh)<0.25) lcd_vmode [1:0] = 2 , lcd_clk[1:0] = 2, rvlcd = removed, v3p3 = 3.3 v , lcd_dac [4:0] = 1f 10 a from lcdadj0 and lcdadj12 fuses: ?????? ( ??? _ ??? ) = 5 ?? ? ?????? 0 + ?????? 12 ? ?????? 0 12 ??? _ ??? ? ???? ??? ( ??? _ ??? ) = 2 . 65 + 2 . 65 ??? _ ??? 31 + ?????? ( ??? _ ??? ) the above equations describe the nominal value of vlcd for a specific lcd_dac value. the specifications below list the maximum deviation between actual vlcd and vlcdnom. note that when vcc and boost are insufficient, the lcd dac will not reach its target value and a large negative error will occur. lcd_dac error . vlcd - vlcdnom full scale , with boost v3p3 =3.6 v v3p3 =3.0 v vbat=4.0 v , v3p3=0, brn mode vbat=2.5 v , v3p3=0, brn mode lcd_vmode = 10 , lcd_dac [4:0] = 1f , lcd_clk[1:0] =2, lcd_mode[2:0] =6 - 0.15 - 0. 4 - 0.15 - 1 .3 0.15 0.15 0.15 v v v v lcd_dac error . vlcd - vlcdnom dac=12 , with boost v3p3 = 3.6 v v3p3 = 3.0 v vbat = 2.5 v , v3p3 = 0 v , brn mode lcd_vmode = 10 , lcd_dac [4:0] = c , lcd_clk[1:0] =2, lcd_mode[2:0] =6 - 0.15 - 0.15 - 0.15 0.15 0.15 0.15 v v v lcd_dac error. vlcd - vlcdnom zero scale, with boost v3p3 = 3.6 v v3p3 = 3.0 v vbat = 4.0 v , v3p3 = 0 v , brn mode vbat = 2.5 v , v3p3 = 0 v , brn mode lcd_vmode = 2 , lcd_dac [4:0] =0 , lcd_clk[1:0] =2, lcd_mode[2:0] =6 - 0.15 - 0.15 - 0.15 - 0.15 0.15 0.15 0.15 0.15 v v v v lcd_dac error . vlcd - vlcdnom full scale, no boost v3p3 = 3.6 v (see note 1) v3p3 = 3.0 v (see note 1) vbat = 4.0 v , v3p3 = 0 v , brn mode vbat = 2.5 v , v3p3 = 0 v , brn mode lcd_vmode = 1 , lcd_dac [4:0] = 1f , lcd_clk[1:0] =2, lcd_mode[2:0] =6 - 2.1 - 2.8 - 1.8 - 3.2 v v v v lcd_dac error . vlcd - vlcdnom dac=12 , no boost v3p3 = 3.6 v v3p3 = 3.0 v vbat = 4.0 v , v3p3 = 0 v , brn mode vbat = 2.5 v , v3p3 = 0 v , brn mode lcd_vmode = 1 , lcd_dac [4:0] = c , lcd_clk[1:0] =2, lcd_mode[2:0] =6 - 0 .5 - 1.1 - 0.15 1 - 1.5 1 0.15 1 v v v v 71m6543f/h and 71M6543G/gh data sheet 142 ? 2008? 2011 teridian semiconductor corporation v1. 2 parameter condition min typ max unit lcd_dac error. vlcd - vlcdnom zero scale, no boost v3p3 = 3.6 v v3p3 = 3.0 v vbat = 4.0 v , v3p3 = 0 v , brn mode vbat = 2.5 v , v3p3 = 0 v , brn mode lcd_vmode = 01 , lcd_dac [4:0] = 0 , lcd_clk[1:0] =2, lcd_mode[2:0] =6 - 0.15 - 0.15 - 0.15 - 0.45 0.15 0.15 0.15 0.15 v v v v lcd_dac error. vlcd - vlcdnom full scale, with boost, lcd mode vbat = 4.0 v , v3p3 = 0 v vbat = 2.5 v , v3p3 = 0 v lcd_vmode = 1 , lcd_dac [4:0] = 1f , lcd_clk[1:0] =2, lcd_mode[2:0] =6 - 0.15 - 1 .3 0.15 v v note: 1. guaranteed by design; not production tested. 2. the following test condition s also apply to all parameters provided in this table: b ypass capacitor cvlcd 0.1 f, test load rvlcd = 500 k , no display, all segdio pins configured as dio. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 143 6.4.14 71m6543 vref table 104 shows the perfor mance specifications for the 71m6543 adc reference voltage ( vref ) . table 104: 71m6543 vref performance specifications p arameter c ondition min t yp max unit vref output voltage, vref(22 ) t a = 22 oc 1.193 1.195 1.197 v vref output voltage, vref(22 ) pll_fast =0 1.195 v vref chop step , trimmed vref(chop=01) ? vref(chop=10) -10 10 mv vref power supply sensitivity vref / v3p3a v3p3a = 3.0 to 3.6 v - 1.5 1.5 mv/v vref input impedance vref_dis = 1 , vref = 1.3 v to 1.7 v 100 k vref output impedance vref_c al = 1, i load = 10 a, - 10 a 3.2 k vnom definition (see note 2 ) 2 ) 22 ( 1 ) 22 ( ) 22 ( ) ( 2 tc t tc t vref t vnom ? + ? + = v if temperature characterization trim information is available (71m654 3h and 71M6543Gh , 0.1% ) vnom temperature coefficients : tc1 = tc2 = 35. 091+ 0 . 01764 ?trimt + 1 . 587? ( trimbgb ? trimbgd ) ? 0 . 557 ? 2 . 8 ? 10 ? 4 ? ????? v/ c v/ c 2 vref(t) deviation from vnom(t) (see note 1) : 62 10 ) ( ) ( ) ( 6 t vnom t vnom t vref ? -10 +10 ppm / c if temperature characterization trim information is not available (71m654 3 f and 71M6543G , 0.5% ) vnom temperature coefficients : tc1 = tc2 = trimt ? ? 95 . 4 275 trimt ? + ? 00028 . 0 557 . 0 v/ c v /c 2 vref(t) deviation from vnom(t) (see note 1) : 62 10 ) ( ) ( ) ( 6 t vnom t vnom t vref ? -40 +40 ppm / c vref aging 25 ppm / year notes: 1. guaranteed by design; not production tested. 2. this relationship describes the nominal behavior of vref at different temperatures, as governed by a second order polynomial of 1 st and 2 nd order coefficients tc1 and tc2. 3. for the parameters in this table, u nless otherwise specified, vref_dis = 0 , pll_fast =1 71m6543f/h and 71M6543G/gh data sheet 144 ? 2008? 2011 teridian semiconductor corporation v1. 2 6.4.15 adc converter table 105 : adc converter performance specifications p arameter c ondition min t yp max unit recommended input range (vin - v3p3a ) - 250 250 mv peak voltage to current crosstalk ) cos( * 10 6 vcrosstalk vin vin vcrosstalk ? (see note 1) vin = 200 mv peak, 65 hz, on vadc8 (va) or vadc9 (vb) or vadc10 (vc) . vcrosstalk = largest mea surement on iadc0 -1 or iadc2 - 3 or iadc4 - 5 or iadc6 - 7 -10 10 v/v input impedance , no pre - amp vin= 65 hz 40 90 k a dc gain error vs %power supply variation 3 . 3 / 3 3 100 / 357 10 6 a p v v nv nout in pk ? ? vin=200 mv pk, 65 hz v3p3a=3.0 v, 3.6 v 50 ppm / % input offset iadc0=iadc1=v3p3a iadc0=v3p3a diff0_e =1, pre_e =0 diff0_e =0 , pre_e =0 -10 -10 10 10 mv mv thd @ 250mvpk name fir_len adc_div pll_fast mux_div a 0 0 0 3 b 1 0 0 2 c 0 0 1 11 d 1 0 1 6 e 2 0 1 4 f 0 1 0 2 g 0 1 1 6 h 1 1 1 3 j 2 1 1 2 v in = 65hz, 250mvpk, 64kpts fft, blackman harris window . a b - 82 c d - 84 e f - 83 g h - 86 j a -75 b - 75 c - 75 d - 75 e -75 f - 75 g - 75 h - 75 j -75 db thd @ 20mvpk name fir_len adc_div pll_fast mux_div a 0 0 0 3 b 1 0 0 2 c 0 0 1 11 d 1 0 1 6 e 2 0 1 4 f 0 1 0 2 g 0 1 1 6 h 1 1 1 3 j 2 1 1 2 v in = 65hz, 20mvpk, 64kpts fft, blackman harris window . a - 85 b - 91 c -85 d - 91 e - 93 f - 85 g -85 h - 91 j - 93 db lsb size : name fir_len adc_div pll_fast mux_div a 0 0 0 3 b 1 0 0 2 c 0 0 1 11 d 1 0 1 6 e 2 0 1 4 f 0 1 0 2 g 0 1 1 6 h 1 1 1 3 j 2 1 1 2 vin=65hz, 20mvpk, 64kpts fft, blackman - harris window a 3470 b 406 c 3040 d 357 e 151 f 3470 g 3040 h 357 j 151 nv digital full - scale: name fir_len adc_div pll_fast mux_div a 0 0 0 3 b 1 0 0 2 c 0 0 1 11 d 1 0 1 6 e 2 0 1 4 f 0 1 0 2 g 0 1 1 6 h 1 1 1 3 j 2 1 1 2 a: 91125 b: 778688 c: 103823 d: 884736 e: 2097152 f: 91125 g: 103823 h: 884736 j: 2097152 lsb 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 145 p arameter c ondition min t yp max unit note: 1. guaranteed by design; not production tested. 2. unless stated otherwis e, t he following test conditions apply to all the parameters provided in this table: fir_len[1:0] =1, vref_dis =0, pll_fast =1, adc_div =0, mux_div =6, lsb values do not include the 9 - bit left shift at ce input. 6.4.16 pre - amplifier for iadc0 - iadc1 table 106 : pre - amplifier performance specifications parameter condition min typ max unit differential gain vin=30mv differential vin=15mv differential (see note 1) t a = 5 ? c, v3p3=3.3 v, pre_e =1, fir_len =2, diff0 _e =1, 2520hz sample rate 7.8 7.8 7.92 7.92 8.0 8.0 v/v v/v gain variation vs v3p3 vin=30mv differential (see note 1) v3p3 = 2.97 v, 3.63 v - 100 100 ppm/% gain variation vs temp vin=30mv differential (see note 1) t a = -40? c, 85 ? c 10 -25 -80 ppm/c phase shift, vin=30mv differential (see note 1) t a = 25 ? c, v3p3=3.3 v -6 6 mo preamp input current iadc0 iadc1 pre_e =1, fir_len =10, diff0_e =1 2520hz sample rate, iadc0=iadc1=v3p3 4 4 9 9 16 16 ua ua preamp+adc thd vin=30mv differential vin=15mv differential t a = 25 ? c, v3p3=3.3 v , pre_e =1, fir_len = 2 , diff0 _e =1, 2520hz sample rate. -82 -86 db db preamp offset iadc0=iadc1=v3p3+30mv iadc0=iadc1= v3p3+15mv iadc0=iadc1= v3p3 iadc0=iadc1= v3p3 - 15mv iadc0=iadc1= v3p3 - 30mv t a = 25 ? c, v3p3=3.3 v, pre_e =1, fir_len =10, diff0 _e =1, 2520hz sample rate - 0.63 - 0.57 - 0.56 - 0.56 - 0.55 mv mv mv mv mv note: 1. guaranteed by design; not production tested. 71m6543f/h and 71M6543G/gh data sheet 146 ? 2008? 2011 teridian semiconductor corporation v1. 2 6.5 t iming s pecifications 6.5.1 flash memory table 107: flash memory timing specifications p arameter c ondition min t yp max unit flash write cycles - 40 c to +85 c 20,000 cycles flash data retention 25 c 85 c 100 10 years flash byte writes between page or mass erase operations 2 cycles write time per byte 21 s page erase (1024 bytes) 21 ms mass erase 21 ms 6.5.2 spi slave table 108 . spi slave timing specifications parameter condition min typ max unit spi setup time spi_di to spi_ck rise 10 ns spi hold time spi_ck rise to spi_di 10 ns spi output delay spi_ck fall to spi_d0 40 ns spi recovery time spi_csz fall to spi_ck 10 ns spi removal time spi_ck to spi_csz rise 15 ns spi clock high 40 ns spi clock low 40 ns spi clock freq spi freq/mpu freq 2.0 mhz/mhz spi transaction space spi_csz rise to spi_csz fall 4.5 mpu cycles 6.5.3 eeprom i nterface table 109 : eeprom interface timing p arameter c ondition min t yp max unit write clock frequency (i 2 c) ckmpu = 4.9 mhz, using interrupts 310 khz ckmpu = 4.9 mhz, bit - banging dio2/3 pll_fast = 0 100 khz write clock frequency (3 - wire) ckmpu = 4.9 mhz pll_fast = 0 pll_fast = 1 160 500 khz 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 147 6.5.4 reset pin table 110 : reset pin timing p arameter c ondition min t yp max unit reset pulse width 5 s reset pulse fall time (see note 1) 1 s note: 1. guaranteed by design; not production tested. 6.5.5 r eal - time clock (rtc) table 111 : rtc range for date p arameter c ondition min t yp max unit range for date 2000 ? 2255 year 71m6543f/h and 71M6543G/gh data sheet 148 ? 2008? 2011 teridian semiconductor corporation v1. 2 6.6 100- pin lqfp p ackage outline drawing controlling dimensions are in mm. figure 42 : 100- pin lqfp package outline 1 15.7(0.618) 16.3(0.641) 15.7(0.618) 16.3(0.641) top view max. 1.600 0.50 typ. 14.000 +/- 0.200 0.225 +/- 0.045 0.60 typ> 1.50 +/- 0.10 0.10 +/- 0.10 side view 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 149 6.7 71m6543 pinout 1 teridian 71m6543f 71m 6543h 71M6543G 71M6543Gh 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 91 92 93 94 95 96 97 98 99 100 26 27 28 29 30 51 52 53 54 55 56 57 58 59 60 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 segdio17 tmuxout/seg47 spi_di/segdio38 tx v3p3d segdio1/vpulse segdio3/sdata spi_csz/segdio36 v3p3sys com1 com2 com3 com0 segdio45 nc xin gndd vbat ice_e segdio52 opt_tx/segdio51 vadc9 vadc10 v3p3a gnda vadc8 pb vlcd test opt_rx/segdio55 iadc5 xout iadc0 iadc3 iadc4 iadc1 iadc2 iadc6 segdio27/com4 iadc7 spi_do/segdio37 segdio26/com5 segdio25 segdio24 segdio23 segdio22 segdio21 segdio20 segdio19 segdio35 segdio33 segdio32 segdio30 segdio29 segdio31 segdio28 segdio34 segdio18 gnda vbat_rtc e_rxtx/seg48 e_tclk/seg49 e_rst/seg50 rx segdio53 reset tmux2out/seg46 segdio44 segdio43 segdio42 segdio41 segdio40 spi_cki/segdio39 segdio16 segdio15 segdio14 segdio13 segdio10 segdio11 segdio12 segdio9 segdio8/di segdio7/ypulse segdio6/xpulse segdio5 segdio4 segdio2/sdck segdio0/wpulse segdio54 vref nc nc nc nc vdd nc nc nc nc nc figure 43 : pinout for the l qf p-100 package 71m6543f/h and 71M6543G/gh data sheet 150 ? 2008? 2011 teridian semiconductor corporation v1. 2 6.8 71m6543 pin d escriptions 6.8.1 71m6543 power and ground pins pin types: p = power, o = output, i = input, i/o = input/output. the circuit number denotes the equivalent circuit, as specified under section 6.8.4 i/o equivalent circuits . table 112: 71m6543 power and ground pins pin name type circuit function 72, 80 gnda p ? analog g round . this pin should be connected directly to the ground plane. 62 gndd p ? digital ground . this pin should be connected directly to the ground plane. 85 v3p3a p ? analog power supply . a 3.3 v power supply should be connected to this pin. v3p3a must be the same voltage as v3p3sys. 69 v3p3sys p ? system 3.3 v s upply. this pin should be connected to a 3.3 v power supply. 61 v3p3d o 13 auxiliary v oltage o utput of the c hip. in mission mode, this pin is con nected to v3p3sys by the internal selection switch. in brn mode, it is internally connected to vbat. v3p3d is floating in lcd and sleep mode. a bypass capacitor to ground should not exceed 0.1 f. 60 vdd o ? output of the 2.5 v regula tor. this pin is powered in msn and brn modes. a 0.1 f bypass capacitor to ground should be connected to this pin. 89 vlcd o ? output of the lcd dac. a 0.1 f bypass capacitor to ground should be connected to this pin. 70 vbat p 12 battery backup pin to support the battery modes (brn, lcd). a battery or super capacitor is to be connected between vbat and gndd. if no battery is used, connect vbat to v3p3sys. 71 vbat_rtc p 12 rtc and oscillator power supply. a battery or super - capacitor is to be connected between vbat and gndd. if no battery is used, connect vbat_rtc to v3p3sys. 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 151 6.8.2 71m6543 analog pins pin types: p = power, o = output , i = input, i/o = input/output . the circuit number denotes the equivalent circuit, as specified in section 6.8.4 . table 113: 71m6543 analog pins pin name type circuit function 87 86 iadc0 iadc1 i 6 differential or single - ended analog line current sense inputs. these pins are voltage inputs to the internal a/d converter. typically, they are connected to the outputs of current sensors. unused pins must be connect ed to v3p3a . when configured as differe ntial inputs (i.e., by setting the diffx_e control bits, where x = 0, 2, 4, 6) p in s are paired to form differential inputs pairs: iadc0 - iadc1, i adc2 - i adc3 , i adc4 - i adc5 , and iadc6 - iadc7. iadc2 - iadc3, iadc4 - iadc5, and iadc6 - iadc7 can be configured for commu nication with the 71m6xx3 remote isolated sensor interface (i.e., by setting the rmtx_e control bits, where x = 2, 4, 6). when configured as remote sensor interfaces, these pins form balanced digital pairs for bidirectional digital communications with a 71 m6xx3 remote isolated sensor. 68 67 iadc2 iadc3 66 65 iadc4 iadc5 64 63 iadc6 iadc7 84 vadc8 (va) i 6 line voltage sense inputs. these pins are voltage inputs to the internal a/d converter. typically, they are connected to the outputs of resistor dividers. unused pins must be connected to v3p3a. 83 vadc9 (vb) 82 vadc10 ( vc ) 88 vref o 9 voltage reference for the adc. this pin should be left unconnected (floating). 75 xin i 8 crystal inputs. a 32 khz crystal should be connected across these pins. typically, a 15 pf capacitor is also connected from xin to gnda and a 10 pf capacitor is connected from xout to gnda. it is important to minimize the capacitance between these pins. see the crystal manufacturer data sheet for details. if an external clock is used, a 150 mv (p - p) clock signal should be applied to xin, and xout should be left un connected. 76 xout o 71m6543f/h and 71M6543G/gh data sheet 152 ? 2008? 2011 teridian semiconductor corporation v1. 2 6.8.3 71m6543 digital pins pin types: p = power, o = output, i = input, i/o = input/output, n/c = no connect. the circuit number denotes the equivalent circuit, as specified in section 6.8.4 . table 114: 71m6543 digital pins pin name type circuit function 12? 15 com 0 ? com 3 o 5 lcd common outputs . these four pins provide the select signals for the lcd display. 45 segdio0/wpulse i/o 3, 4, 5 multiple - use pins. c onfigurable as either lcd segment driver or dio. alternative functions with proper selection of associated i/o ram registers are: segdio0 = wpulse (45) segdio1 = vpulse (44) segdio2 = sdck (43) segdio3 = sdata (42) segdio6 = xpulse (38) segdio7 = ypulse (37) segdio8 = di (36) unused pins must be configured as outputs or terminated to v3p3/gndd. 44 segdio1/vpulse 43 segdio2/sdck 42 segdio3/sdata 41 segdio4 39 segdio5 38 segdio6/xpulse 37 segdio7/ypulse 36 segdio8/di 35? 27 segdio[9:17] 25? 18 segdio[18:25] 11? 4 segdio[28:35] 99? 94 segdio[40:45] 52 segdio52 51 segdio53 47 segdio54 17 segdio26/com5 i/o 3, 4, 5 multiple - use pins. c onfigurable as either lcd segment driver or dio with alternative function (lcd common drivers). 16 segdio27/com4 3 spi_csz/segdio36 i/o 3, 4, 5 multiple - use pins. configurable as either lcd segment driver or dio with alternative function (spi interface). 2 spi_do/segdio37 1 spi_di/segdio38 100 spi_cki/segdio39 53 opt_tx/segdio51 i/o 3, 4, 5 multiple - use pins, configurable as either lcd segment driver or dio with alternative function (optical port/uart1) 46 opt_rx/segdio55 58 e_rxtx/seg48 i/o 1, 4, 5 multiuse p ins . c onfigurable as either emulator port pins (when ice_e pulled high) or lcd segment drivers (when ice_e tied to gnd). 56 e_rst/seg50 57 e_tclk/seg49 o 4, 5 59 ice_e i 2 ice e nable. when zero, e_rst, e_tclk, and e_rxtx become seg50, seg49, and seg48 respectively. for production units, this pin should be pulled to gnd to disable the emulator port. 92 tmuxout/seg47 o 4, 5 multi ple -u se pin s. c onfigurable as either multiplexer/clock output or lcd segment driver using the i/o ram registers . 93 tmux2out/seg46 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 153 pin name type circuit function 91 reset i 2 chip r eset . this input pin is used to reset the chip into a known state. for normal operation, this pin is pulled low. to reset the chip, this pin should be pulled high. this pin has an internal 30 a (nominal) current source pulldown . no external reset circuitry is necessary. 55 rx i 3 uart0 i nput. if this pin is unused it must be terminated to v3p3d or gndd. 54 tx o 4 uart 0 o utput 81 test i 7 enables production test . this pin must be grounded in normal operation. 90 pb i 3 pushbutton i nput. this pin must be at gndd when not active or unused. a rising edge sets the wf _pb flag. it also causes the part to wake up if it is in slp or lcd mode. pb does not have an internal pullup or pulldown resistor . 26, 40, 48, 49, 50, 73, 74, 77, 78, 79 nc n/c ? no connection. do not connect this pin . 71m6543f/h and 71M6543G/gh data sheet 154 ? 2008? 2011 teridian semiconductor corporation v1. 2 6.8.4 i/o equivalent circuits figure 44: i/o equivalent circuits oscillator equivalent circuit type 8: oscillator i/o digital input equivalent circuit type 1: standard digital input or pin configured as dio input with internal pull-up gndd 110k v3p3d cmos input v3p3d digital input pin digital input type 2: pin configured as dio input with internal pull-down gndd 110k gndd cmos input v3p3d digital input pin digital input type 3: standard digital input or pin configured as dio input gndd cmos input v3p3d digital input pin cmos output gndd v3p3d gndd v3p3d digital output equivalent circuit type 4: standard digital output or pin configured as dio output digital output pin lcd output equivalent circuit type 5: lcd seg or pin configured as lcd seg lcd driver gndd lcd seg output pin to mux gnda v3p3a analog input equivalent circuit type 6 : adc input analog input pin comparator input equivalent circuit type 7: comparator input gnda v3p3a to comparator comparator input pin to oscillator gndd oscillator pin vref equivalent circuit type 9: vref from internal reference gnda v3p3a vref pin v2p5 equivalent circuit type 10: v2p5 from internal reference gndd v3p3d v2p5 pin vlcd equivalent circuit type 11: vlcd power gndd lcd drivers vlcd pin vbat equivalent circuit type 12: vbat power gndd power down circuits vbat pin v3p3d equivalent circuit type 13: v3p3d from v3p3sys v3p3d pin from vbat 10 40 71m6543f/h and 71M6543G/gh data sheet v1. 2 ? 2008 ? 2011 teridian semiconductor corporation 155 7 o rdering i nformation 7.1 71m6543 ordering guide r efer to the 71m6xxx d ata s heet for the 71m6xx3 ordering guide information. table 115 . 71m6543 ordering guide part p art description (package, a ccuracy) flash size (kb) packaging order number package marking 71m654 3 f 100- pin lqfp lead (pb) - free, 0.5 % 64 bulk 71m654 3 f - igt/f 71m654 3 f - igt 71m654 3 f 100- pin lqfp lead (pb) - free, 0.5 % 64 tape and reel 71m6543f - igtr/f 7 1m654 3 f - igt 71m6543h * 100- pin lqfp lead (pb) - free, 0.1% 64 bulk 71m6543h - igt/f 71m654 3h - igt 71m654 3h * 100- pin lqfp lead (pb) - free, 0.1 % 64 tape and reel 71m654 3h - igtr/f 71m654 3h - igt 71m6543 g 100- pin lqfp lead(pb) - free, 0.5 % 128 bulk 71M6543G - igt/f 71m654 3 g - igt 71m654 3 g 100- pin lqfp le ad(pb) - free, 0.5 % 128 tape and reel 71M6543G - igtr/f 7 1m654 3 g - igt 71m6543 g h * 100- pin lqfp lead (pb) - free, 0.1% 128 bulk 71M6543Gh - igt/f 71m654 3 g h - igt 71m654 3 g h * 100- pin lqfp lead(pb) - free, 0.1 % 128 tape and reel 71m654 3 g h - igtr/f 71m654 3 g h - igt see 4.5.1 distinction between standard and high - precision parts (page 89). * future product ? contact factory for availability. 8 related information the following documents related to the 71m6543 and 71m6xx3 are available from teridian semiconductor corporation: ? 71m6543 f/h and 71M6543G/gh data sheet ( this document) ? 71m6xxx data sheet ? 71m654 x software user?s guide (sug) ? 71m6543 demo board user?s manual (dbum) 9 contact information for technical support or more information about maxim products , contact technical support at www.maxim - ic.com/support . 71m6543f/h and 71M6543G/gh data sheet 156 ? 2008? 2011 teridian semiconductor corporation v1. 2 a ppendix a: acronyms afe analog front - end amr automatic meter reading ansi american national standards institute ce compute engine dio digital i /o dsp digital signal processor fir finite impulse response i 2 c inter - ic bus ice in - circuit emulator iec international electrotechnical commission mpu mi croprocessor unit (cpu) pll phase -l ocked l oop rms root mean square sfr special function register so c system -on- chip spi serial peripheral interface tou time of use uart universal asynchronous receiver/transmitter 71m6543f/h and 71M6543G/gh data sheet maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a maxim product. no cir cuit patent licenses are implied. maxim reserves the right to change the circuitry and specifications without notice at any time. maxim integrated products, 120 san gabriel drive, sunnyvale, ca 94086 408 - 737 - 7600 ? 20 11 maxim integrated products maxim is a registered trademark of maxim integrated products. appendix b : revision history revision number revision date description pages changed 1.0 1/1 1 initial release ? 1.1 3/11 added the 71M6543G, 71M6543Gh all 1.2 4/11 removed the 17mw typ consumption at 3.3v for sleep mode from the features section 1 |
Price & Availability of 71M6543G |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |