Guia LCD 16f

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

E.I.S.

“PEDRO DOMINGO MURILLO” LABORATORIO Nº


CARRERA: ELECTRÓNICA TEMA: LCD
NIVEL: SUPERIOR FECHA:
ASIGNATURA: MIC – 400 PARALELO B
MICROCONTROLADORES I

OBJETIVO
Emplear un LCD de 2 filas y 16 columnas para aplicaciones con el uC 16F877A

PREINFORME
1. Resumen general de la tarjeta de Pantalla de Cristal Líquido LCD.
2. Realizar la programación para mostrar en el LCD leyendas referidas a su grupo de
trabajo.

LABORATORIO
Realizar la programación en MikroBasic e implementación de mensajes en el LCD.

Programa sugerido

program pic16flcd

' Programa para enviar mensajes por LCD 16x2.


' Lcd module connections

dim LCD_RS as sbit at RD5_bit


LCD_EN as sbit at RD4_bit
LCD_D4 as sbit at RD3_bit
LCD_D5 as sbit at RD2_bit
LCD_D6 as sbit at RD1_bit
LCD_D7 as sbit at RD0_bit

LCD_RS_Direction as sbit at TRISD5_bit


LCD_EN_Direction as sbit at TRISD4_bit
LCD_D4_Direction as sbit at TRISD3_bit
LCD_D5_Direction as sbit at TRISD2_bit
LCD_D6_Direction as sbit at TRISD1_bit
LCD_D7_Direction as sbit at TRISD0_bit
' End Lcd module connections

main:
Lcd_Init()
Lcd_Cmd(_LCD_CLEAR)
Lcd_Cmd(_LCD_CURSOR_OFF)
Lcd_Out(1,5,"MIC 400 B")
Delay_ms(2000)
Lcd_Out(2,5,"Electronica")
DELAY_MS (2000)
goto main
end.
LCD1
LM016L

Vcc

VDD
VSS

VEE

RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
E
1
2
3

4
5
6

7
8
9
10
11
12
13
14
C3

22pF
1

1
CRYSTAL
U2
C4
2

13 33
OSC1/CLKIN RB0/INT
14 34
OSC2/CLKOUT RB1
35
RB2
22pF 2 36
RA0/AN0 RB3/PGM
3 37
RA1/AN1 RB4
4 38
RA2/AN2/VREF-/CVREF RB5
5 39
RA3/AN3/VREF+ RB6/PGC
6 40
Vcc RA4/T0CKI/C1OUT RB7/PGD
7
RA5/AN4/SS/C2OUT
15
RC0/T1OSO/T1CKI
8 16
RE0/AN5/RD RC1/T1OSI/CCP2
9 17
RE1/AN6/WR RC2/CCP1
10 18
RE2/AN7/CS RC3/SCK/SCL
23
RC4/SDI/SDA
R2 1
MCLR/Vpp/THV RC5/SDO
24
10k 25
RC6/TX/CK
26
RC7/RX/DT
19
RD0/PSP0
20
RD1/PSP1
21
RD2/PSP2
22
RD3/PSP3
27
RD4/PSP4
28
RD5/PSP5
29
RD6/PSP6
30
RD7/PSP7
PIC16F877A

You might also like