Lcd 16X4

Software e Hardware para uC PIC

Moderadores: andre_luis, 51, guest2003, Renie

Lcd 16X4

Mensagempor Hermecildes » 05 Fev 2009 15:47

Estou com um lcd da winstar 16X4 hw16904a mas não sei como liga-lo, o 16X2 eu sei o valor das posicoes de cada linha mas esse não, alguem pode me auxiliar? Obrigado
Atitude em tempo real.
Avatar do usuário
Hermecildes
Nibble
 
Mensagens: 64
Registrado em: 13 Dez 2006 19:01

Mensagempor leo_alves_br » 05 Fev 2009 16:10

Funciona da mesma forma que o 16x2.

Só que a terceira linha começa no:
$94

E a quarta linha começa no:
$D4

Exemplo em PIC BASIC:
This code should display the following on a 4x40 LCD display.

" line 1 of LCD "
" line 2 of LCD "
" line 3 of LCD "
" line 4 of LCD "

****************************************************
Top:

DEFINE LCD_BITS 4'Set LCD bus size to 4 bits
DEFINE LCD_DREG PortD'Set LCD data port to D
DEFINE LCD_DBIT 0'Set LCD starting data to bit 0
DEFINE LCD_EREG PortD'Set LCD Enable to port D
DEFINE LCD_EBIT 5'Set LCD Enable line to bit 5
DEFINE LCD_Lines 4'Set number of LCD lines to 4
DEFINE LCD_RSREG PortD'Set LCD Register to port D
DEFINE LCD_RSBIT 4'Set LCD Register line to bit 4
DEFINE LCD_COMMANDUS 5000'Set command delay time to 5mS
DEFINE LCD_DATAUS 500'Set data delay time to 500uS

Header:
LCDOUT $FE,1, " line 1 of LCD "
LCDOUT $FE,$C0, " line 2 of LCD "
LCDOUT $FE,$94, " line 3 of LCD "
LCDOUT $FE,$D4, " line 4 of LCD "
leo_alves_br
Bit
 
Mensagens: 27
Registrado em: 01 Mai 2008 09:32

Mensagempor Hermecildes » 06 Fev 2009 09:16

leo_alves_br escreveu:Funciona da mesma forma que o 16x2.

Só que a terceira linha começa no:
$94

E a quarta linha começa no:
$D4

Exemplo em PIC BASIC:
This code should display the following on a 4x40 LCD display.

" line 1 of LCD "
" line 2 of LCD "
" line 3 of LCD "
" line 4 of LCD "

****************************************************
Top:

DEFINE LCD_BITS 4'Set LCD bus size to 4 bits
DEFINE LCD_DREG PortD'Set LCD data port to D
DEFINE LCD_DBIT 0'Set LCD starting data to bit 0
DEFINE LCD_EREG PortD'Set LCD Enable to port D
DEFINE LCD_EBIT 5'Set LCD Enable line to bit 5
DEFINE LCD_Lines 4'Set number of LCD lines to 4
DEFINE LCD_RSREG PortD'Set LCD Register to port D
DEFINE LCD_RSBIT 4'Set LCD Register line to bit 4
DEFINE LCD_COMMANDUS 5000'Set command delay time to 5mS
DEFINE LCD_DATAUS 500'Set data delay time to 500uS

Header:
LCDOUT $FE,1, " line 1 of LCD "
LCDOUT $FE,$C0, " line 2 of LCD "
LCDOUT $FE,$94, " line 3 of LCD "
LCDOUT $FE,$D4, " line 4 of LCD "







Valeu a dica, vou fazer isso. Abraço
Atitude em tempo real.
Avatar do usuário
Hermecildes
Nibble
 
Mensagens: 64
Registrado em: 13 Dez 2006 19:01


Voltar para PIC

Quem está online

Usuários navegando neste fórum: Nenhum usuário registrado e 1 visitante

cron

x