0% found this document useful (0 votes)
15 views

Código en Lenguaje Basic: #Include #Device Adc 100

This program uses a PIC microcontroller with a 16x2 LCD to display information about group members when buttons 1 through 5 are pressed. It displays the name of the course, group number, and name and ID number of each group member by cycling through the names on each button press.

Uploaded by

jwju
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Código en Lenguaje Basic: #Include #Device Adc 100

This program uses a PIC microcontroller with a 16x2 LCD to display information about group members when buttons 1 through 5 are pressed. It displays the name of the course, group number, and name and ID number of each group member by cycling through the names on each button press.

Uploaded by

jwju
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Programa 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 nmero de cedula los cuales cambiaran al presionar cada
uno de los 5 pulsadores (1 al 5 igual nmero de integrantes)

http://ssistemasdecontrol.blogspot.com.co/2016/10/microcontroladores-unad-2016.html

Cdigo en Lenguaje Basic


#Include <16f877.h>
#Device adc=100
#Device *=16
#Use delay (clock=4M)
#Include <lcd.c>
#Fuses xt

'Float Temp;
Private Sub main()
Dim a As int1, b As int1, c As int1, d As int1, e As int1
'variables de propsito general

'************Inicio del LCD **********


Lcd_init()
'******inicio lcd
Lcd_gotoxy(1, 1)
Printf(lcd_putc, "Micro controladores")
Lcd_gotoxy(1, 2)
Printf(lcd_putc, "Col 2 - Gr:309696_37")
delay_ms(500)
'**************************
While True

a = input_state(pin_a1)
b = input_state(pin_a2)
c = input_state(pin_a3)
d = input_state(pin_a4)
e = input_state(pin_a5)

'**********Logica
If a = 1 Then
lcd_gotoxy(21, 1)
printf(lcd_putc, "Inst Noel Zambrano")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, "Luis Adolfo")
delay_ms(500)
lcd_gotoxy(21, 1)
printf(lcd_putc, " ")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, " ")
delay_ms(500)
lcd_gotoxy(21, 1)
printf(lcd_putc, "Luis Adolfo ")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, "Cod.: 1.077.873.920 ")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, " ")
delay_ms(500)
lcd_gotoxy(21, 1)
printf(lcd_putc, " ")
delay_ms(500)
End If
'*******************
If b = 1 Then
lcd_gotoxy(21, 1)
printf(lcd_putc, "Inst Noel Zambrano")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, "Jose Jurado ")
delay_ms(500)
lcd_gotoxy(21, 1)
printf(lcd_putc, " ")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, " ")
delay_ms(500)
lcd_gotoxy(21, 1)
printf(lcd_putc, "Jose Jurado ")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, "Cod.: 1.090.389.292 ")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, " ")
delay_ms(500)
lcd_gotoxy(21, 1)
printf(lcd_putc, " ")
delay_ms(500)
End If
'********************************
If c = 1 Then
lcd_gotoxy(21, 1)
printf(lcd_putc, "Inst Noel Zambrano")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, "German Lopez ")
delay_ms(500)
lcd_gotoxy(21, 1)
printf(lcd_putc, " ")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, " ")
delay_ms(500)
lcd_gotoxy(21, 1)
printf(lcd_putc, "German Lopez ")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, "Cod.: 1.077.873.323 ")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, " ")
delay_ms(500)
lcd_gotoxy(21, 1)
printf(lcd_putc, " ")
delay_ms(500)
End If
'************************************
If d = 1 Then
lcd_gotoxy(21, 1)
printf(lcd_putc, "Inst Noel Zambrano")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, "Ronald Hernandez ")
delay_ms(500)
lcd_gotoxy(21, 1)
printf(lcd_putc, " ")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, " ")
delay_ms(500)
lcd_gotoxy(21, 1)
printf(lcd_putc, "Ronald Hernandez ")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, "Cod.: 1.082.779.951 ")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, " ")
delay_ms(500)
lcd_gotoxy(21, 1)
printf(lcd_putc, " ")
delay_ms(500)
End If

'********************************
If e = 1 Then
lcd_gotoxy(21, 1)
printf(lcd_putc, "Inst Noel Zambrano")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, "Juan Angarita ")
delay_ms(500)
lcd_gotoxy(21, 1)
printf(lcd_putc, " ")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, " ")
delay_ms(500)
lcd_gotoxy(21, 1)
printf(lcd_putc, "Juan Angarita ")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, "Cod.: xx.xxx.xxx ")
delay_ms(500)
lcd_gotoxy(21, 3)
printf(lcd_putc, " ")
delay_ms(500)
lcd_gotoxy(21, 1)
printf(lcd_putc, " ")
delay_ms(500)
End If
End While
End Sub

You might also like