Página 1 de 1

Lcd 16X4

MensagemEnviado: 05 Fev 2009 15:47
por Hermecildes
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

MensagemEnviado: 05 Fev 2009 16:10
por leo_alves_br
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 "

MensagemEnviado: 06 Fev 2009 09:16
por Hermecildes
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