Está en la página 1de 5

Pra cti ca Nuevo ca rcter en Pa ntalla de cristal liquido LCD programa con Mikrobasic: Aqu s eleccionamos en el menu superior

project,
new project y a bre l a ventana que observa mos en la s iguiente grafica. Le pondremos: LCD_Nvo_caracter_PACMAN

https ://es.scribd.com/user/12337371/Ca rlos-Navarro-M Prof. Ca rl os Navarro Morn. 2010-2017 karlozmx@gmail.com


AQU DEJO LA INSTRUCCIN EN MIKROBASIC:
program LCD_Nvo_caracter_PACMAN

dim i as byte

dim j as byte

dim k as byte

const character1 as byte[8] = (0,14,23,28,31,14,0,0)'boca abierta

const character2 as byte[8] = (0,14,23,31,31,14,0,0)'boca cerrada

const character3 as byte[8] = (0,0,0,6,6,0,0,0) 'pildora

sub procedure CustomChar1(dim pos_row as byte, dim pos_char as byte)

dim i as byte

LCD_Cmd(64)

for i = 0 to 7

LCD_Chr_Cp(character1[i])

next i

LCD_Cmd(LCD_RETURN_HOME)

LCD_Chr(pos_row, pos_char, 0)

end sub

sub procedure CustomChar2(dim pos_row as byte, dim pos_char as byte)

dim j as byte

LCD_Cmd(64)

for j = 0 to 7

LCD_Chr_Cp(character2[j])

next j

LCD_Cmd(LCD_RETURN_HOME)

LCD_Chr(pos_row, pos_char, 0)

end sub

sub procedure CustomChar3(dim pos_row as byte, dim pos_char as byte)

dim k as byte

LCD_Cmd(64)

for k = 0 to 7

LCD_Chr_Cp(character3[k])

next k

LCD_Cmd(LCD_RETURN_HOME)

LCD_Chr(pos_row, pos_char, 0)

end sub

https ://es.scribd.com/user/12337371/Ca rlos-Navarro-M Prof. Ca rl os Navarro Morn. 2010-2017 karlozmx@gmail.com


main:

lcd_config(portb,7,6,5,4,portb,0,1,2)

repetir:

i=1

for i=1 to 16

lcd_cmd(lcd_clear)

lcd_cmd(lcd_cursor_off)

CustomChar1(1,i)

CustomChar1(2,i)

lcd_out(2,i," PACMAN")

delay_ms(100)

next i

j=1

for j=1 to 16

lcd_cmd(lcd_clear)

lcd_cmd(lcd_cursor_off)

CustomChar2(1,j)

CustomChar2(2,j)

lcd_out(2,j," RETURN")

delay_ms(100)

next j

k=1

for k=1 to 16

lcd_cmd(lcd_clear)

lcd_cmd(lcd_cursor_off)

CustomChar3(1,k)

CustomChar3(2,k)

lcd_out(2,i," TIEEE")

delay_ms(100)

next k

goto repetir

End. 'finaliza la instruccin

https ://es.scribd.com/user/12337371/Ca rlos-Navarro-M Prof. Ca rl os Navarro Morn. 2010-2017 karlozmx@gmail.com


AHORA EL DIAGRAMA EN ISIS DE SIMULADOR PROTEUS INDICACIONES FINALES PARA HACER DIAGRAMA.

https ://es.scribd.com/user/12337371/Ca rlos-Navarro-M Prof. Ca rl os Navarro Morn. 2010-2017 karlozmx@gmail.com


Recuerda que puedes agregar nuevos caracteres con la herramienta de Mikrobasic en el menu en Tools, LCD Custom
Character

Un cordial saludo y espero les sirva la informacin.

https ://es.scribd.com/user/12337371/Ca rlos-Navarro-M Prof. Ca rl os Navarro Morn. 2010-2017 karlozmx@gmail.com