Initialisation might be the key
I'm reading the ST7036 driver's data sheet and I can't find where the operation voltage should be set.
The difference I see between the 3.3V and 5V configuration are the "Voltage Booster" and "Voltage Follower". Okay, but what would be the settings?
What is the "Bias" setting for?
2 Attachment(s)
let's wait infos from EA...
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???
Do you want a/d converters on?
Unless you intend on A/D on:
Code:
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
<font color="red">ADCON1 = 7 ' or ADCON1 = %00000111</font> 'Disable A/D converter
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
whithout A/D converters, capacitors added, ...
... still nothing on the display.
May I ask what the "FLAGS=2" does?
keithdoxey suggested that the breadboard could be a possible source of problems.
I'll build the circuit up on another breadboard and I will see what happens.
1 Attachment(s)
It works... in 8 bit mode
Well,
I made a try I didn't think about up to now: connect this display in 8 bit mode.
Finally, it works and without any initialisation command.
I'll try now to go backwards and find how to make it work in 4 bits mode.
At least, I can make sure the display is not dead.
Re: LCDOUT custom commands - how to?
Did you ever get the display to work in 4 bit mode?
Re: LCDOUT custom commands - how to?
I have my doubts with that circuit.
With the 4 unused LCD data bits permanently tied high it’s impossible to initialise 4 bit mode,
unless the LCD modules actually ignore the lower four bits value during initialisation.
Re: LCDOUT custom commands - how to?
Thank you flotulopex for this thread, now my 3x16 DOGM display works perfect.:)
Just a little time for LCD module to settle - that's it!