LCDOUT custom commands - how to?


Closed Thread
Results 1 to 40 of 69

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    This...

    '28 DB0 - PORTA.0
    '29 DB1 - PORTA.1
    '30 DB2 - PORTA.2
    '31 DB3 - PORTA.3

    is not compatible with this...

    DEFINE LCD_DREG PORTA 'LCD data port
    DEFINE LCD_DBIT 4 'LCD data starting bit 0 or 4

    ...and double-check with the Datasheet that you've disabled all Analogue Functions on PortA.

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


    Did you find this post helpful? Yes | No

    Default

    The display's datasheet makes me connect the lines D4 to DB3, D5 to DB2, D6 to DB1 and D7 to DB0 (see attachment "DB-Lines_connections.jpg"). This is why I thought the starting bit would be the fourth.

    I changed:
    Code:
    DEFINE LCD_DREG PORTA       'LCD data port 
    DEFINE LCD_DBIT 0           'LCD data starting bit 0 or 4
    and added:
    Code:
    ADCON0.0   = 0              'Disable Converter Module
    I went through the PIC's datasheet and couldn't find other settings that could affect the A ports. Still, the display looks just dead.

    I have two of them and react the same. I changed for my second 16F88 and the result is same too.
    Attached Images Attached Images  
    Roger

  3. #3
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Normally for a 4 bit bus

    DB0-DB3 = D4-D7

    Also if you are using a 16F88 check the ANSEL register
    Keith

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

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


    Did you find this post helpful? Yes | No

    Default

    ANSEL is set to have all analog ports disabled.

    As you suggested, I connected DB0 to D4 and so on...

    Still nothing happens.

    I'm just suprised that the display don't even flickers a little. It looks just like dead. Two displays doing the same makes me think I'm doing something wrong.

    Is is right to say that to make it work the Enable bit must be high? If yes, I could at least mesure it with my logic probe or oscillo....

    What can I "electrically" check else to minimise the cabling error risk?
    Roger

  5. #5
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Is there (or should there be) a contrast control that needs adjusting ?
    Keith

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

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    i'm not sure if PBP handle the R/W line itself.

    How about LOW PORTA.7

    AND maybe i'm blind.. i don't see any config fuses?

    On some LCD, you need to tie the unused DB lines to GND, in your case they should be tied to 5V.

    AND what about the CSB line?
    <img SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1215&d=1164381937">
    Last edited by mister_e; - 24th November 2006 at 17:24.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default Fuses & contrast setting

    Mister_e don't worry, your eyes are absolutely fine ;-)

    I'm using ICProg to program the µC and the fuses are set in there since I can't pass this kind of settings from PBP.

    The actual settings are:
    WDT:ON
    PWRT:ON
    MCLR:ON
    BODEN:ON
    LVP:OFF
    CPD:OFF
    DEBUGGER:OFF
    CCPMX:ON

    I've connected the display as it is described on the schematic so the DB line are all connected to Vdd and the CSB (I don't know what this is for) is connected to Vss.

    I just tried the PORTA.7 = 0 option.... still nothing.

    Keith, the contrast control is software set. I agree, this could be the problem and this is also why I need to understand how I have to adress (exact command syntax) the display.

    The LCD CONTRAST setting could be the problem.

    I've attached the initialisation codes for this display (unfortunately, it's an 8 bit example - is it important?). Is it possible that the LCDOUT $FE command doesn't fit with this display's controller (ST7036)?
    Attached Images Attached Images  
    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