;***********************************************************************; ;title: Em78p458/9 comparator test program ; ;Description:比較器結(jié)果由Port60輸出,當(dāng)R3的bit7為1時(shí),輸出high pulse,當(dāng)R3的 ; ; bit7為0時(shí),輸出low pulse.比較器輸出由port57輸出與port60一樣的 ; ; 波形。 ; ;Company: ELAN MICROELECTRONICS (SZ) LTD.INC ; ;************************************************************************; include "d:\wice\inc\em78_headfile\em78p458.inc" ;include em78p458 head file ;================================================================================= dly1 == 0x30 ;delay register 1 dly2 == 0x31 ;delay register 2 ;---------------------------------------------------------- org 0 jmp start org 0x08 reti start: disi mov a,@0b00000000 contw ;set cont register bs r9,5 ; register segment mov a,@0b00000000 iow ioc51 ;set port51,52 funtion bc r9,5 ; mov a,@0b01100000 ;bit6(CE)=1,enable comparator, ;bit5(coe)=1,set comparator |