Hello,

I'm playing around with a EA-DOGM-163 LCD (16 characters, 3 lines).
Name:  EA DOGM081E-A_sml.jpg
Views: 945
Size:  7.9 KB
This LCD is equipped with a ST7036 controller.

For tests, I have built my project and made this display work with an 8 bits bus - and it works ...at least, only the first line is okay.

But when it comes to display some text on a specific line, I can't achieve it.
Code:
' ====== FUSES =====================================================================================
' PIC 16F690
@ __Config _FCMEN_OFF &_IESO_OFF &_CPD_OFF &_WDT_OFF &_HS_OSC &_BOR_OFF &_CP_OFF &_PWRTE_OFF &_MCLRE_OFF 

' ====== REGISTERS =================================================================================
'             76543210
OPTION_REG = %10000000 ' PORT A&B Pull-Ups (look WPUA & WPUB)
ANSEL      = %00000000 ' Analog inputs Channels 0 to 7
ANSELH     = %00000000 ' Analog inputs Channels 8 to 11
ADCON0     = %00000000 ' A/D Module is OFF
CM1CON0    = %00000000 ' Comparator1 Module is OFF
CM2CON0    = %00000000 ' Comparator2 Module is OFF
INTCON     = %00000000 ' INTerrupts CONtrol
PORTA      = %00000000 ' Ports High/Low (0 to 5)
TRISA      = %00000000 ' Set Input/Output (0 to 5)
PORTB      = %00000000 ' Ports High/Low (4 to 7)
TRISB      = %00000000 ' Set Input/Output (4 to 7)
PORTC      = %00000000 ' Ports High/Low (0 to 7)
TRISC      = %00000000 ' Set Input/Output (0 to 7)

' ====== DEFINES =================================================================================
DEFINE OSC 8

DEFINE LCD_DREG PORTC  ' LCD data port 
DEFINE LCD_DBIT 0      ' LCD data starting PORT.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 6      ' LCD enable bit 
DEFINE LCD_BITS 8      ' LCD bus size (4 or 8 bits)
DEFINE LCD_LINES 3     ' Number lines on LCD 

' ====== INITIALIZATION ===================================================================================
' EA-DOG-Mx settings
PAUSE 1000      'Time to power-up this display (THIS IS CRUCIAL!!!)
LCDOUT $FE, $39 'Function Set: 8 bits bus mode
LCDOUT $FE, $1D 'Bias set, 3-lines display (5V=$1D / 3,3V=$15)
LCDOUT $FE, $52 'Power control + Contrast (HiByte) (5V=$52 / 3,3V=55)
LCDOUT $FE, $69 'Follower control (5V=$69 / 3,3V=6D)
LCDOUT $FE, $70 'Contrast (LowByte)
LCDOUT $FE, $38 'Function Set: switch back to instruction table 0

' ====== PROGRAM ===================================================================================
' Program
MAIN:

LCDOUT $FE,  1     ' clear display
LCDOUT $FE,  2,"1" ' beginning of line 1
LCDOUT $FE,$10,"2" ' beginning of line 2
LCDOUT $FE,$20,"3" ' beginning of line 3

END
According to the controller's datasheet, ST7036 is instruction compatible with HD44780. But if I try to use values like $C0 (beginning of second line) or $94 (beginning of third line), it won't work.
Name:  2016-08-07 20_35_02-Clipboard.jpg
Views: 913
Size:  37.9 KB

Looking again in the ST7036's datasheet, page 20, one can read this:
Name:  ST7036 compatible.jpg
Views: 981
Size:  57.5 KB

So, as it is now in my code, I used $10 and $20 values...but it still doesn't work.

Anyone an idea where I'm wrong?