program tastiera18 include tastiera18 ' inserire qui il nome dei modulo dim LCD_RS as sbit at RA2_bit LCD_EN as sbit at RA3_bit LCD_D4 as sbit at RB0_bit LCD_D5 as sbit at RB1_bit LCD_D6 as sbit at RB2_bit LCD_D7 as sbit at RB3_bit LCD_RS_Direction as sbit at TRISA2_bit LCD_EN_Direction as sbit at TRISA3_bit LCD_D4_Direction as sbit at TRISB0_bit LCD_D5_Direction as sbit at TRISB1_bit LCD_D6_Direction as sbit at TRISB2_bit LCD_D7_Direction as sbit at TRISB3_bit dim txt1 as char[16] dim x as byte main: ANSEL = 0 ' Configura AN pins come I/O digitali option_reg.7=0 ' pull up on txt1 = "FRANCESCO IT9DPX" Lcd_Init() ' Initialize Lcd Lcd_Cmd(_LCD_CLEAR) ' Clear display Lcd_Cmd(_LCD_CURSOR_OFF) ' Cursor off Lcd_Out(2,1,txt1) ' Write text in first row Delay_ms(2000) Lcd_Out(1,1,"tastiera 3x6") ' Write text in first row Delay_ms(3000) '====== inserisci numero da 10 cifre ===== inserisci: txt1 = " " Lcd_Out(2,1,txt1) ' Write text in second row x = 0 rip_tastiera: tastiera3x6 if ta=16 then goto rip_tastiera end if txt1[x] = ta Lcd_Out(2,1,txt1) ' Write text in second row x=x+1 if x < 10 then goto rip_tastiera end if goto inserisci '====== fine inserimento numero da 10 cifre ===== end.