Description: ATT7022 power chips use an example, the code is complete, and with the simulation.
File list (Check if you may need any files):
ThreePhasePowerDetector
.......................\3phsdec.c
.......................\3phsdec.cbi
.......................\3phsdec.cci
.......................\3phsdec.cof
.......................\3phsdec.cwp
.......................\3phsdec.c~
.......................\3phsdec.fct
.......................\3phsdec.m2
.......................\3phsdec.map
.......................\3phsdec.prj
.......................\3phsdec.prj~
.......................\3phsdec.txt
.......................\AddaptReg.h
.......................\AddaptReg.hci
.......................\AddaptReg.h~
.......................\Exe
.......................\...\3phsdec.eep
.......................\...\3phsdec.hex
.......................\...\3phsdec.rom
.......................\KEY_SETUP.c
.......................\KEY_SETUP.h
.......................\KEY_SETUP.hci
.......................\KEY_SETUP.h~
.......................\Linker
.......................\......\3phsdec.a
.......................\......\3phsdec.o
.......................\......\ctype.al
.......................\......\ctype.ol
.......................\......\lcd.al
.......................\......\lcd.ol
.......................\......\math.al
.......................\......\math.ol
.......................\......\spi.al
.......................\......\spi.ol
.......................\......\SPI_AT7028.a
.......................\......\SPI_AT7028.o
.......................\......\stdio.al
.......................\......\stdio.ol
.......................\......\stdlib.al
.......................\......\stdlib.ol
.......................\......\string.al
.......................\......\string.ol
.......................\List
.......................\....\3phsdec.asm
.......................\....\3phsdec.lst
.......................\Mega16 Sheet.DSN
.......................\Obj
.......................\...\3phsdec.cof
.......................\...\3phsdec.obj
.......................\...\3phsdec.str
.......................\...\3phsdec.str1
.......................\...\3phsdec.sym
.......................\...\3phsdec.sym1
.......................\...\3phsdec.sym2
.......................\...\3phsdec.sym3
.......................\...\SPI_AT7028.str1
.......................\...\SPI_AT7028.sym1
.......................\...\SPI_AT7028.sym2
.......................\...\SPI_AT7028.sym3
.......................\Register.h
.......................\Register.hci
.......................\Register.h~
.......................\SPI_AT7028.c
.......................\SPI_AT7028.cci
.......................\SPI_AT7028.c~
.......................\SPI_AT7028.h
.......................\SPI_AT7028.hci
.......................\SPI_AT7028.h~