You are on page 1of 8

MICROPROCESADORES Y MICROCONTROALDORES

UNIDAD 2

PASO 4 - SOLUCIONAR LOS CIRCUITOS Y AVANCES DEL PROYECTO.

GRUPO: 309696_5

PRESENTADO A:

JOHN JAIRO LEIVA

PRESENTADO POR:

CARLOS ARTURO DIAZ CADENA

CODIGO: 1.047.376.709

UNIVERSIDAD NACIONAL ABIERTA Y A DISTANCIA UNAD

ESCUELA DE CIENCIAS BASICAS, TECNOLIGIAS E INGNIERIAS

INGENIERIA ELECTRONICA

CERES UNAD GARAGOA

2017
2. El cual deberá en un display 16X2 desplegar el nombre del curso, numero
de grupo y los nombres uno por uno de los integrantes del grupo
Seguido del número de cedula los cuales cambiaran al presionar cada
uno de los 5 pulsadores (1 al 5 igual número de integrantes)

Circuito simulado con LM35 desplegando en display :

Nombre del curso y número del grupo:


1° Nombre integrantes y cedula:

2° Nombre integrantes y cedula:


3° Nombre integrantes y cedula:

4° Nombre integrantes y cedula:


Línea de código (mikro C Pro)

sbit LCD_RS at RB4_bit;


sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB3_bit;
sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;

char txt1[] = "Micros";


char txt2[] = "Grupo 309696_5";
char int1[] = "Carlos Diaz C.";
char int2[] = "Alex Carrascal";
char int3[] = "Gelver Rivera R.";
char int4[] = "No hay";
bit puls1, puls2, puls3, puls4, puls5;

void integrante1()
{Lcd_Out(1,1,"1 CC 1047376709");
Lcd_Out(2,1,int1);
delay_ms (1000);
}
void integrante2()
{Lcd_Out(1,1,"2 CC 1096198623");
Lcd_Out(2,1,int2);
delay_ms (1000);
}
void integrante3()
{Lcd_Out(1,1,"3 CC 1048849124");
Lcd_Out(2,1,int3);
delay_ms (1000);
}
void integrante4()
{Lcd_Out(1,1,"4");
Lcd_Out(2,1,int3);
delay_ms (1000);
}
void integrante5()
{Lcd_Out(1,1,"5");
Lcd_Out(2,1,int3);
delay_ms (1000);
}
void main(){
ANSEL = 0;
ANSELH = 0;
C1ON_bit = 0;
C2ON_bit = 0;
Lcd_Init();
Lcd_Cmd(_LCD_CLEAR);
Lcd_Cmd(_LCD_CURSOR_OFF);
Lcd_Out(1,1,txt1);
Lcd_Out(2,1,txt2);
delay_ms (1000);
Lcd_Cmd(_LCD_CLEAR);
Lcd_Out(1,1,txt3);
Lcd_Out(2,1,txt4);
delay_ms (1000);
Lcd_Cmd(_LCD_CLEAR);
integrante1();
Lcd_Cmd(_LCD_CLEAR);
integrante2();
Lcd_Cmd(_LCD_CLEAR);
integrante3();
Lcd_Cmd(_LCD_CLEAR);
integrante4();
Lcd_Cmd(_LCD_CLEAR);
integrante5();
Lcd_Cmd(_LCD_CLEAR);
while(1) {
if (Button(&PORTD, 0, 1, 0)) { //Integrante 1
puls1 = 1;
}
if (puls1 && Button(&PORTD, 0, 1, 1)) {
Lcd_Cmd(_LCD_CLEAR);
integrante1();
puls1 = 0;
}
if (Button(&PORTD, 1, 1, 0)) {
puls2 = 1;
}
if (puls2 && Button(&PORTD, 1, 1, 1)) { //Integrante 2
Lcd_Cmd(_LCD_CLEAR);
integrante2();
puls2 = 0;
}
if (Button(&PORTD, 2, 1, 0)) { //Integrante 3
puls3 = 1;
}
if (puls3 && Button(&PORTD, 2, 1, 1)) {
Lcd_Cmd(_LCD_CLEAR);
integrante3();
puls3 = 0;
}
if (Button(&PORTD, 3, 1, 0)) { //Integrante 4
puls4 = 1;}
if (puls4 && Button(&PORTD, 3, 1, 1)) {
Lcd_Cmd(_LCD_CLEAR);
integrante4();
puls4 = 0;
}
if (Button(&PORTD, 4, 1, 0)) { //Integrante 5
puls5 = 1;
}
if (puls5 && Button(&PORTD, 4, 1, 1)) {
Lcd_Cmd(_LCD_CLEAR);
integrante5();
puls5 = 0;
}
}
}

You might also like