_end: while (select == 0) {};
}
clock_draw (void)
{temp_char; i, n; = seconds; = 10; (temph, tempv_char); (temph <10)
{_char = tempc_char [i]; _wr = temp_char; _write ();
}// for i
}
stan_char_1 (void)
{i; temp_char; _1 (); (i = 0; i
{_char = stan_table [ptr_pos] [i]; _wr = temp_char; _write ();
}
} stan_char_2 (void)
{i; temp_char; _2 (); (i = 0; i
{_char = stan_table [ptr_pos] [i]; _wr = temp_char; _write ();
}
p18lcd.asm
*********************************************** *********************
; * Microchip Technology Inc. 2002 *
; * Revised on 5/6/03 - Removed Linker file declaration *
; * Assembler version: 2.0000 *
; * Filename: *
; * p18lcd.asm *
; ********************************************** ********************** p = 18f442
# include p18f442.inc
# define LCD_D4 PORTD, 0; LCD data bits
# define LCD_D5 PORTD, 1
# define LCD_D6 PORTD, 2
# define LCD_D7 PORTD, 3
# define LCD_D4_DIR TRISD, 0; LCD data bits
# define LCD_D5_DIR TRISD, 1
# define LCD_D6_DIR TRISD, 2
# define LCD_D7_DIR TRISD, 3
# define LCD_E PORTA, 1; LCD E clock
# define LCD_RW PORTA, 2; LCD read/write line
# define LCD_RS PORTA, 3; LCD register select line
# define LCD_E_DIR TRISA, 1
# define LCD_RW_DIR TRISA, 2
# define LCD_RS_DIR TRISA, 3
# define LCD_INS 0
# define LCD_DATA 1_LCD_DATA UDATAres 1res 1_wr res 1_rd res 1
GLOBAL temp_wrCODE_10x80temp_wri_writeLCDLine_1_20xC0temp_wri_writeLCDLine_2
; write data_write; temp_wr, TXREG; TXSTA, TRMT; $-2LCDBusySTATUS, CLCDWrited_write; instruction_writeLCDBusySTATUS, CLCDWrite i_write
rlcd macro MYREGISTERMYREGISTER == 1STATUS, CLCDReadSTATUS, CLCDReadPORTALCD_E_DIR; configure control linesLCD_RW_DIRLCD_RS_DIRb'00001110'ADCON10xff; Wait ~ 15ms @ 20 MHzCOUNTER0xFFdelayDelayXCyclesCOUNTER, Flil1b'00110000 '; # 1 Send control sequencetemp_wrSTATUS, CLCDWriteNibble
0xff; Wait ~ 4ms @ 20 MHz COUNTER
lil20xFFdelayDelayXCyclesCOUNTER, Flil2b'00110000 '; # 2 Send control sequencetemp_wrSTATUS, CLCDWriteNibble0xFF; Wait ~ 100us @ 20 MHzdelayDelayXCyclesb'0011000'; # 3 Send control sequencetemp_wrSTATUS, CLCDWriteNibble
; test delay0xFF; Wait ~ 100us @ 20 MHzdelayDelayXCyclesb'00100000 '; # 4 set 4-bittemp_wrSTATUS, CLCDWriteNibbleLCDBusy; Busy? b'00101000'; # 5 Function settemp_wri_writeb'00001101 '; # 6 Display = ON temp_wr
rcall i_writeb'00000001 '; # 7 Display Cleartemp_wri_writeb'00000110'; # 8 Entry Modetemp_wri_writeb'10000000 '; DDRAM addresss 0000temp_wri_write; b'00000010'; home; temp_wr; i_writeLCDInit;
_____...