ORG 0000H
AJMP MAIN
;//==================================================================== ORG 0040H
MAIN:
MOV SP,#60H
CALL PortInit
Display_Init:
CLR RES
LCALL Delay500
SETB RES
MOV A,#0AEH ;//display off
LCALL WrCmd
MOV A,#<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />0A2H
LCALL WrCmd ;//icon disenable
MOV A,#048H
LCALL WrCmd ;//
MOV A,#40H
LCALL WrCmd ;//set mux radtio as 128
MOV A,#2FH
LCALL WrCmd ;//use all internale power manager
MOV A,#65H
LCALL WrCmd ;//set DC-DC times as 5
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
MOV A,#0C8H ;//shl=1
LCALL WrCmd
MOV A,#0A0H ;//adc=0
LCALL WrCmd
MOV A,#44H
LCALL WrCmd ;//
MOV A,#08H
LCALL WrCmd ;//set initial com0
MOV A,#25H ;//set 1+ra/rb=10.8
LCALL WrCmd
MOV A,#81H ;//
LCALL WrCmd
MOV A,#09H
LCALL WrCmd ;//set v0=13.56V
MOV A,#055h ;//bias=1/9
LCALL WrCmd
MOV A,#0ABH
LCALL WrCmd ;//osillate start
MOV A,#92H
LCALL WrCmd ;// set frc="1" 4-frame(por),pwm=11 15-levels
MOV a,#88h
LCALL WrCmd
MOV a,#0
lcall WrCmd
MOV a,#89h
lcall WrCmd
MOV a,#0
lcall WrCmd
;//white
MOV a,#8ah
lcall WrCmd
MOV a,#0f0h
lcall WrCmd
MOV a,#8bh
lcall WrCmd
MOV a,#00h
lcall WrCmd
;//light gray
MOV a,#8ch
lcall WrCmd
MOV a,#0ffh
lcall WrCmd
MOV a,#8dh
lcall WrCmd
MOV a,#00h
lcall WrCmd
;//dark gray
MOV a,#8eh
lcall WrCmd
MOV a,#0ffh
lcall WrCmd
MOV a,#8fh
lcall WrCmd
MOV a,#0ffh
lcall WrCmd
;//black
MOV a,#0f1h
lcall WrCmd
MOV a,#0ah
lcall WrCmd ;//set t="-0".125%
MOV a,#0A6H
LCALL WrCmd ;//normal display
MOV A,#0AFH
LCALL WrCmd ;//display on
BDISALL:
MOV data1,#0FFh
MOV data2,#0FFh
lcall bwrite
lcall delay1s
MOV data1,#0h
MOV data2,#0h
lcall bwrite
lcall delay1s
LCALL GRAY3
lcall delay1s
MOV data1,#55h
MOV data2,#55h
lcall bwrite
lcall delay1s
MOV data1,#0ffh
MOV data2,#0h
LCALL bwrite
LCALL delay1s
MOV data1,#55h
MOV data2,#0aah
LCALL bwrite
LCALL delay1s
MOV data1,#0aah
MOV data2,#55h
LCALL bwrite
LCALL delay1s
LCALL dispbord
LCALL delay1s
LCALL BCLRRAM
LCALL DISPHZ8
LCALL DELAY1S
LJMP BDISALL
walnutcy_696810119 2009-8-14 18:26
用户190967 2009-8-14 17:04
用户162726 2009-2-23 00:38