init_display movlw 0x01 movwf count_h high_cicle movlw 0xFF movwf count_m middle_cicle movlw 0xFF movwf count_l low_cicle decfsz count_l,f goto low_cicle decFsz count_m,f goto middle_cicle decfsz count_h,f goto high_cicle clrf dat call dsend call dsend movlw 0x42 movwf dat call csend clrf dat call dsend call dsend movlw 0x24 movwf dat call csend movlw 0x1E movwf dat call dsend clrf dat call dsend movlw 0x43 movwf dat call csend clrf dat call dsend call dsend movlw 0x42 movwf dat call csend movlw 0x98 movwf dat call csend movlw 0x80 movwf dat call csend clrf dat call dsend call dsend movlw 0x42 movwf dat call csend clrf dat call dsend call dsend movlw 0x24 movwf dat call csend movlw 0x1E movwf dat call dsend clrf dat call dsend movlw 0x43 movwf dat call csend clrf dat call dsend call dsend movlw 0x24 movwf dat call csend dsend bcf C_D ;Sending DATA to the LCD movf dat,w movwf PORTD bcf _WR nop nop nop nop nop nop nop bsf _WR bsf C_D return csend movf dat,w ;Sending COMMAND to the LCD movwf PORTD bcf _WR nop nop nop nop nop nop nop bsf _WR call delay_200us return delay_200us movlw 0x40 ;Delay of abt 200us movwf count_delay decfsz count_delay,f goto $-1 return