Documente Academic
Documente Profesional
Documente Cultură
TECNICATURA EN ELECTRÓNICA
TRABAJO PRÁCTICO Nº 1
TRABAJO PRÁCTICO N° 1
TEMA
OBJETIVO
CONTENIDOS
Introducción a los sistemas programables. Sistemas numéricos. Formato de datos en los sistemas
programables. Introducción a los microprocesadores y microcontroladores. Modelo Harvard y Modelo
de Von Neumann. Arquitectura básica de un microcontrolador. Arquitectura interna de un
microcontrolador: El procesador – Memorias – La memoria de programa – La memoria de datos – Las
líneas de entrada/salida – Los recursos auxiliares. Familias de microcontroladores (i.e. Intel, Motorola,
National Semiconductor, Microchip Technology Inc., etc.). Instrumental de trabajo. Recursos para
desarrollo e implementación de soluciones programables con microcontroladores.
Introducción a los microcontroladores PIC de la empresa Microchip Technology Inc. Familia de
microcontroladores PIC (i.e. de 8 bits, de 16 bits y de 32 bits). Arquitectura básica de los PIC: El
procesador – La memoria de programa – La memoria de datos – Las líneas de E/S – Los recursos
auxiliares. Introducción a la programación de microcontroladores PIC. Ejemplos de aplicaciones
básicas de microcontroladores PIC.
A fin de poder desarrollar la propuesta del presente trabajo práctico, se llevarán a cabo las
siguientes actividades formativas:
Se debe tener en cuenta que el trabajo puede realizarse de modo grupal, con 3 (tres) integrantes como
máximo.
MODALIDAD DE ENTREGA
Trabajo entregado en papel, letra Arial, tamaño 11, interlineado simple, espaciado de párrafo
simple, páginas numeradas.
EVALUACIÓN
Criterios de evaluación:
TRABAJO PRÁCTICO N° 1
Introducción a los Sistemas Digitales Programables
PARTE A
8. Indicar ventajas y desventajas sobre los dos modelos trabajados. Se sugiere realizar un
cuadro comparativo.
PARTE B
13. A modo de entrenador básico, armar en plaqueta el siguiente prototipo de prueba (circuito
propuesto 1).
Solución A
void main () {
OSCCON = 0x70;
TRISA = 0xff;
TRISB = 0x00;
ANSELA = 0x00;
ANSELB = 0x00;
PORTB = 0x00;
do {
PORTB = 0x01;
Delay_ms (200);
PORTB = 0x02;
Delay_ms (200);
PORTB = 0x04;
Delay_ms (200);
PORTB = 0x08;
Delay_ms (200);
PORTB = 0x10;
Delay_ms (200);
PORTB = 0x20;
Delay_ms (200);
PORTB = 0x40;
Delay_ms (200);
PORTB = 0x80;
Delay_ms (200);
} while (1);
}
15. Con un programa del tipo PICkit ‘X’ cargar el microcontrolador PIC16F1826 con el archivo
.HEX generado en la actividad anterior.
17. Al igual que los puntos anteriores realizar lo mismo con los siguientes algoritmos.
Solución B
void main () {
OSCCON = 0x70;
TRISA = 0xff;
TRISB = 0x00;
ANSELA = 0x00;
ANSELB = 0x00;
PORTB = 0x00;
do {
PORTB = 0x80;
Delay_ms (200);
PORTB = 0x40;
Delay_ms (200);
PORTB = 0x20;
Delay_ms (200);
PORTB = 0x10;
Delay_ms (200);
PORTB = 0x08;
Delay_ms (200);
PORTB = 0x04;
Delay_ms (200);
PORTB = 0x02;
Delay_ms (200);
PORTB = 0x01;
Delay_ms (200);
} while (1);
}
Solución C
void main () {
OSCCON = 0x70;
TRISA = 0xff;
TRISB = 0x00;
ANSELA = 0x00;
ANSELB = 0x00;
PORTB = 0x00;
do {
PORTB = 0x80;
Delay_ms (200);
PORTB = 0x40;
Delay_ms (200);
PORTB = 0x20;
Delay_ms (200);
PORTB = 0x10;
Delay_ms (200);
PORTB = 0x08;
Delay_ms (200);
PORTB = 0x04;
Delay_ms (200);
PORTB = 0x02;
Delay_ms (200);
PORTB = 0x01;
Delay_ms (200);
PORTB = 0x02;
Delay_ms (200);
PORTB = 0x04;
Delay_ms (200);
PORTB = 0x08;
Delay_ms (200);
PORTB = 0x10;
Delay_ms (200);
PORTB = 0x20;
Delay_ms (200);
PORTB = 0x40;
Delay_ms (200);
} while (1);
}
Solución D
void main () {
OSCCON = 0x70;
TRISA = 0xff;
TRISB = 0x00;
ANSELA = 0x00;
ANSELB = 0x00;
PORTB = 0x00;
do {
PORTB = 0x81;
Delay_ms (200);
PORTB = 0x42;
Delay_ms (200);
PORTB = 0x24;
Delay_ms (200);
PORTB = 0x18;
Delay_ms (200);
PORTB = 0x24;
Delay_ms (200);
PORTB = 0x42;
Delay_ms (200);
} while (1);
}
Solución E
void main () {
OSCCON = 0x70;
TRISA = 0xff;
TRISB = 0x00;
ANSELA = 0x00;
ANSELB = 0x00;
PORTB = 0x00;
do {
if (PORTA == 0x00) {
PORTB = 0x00;
}
if (PORTA == 0x01) {
PORTB = 0x01;
Delay_ms (200);
PORTB = 0x02;
Delay_ms (200);
PORTB = 0x04;
Delay_ms (200);
PORTB = 0x08;
Delay_ms (200);
PORTB = 0x10;
Delay_ms (200);
PORTB = 0x20;
Delay_ms (200);
PORTB = 0x40;
Delay_ms (200);
PORTB = 0x80;
Delay_ms (200);
}
if (PORTA == 0x02) {
PORTB = 0x80;
Delay_ms (200);
PORTB = 0x40;
Delay_ms (200);
PORTB = 0x20;
Delay_ms (200);
PORTB = 0x10;
Delay_ms (200);
PORTB = 0x08;
Delay_ms (200);
PORTB = 0x04;
Delay_ms (200);
PORTB = 0x02;
Delay_ms (200);
PORTB = 0x01;
Delay_ms (200);
}
if (PORTA == 0x04) {
PORTB = 0x80;
Delay_ms (200);
PORTB = 0x40;
Delay_ms (200);
PORTB = 0x20;
Delay_ms (200);
PORTB = 0x10;
Delay_ms (200);
PORTB = 0x08;
Delay_ms (200);
PORTB = 0x04;
Delay_ms (200);
PORTB = 0x02;
Delay_ms (200);
PORTB = 0x01;
Delay_ms (200);
PORTB = 0x02;
Delay_ms (200);
PORTB = 0x04;
Delay_ms (200);
PORTB = 0x08;
Delay_ms (200);
PORTB = 0x10;
Delay_ms (200);
PORTB = 0x20;
Delay_ms (200);
PORTB = 0x40;
Delay_ms (200);
}
if (PORTA == 0x08) {
PORTB = 0x81;
Delay_ms (200);
PORTB = 0x42;
Delay_ms (200);
PORTB = 0x24;
Delay_ms (200);
PORTB = 0x18;
Delay_ms (200);
PORTB = 0x24;
Delay_ms (200);
PORTB = 0x42;
Delay_ms (200);
}
} while (1);
}
void main () {
OSCCON = 0x70;
TRISA = 0xff;
TRISB = 0x00;
ANSELA = 0x00;
ANSELB = 0x00;
PORTB = 0x00;
do {
if (PORTA == 0x00) {
PORTB = 0x3f;
}
if (PORTA == 0x01) {
PORTB = 0x06;
}
if (PORTA == 0x02) {
PORTB = 0x5b;
}
if (PORTA == 0x03) {
PORTB = 0x4f;
}
if (PORTA == 0x04) {
PORTB = 0x66;
}
if (PORTA == 0x05) {
PORTB = 0x6d;
}
if (PORTA == 0x06) {
PORTB = 0x7d;
}
if (PORTA == 0x07) {
PORTB = 0x07;
}
if (PORTA == 0x08) {
PORTB = 0x7f;
}
if (PORTA == 0x09) {
PORTB = 0x6f;
}
} while (1);
}
void main () {
OSCCON = 0x70;
TRISA = 0xff;
TRISB = 0x00;
ANSELA = 0x00;
ANSELB = 0x00;
PORTB = 0x00;
do {
PORTB = 0x01;
Delay_ms (200);
PORTB = 0x02;
Delay_ms (200);
PORTB = 0x04;
Delay_ms (200);
PORTB = 0x08;
Delay_ms (200);
PORTB = 0x10;
Delay_ms (200);
PORTB = 0x20;
Delay_ms (200);
PORTB = 0x10;
Delay_ms (200);
PORTB = 0x08;
Delay_ms (200);
PORTB = 0x04;
Delay_ms (200);
PORTB = 0x02;
Delay_ms (200);
} while (1);
}
21. Diseñar una solución programable en C de manera tal que en el circuito propuesto 2 se
observe una cuenta de 0 a 9, con transiciones de 1 segundo.
23. Desarrollar una pequeña solución programable tomando como base lo trabajado hasta el
momento.
ANEXO CIRCUITOS
Circuito propuesto 1
(Entrenador 1)
Circuito propuesto 2
(Entrenador 2)