先关闭比较器功能,再把IO设置为输出模式,再输出电平.mov a,08h
mov CP0C,A
mov CP1C,A ;关闭比较器功能
clr SCOMC ;关闭LCD功能
mov a,00000001B
mov ACERL,a ;PA0为AD口,其它设为普通I/O口.
mov a,11110001b
mov PAC,a
mov a,11110001b
mov PAPU,a
mov a,11110001b
mov PAWU,a
set pa
mov a,00011111b
mov PBC,a
mov a,00011111b
mov PBPU,a
mov a,00011111b
mov pb,a
mov a,00000000b
mov PCC,a
mov a,00001000b
mov PCPU,a
mov a,00001100b
mov pc,a
mov a,00000010b
mov PDC,a
mov a,00000010b
mov PDPU,a
mov a,00000011b
mov pd,a |