0% found this document useful (0 votes)
47 views22 pages

Programas Básicos Con LCD de 16X1 y LCD16X2, Leer ADC.: Ing. Franklin Barra Zapata

This document contains programs for basic use of 16x1 and 16x2 LCD displays in BASIC including initializing the LCD, writing text to the LCD, reading analog data from an ADC and displaying it on the LCD, and shifting text on the LCD from left to right and vice versa. It was written by Ing. Franklin Barra Zapata for use with LCD displays.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views22 pages

Programas Básicos Con LCD de 16X1 y LCD16X2, Leer ADC.: Ing. Franklin Barra Zapata

This document contains programs for basic use of 16x1 and 16x2 LCD displays in BASIC including initializing the LCD, writing text to the LCD, reading analog data from an ADC and displaying it on the LCD, and shifting text on the LCD from left to right and vice versa. It was written by Ing. Franklin Barra Zapata for use with LCD displays.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Programas Bsicos con LCD de 16X1 y LCD16X2, Leer ADC.

ING. FRANKLIN BARRA ZAPATA

Config Lcd = 16 * 1 $lcd = &HA000 Inicio: Cls Lcd " ELECTRONICAUNP" Wait 1 End

Config Lcdpin = Pin , Db4 = P2.4 , Db5 = P2.5 , Db6 = P2.6 , Db7 = P2.7 , E = P2.2 , Rs = P2.3 Dim A As Byte Config Lcd = 16 * 1 Inicio: Cls Lcd " ELECTRONICA-UNP" Wait 1 End

Config Lcdpin = Pin , Db4 = P1.4 , Db5 = P1.5 , Db6 = P1.6 , Db7 = P1.7 , E = P1.2 , Rs = P1.3 Dim A As Byte Config Lcd = 16 * 1 Inicio: Cls Lcd "Hello world." Wait 1 End

Dim I As Word Config Lcdpin = Pin , Db4 = P2.4 , Db5 = P2.5 , Db6 = P2.6 , Db7 = P2.7 , E = P2.2 , Rs = P2.3 Dim A As Byte Config Lcd = 16 * 1 Inicio: Gosub Leer_adc Gosub Ver Waitms 100 Goto Inicio Leer_adc: P1.5 = 0 Shiftin P1.7 , P1.6 , I , 0 P1.5 = 1 I = I / 128 Return Ver: Cls Lcd "VALOR= " ; I Wait 1 Return

Dim I As Word Config Lcdpin = Pin , Db4 = P1.4 , Db5 = P1.5 , Db6 = P1.6 , Db7 = P1.7 , E = P1.2 , Rs = P1.3 Config Lcd = 16 * 1 Inicio: Gosub Leer_adc Gosub Ver Waitms 100 Goto Inicio Leer_adc: P3.4 = 0 Shiftin P3.7 , P3.5 , I , 0 P3.4 = 1 I = I / 128 Return Ver: Cls Lcd "VALOR= " ; I Wait 1 Return

Config Lcdpin = Pin , Db4 = P2.4 , Db5 = P2.5 , Db6 = P2.6 , Db7 = P2.7 , E = P2.2 , Rs = P2.3 Config Lcd = 16 * 2 Dim A As Byte Cls Lcd "ELECTRONICA-UNP" Waitms 100 Lowerline Waitms 100 Lcd "U.N.P.- PIURA" Wait 2 Desplaza: For A = 1 To 20 Shiftlcd Right Waitms 100 Next For A = 1 To 20 Shiftlcd Left Waitms 100 Next Wait 3 Goto Desplaza End

You might also like