Documentos de Académico
Documentos de Profesional
Documentos de Cultura
PLAN DE CLAVE DE LA
CARRERA NOMBRE DE LA ASIGNATURA
ESTUDIO ASIGNATURA
Ingeniería en
Sistemas 2021B N/A Sistemas Programables.
Computacionales.
PRACTICA No y TIPO. LABORATORIO Mi casa. DURACION
DE: EN HORAS:
7 Diseño libre – NOMBRE DE LA Mostrar los 16 dígitos hexadecimales
PRACTICA:
4
especifico. en un display de 7 segmentos.
El Teclado matricial de botones plásticos formado por 4 filas y 4 columnas para un total
de 16 teclas permite agregar una entrada de usuario a tus proyectos. El teclado es de tipo
membrana, por lo que entre sus ventajas se encuentra el poco espacio que requiere para
ser instalado. Posee una cubierta adhesiva y un cable flexible de conexión. Puede ser
conectado a cualquier microcontrolador o tarjetas de desarrollo como Arduino.
El teclado matricial 4x4 está formado por una matriz de pulsadores dispuestos en filas
(L1, L2, L3, L4) y columnas (C1, C2, C3, C4), con la intención de reducir el número de pines
necesarios para su conexión. Las 16 teclas necesitan sólo 8 pines del microcontrolador en
lugar de los 16 pines que se requerirían para la conexión de 16 teclas independientes.
Para poder leer que tecla ha sido pulsada se debe de utilizar una técnica de barrido y no
solo leer un pin de microcontrolador.
3.- PROCEDIMIENTO
EQUIPO MATERIAL
Laptop. CodeVisionAVR.
Proteus 8.
AVR Studio.
DESARROLLO DE LA PRACTICA
CV AVR:
2
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
3
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
siguiente manera:
while (1)
lectura = PIND&0b11110000;
if(lectura == 0b11100000)
tecla = 12;
PORTB = numerosHexadecimales[tecla];
delay_ms(1000);
if(lectura == 0b11010000)
4
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
tecla = 13;
PORTB = numerosHexadecimales[tecla];
delay_ms(1000);
if(lectura == 0b10110000)
tecla = 14;
PORTB = numerosHexadecimales[tecla];
delay_ms(1000);
if(lectura == 0b01110000)
tecla = 15;
PORTB = numerosHexadecimales[tecla];
delay_ms(1000);
5
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
lectura = PIND&0b11110000;
if(lectura == 0b11100000)
tecla = 8;
PORTB = numerosHexadecimales[tecla];
if(lectura == 0b11010000)
tecla = 9;
PORTB = numerosHexadecimales[tecla];
if(lectura == 0b10110000)
6
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
tecla = 10;
PORTB = numerosHexadecimales[tecla];
if(lectura == 0b01110000)
tecla = 11;
PORTB = numerosHexadecimales[tecla];
lectura = PIND&0b11110000;
if(lectura == 0b11100000)
7
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
tecla = 4;
PORTB = numerosHexadecimales[tecla];
if(lectura == 0b11010000)
tecla = 5;
PORTB = numerosHexadecimales[tecla];
if(lectura == 0b10110000)
tecla = 6;
PORTB = numerosHexadecimales[tecla];
8
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
if(lectura == 0b01110000)
tecla = 7;
PORTB = numerosHexadecimales[tecla];
lectura = PIND&0b11110000;
if(lectura == 0b11100000)
tecla = 0;
PORTB = numerosHexadecimales[tecla];
if(lectura == 0b11010000)
9
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
tecla = 1;
PORTB = numerosHexadecimales[tecla];
if(lectura == 0b10110000)
tecla = 2;
PORTB = numerosHexadecimales[tecla];
if(lectura == 0b01110000)
tecla = 3;
PORTB = numerosHexadecimales[tecla];
10
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
aquí podemos
11
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
12
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
13
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
14
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
15
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
Resultados:
0:
1:
2:
16
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
3:
4:
17
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
5:
6:
7:
18
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
8:
9:
19
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
A:
B:
20
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
C:
D:
21
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
E:
F:
22
TECNOLÓGICO NACIONAL DE MÉXICO
INSTITUTO TECNOLÓGICO JOSÉ MARIO MOLINA
PASQUEL Y HENRÍQUEZ
Conclusiones:
23