;Anpassung an Siemens Profiset LCD ;Ansteuerung LCD-Modul ueber SRG 4094 von 3 Portleitungen ;lcd_dat-> es 4094, RS LCD-Modul ;lcd_en -> EN-Signal zum LCD-Modul ;lcd_clk-> clk 4094 ;Ausgaenge 4094: Q1->DB0...Q8->DB7 ;Estb und EN immer auf H lcd_delay: ;Verzoegerung 4mS lcd_delay_zk: equ (f_cpu/18000)-10 if mompass=1 message "LCD Delay Zeitkonstante = 0x\{lcd_delay_zk}" endif push dph push dpl push acc mov dptr,#-lcd_delay_zk lcd_delay0: inc dptr mov a,dph orl a,dpl jnz lcd_delay0 pop acc pop dpl pop dph ret lcd_wrcom: lcd_wrcom_zk: equ f_cpu/120000 if mompass=1 message "LCD WrCom Zeitkonstante = 0x\{lcd_wrcom_zk}" endif clr c sjmp lcd_wr lcd_wrdat: setb c lcd_wr: clr lcd_en clr lcd_clk push b push acc mov b,#8 lcd_wr1: rlc a mov lcd_dat,c setb lcd_clk clr lcd_clk djnz b,lcd_wr1 rlc a mov lcd_dat,c setb lcd_en clr lcd_en mov b,#lcd_wrcom_zk lcd_loop: djnz b,lcd_loop pop acc pop b ret lcd_init: mov a,#00111000b ;8Bit,2Zeilen,5x7 pixel acall lcd_wrcom acall lcd_delay mov a,#00111000b ;8Bit,2Zeilen,5x7 pixel acall lcd_wrcom acall lcd_delay mov a,#00111000b ;8Bit,2Zeilen,5x7 pixel acall lcd_wrcom acall lcd_delay mov a,#00111011b ;8Bit,2Zeilen,5x7 pixel acall lcd_wrcom acall lcd_delay mov a,#00000100b ;Dislplay aus acall lcd_wrcom mov a,#00000001b ;Display clear acall lcd_wrcom acall lcd_delay mov a,#00000110b ;Cursor rechts bei Eintrag acall lcd_wrcom mov a,#00001110b ;Display und Cursor ein acall lcd_wrcom acall lcd_delay ret ;------------------------------------------------------------