LCDOUT custom commands - how to?


Closed Thread
Results 1 to 40 of 69

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default 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?
    Roger

  2. #2
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex
    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?
    The registers where you can see the differences are where the values are set. The values you need are shown in Binary. just convert that to HEX and you have your commands eg Power command register for 5v working is shown as 0101 0010 which is $52 so

    LCDout $FE, $52 should do the trick.

    You mey not even need to convert it.... you may be able to send

    LCDout $FE, %01010010.

    I dont know the exact purpose of the Bias setting but as they give you the required values that is what you should use.
    Keith

    www.diyha.co.uk
    www.kat5.tv

  3. #3
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default 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???
    Attached Images Attached Images   
    Roger

  4. #4
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex
    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).
    Thats much clearer
    Would I really have killed 2 displays???
    Hard to say. There is a line in the datasheet that says "Note that the COG technology means that the current capacity of the outputs is limited." It may also mean that COG technology is more susceptable to damage from static electricity.

    With a breadboarded circuit there is always a possiblility of accidental shorts and also open circuits. Some devices can be damaged if a voltage is applied to pins when the device itself is unpowered. A loose connection could cause that situation to arise.

    I somehow killed some pins on a PIC16F88 but to my knowledge I didnt do anything that was likely to have damaged it. Likewise I have also had solder bridges and other accidental shorts that you would expect to cause damage and things survive.

    Its one of the great mysteries !!!!
    Keith

    www.diyha.co.uk
    www.kat5.tv

  5. #5
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default Power supply decoupling

    One more thought.

    Add a 0.1uF capacitor across PIC 5 and PIC 14

    Add a 0.1uF capacitor across LCD 26/27

    Wont do any harm and if there is noise present on the supply it could clean it up.
    Keith

    www.diyha.co.uk
    www.kat5.tv

  6. #6
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default 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

  7. #7
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default 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.
    Roger

  8. #8
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    PBP uses FLAGS.1 (LCDINITFLAG) to remember that it's already initialized the LCD. By setting it to 1, you can make PBP think it's already done, then you can go ahead and do the init manually.

    I don't think the Proto-Board itself would cause the display not to work. But I do agree with Keith in that somewhere along the line, something was probably wired wrong, then both displays were tried, and now both displays are most likely dead. It only takes a couple ms of reverse power to fry them.

    The reason I say that is because LCD's that haven't been initialized always show black squares on 1 line. From what I understand, you don't even get those.

    It may be time to cut your loses, and move on.
    DT

  9. #9
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default Yep!

    Well Darrel,

    Thank you for the clarification.

    I have sent the displays back to the supplier so they will test them.

    It's the first time I have tried to use those COG displays and heard from other collegues that they are quite fragile.

    Let's wait.

    Thank you All for your hudge support (I'm just surprised how many ideas all these guys have to solve a problem!!). Hope to come back with good news.
    Roger

Similar Threads

  1. Timer + rc5
    By naga in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th November 2009, 07:56
  2. need help in coding..
    By daphne8888 in forum mel PIC BASIC
    Replies: 1
    Last Post: - 19th March 2008, 07:31
  3. Help GPS read with serin
    By leinske in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th September 2007, 02:33
  4. Crystalfontz LCD
    By jman12 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 9th February 2007, 15:04
  5. having problems with Hantronix 20x4 lcd
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 22nd December 2005, 12:22

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts