Well,
I got an answer from EA. They say they don't have any negative feedback about their displays. I shall send them my program and a picture (already done).
I fully checked my PIC with LEDs and it's okay whithout any doubt.
I have recabled the circuit with coloured wires to make it easy to see if I miss something obvious to you (see attachments).
The code I will send to AE is this:
Code:
include "16F88-FUSES.BAS"
'PIC 16F88 - 4MHz
' LCD circuitery
'23,24,25,26,32,33,34,35,40 - Vdd (+5V)
'27,38 - Vss (GND)
'31 DB0 - PORTB.0
'30 DB1 - PORTB.1
'29 DB2 - PORTB.2
'28 DB3 - PORTB.3
'39 RS - PORTB.4
'36 E - PORTB.5
'37 R/W - Vss (GND)
' Wires from programmer (AN589)
'Black = GND (Vss)
'Red = +5V (Vdd)
'Yellow = MCLR
'Orange = Clock
'Brown = Data
DEFINE LCD_DREG PORTB 'LCD data port
DEFINE LCD_DBIT 0 'LCD data starting bit 0 or 4
DEFINE LCD_RSREG PORTB 'LCD register select port
DEFINE LCD_RSBIT 4 'LCD register select bit
DEFINE LCD_EREG PORTB 'LCD enable port
DEFINE LCD_EBIT 5 'LCD enable bit
DEFINE LCD_BITS 4 'LCD bus size 4 or 8
DEFINE LCD_LINES 2 'Number lines on LCD
DEFINE LCD_COMMANDUS 2000 'Command delay time in us
DEFINE LCD_DATAUS 50 'Data delay time in us
OSCCON = %01100000 'Internal RC set to 4MHZ
ANSEL = %00000000 'Disable Analogue Inputs
OPTION_REG = %01000000 'Enable PORTB pullups
CMCON = %00000111 'Disable Comparators
ManualLCDInit:
FLAGS=2 ' Void PBP lcd initialisation... it's a nice feature !!!
PAUSE 500
Lcdout $FE, $33
Lcdout $FE, $33
Lcdout $FE, $20 ' official 4 bit mode
@ bsf LCD_EREG, LCD_EBIT
PAUSEUS 20
@ bcf LCD_EREG, LCD_EBIT
Lcdout $FE, $28 ' Function Set
Lcdout $FE, $14 ' Bias
Lcdout $FE, $78 ' Contrast set
Lcdout $FE, $5E ' Power/Icon/Contrast
Lcdout $FE, $6A ' Follower control
Lcdout $FE, $0C ' Display ON
Lcdout $FE, $01 ' Clear display
Lcdout $FE, $06 ' Entry mode Set
' --------------------------------- End LCD init!
LCDOUT $FE,1,"Line1",$FE,$C0,"Line 2"
LOOP:
Goto LOOP
end
Keithdoxey, thank you for your help to make me understand how to read the registers values. I'm okay now with this.
Would I really have killed 2 displays???
Bookmarks