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

    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

  2. #2
    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

  3. #3
    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.

  4. #4
    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

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


    Did you find this post helpful? Yes | No

    Default Yes you can!

    Quote Originally Posted by flotulopex
    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.
    Hi flotulopex, I use IC PROG and I pass the config fuse data to it from code always. Which assembler are you using PBP or MPASM? Also what osc speed?
    Code:
    for MPASM try
    @MyConfig = _HS_OSC & _WDT_ON & _PWRTE_ON & _MCLRE_ON & _LVP_OFF 
    @MyConfig = MyConfig  & _CP_OFF & _BODEN_ON & _DATA_CP_OFF
    @ __config  MyConfig
    
    for PBP try
    @ DEVICE pic16F88, HS_OSC
    ' Set Oscillator Fuse in Programmer to high speed make XT for low speed
    @ DEVICE pic16F88, WDT_ON
    ' Watchdog Timer
    
    @ DEVICE pic16F88, PWRT_ON
    ' Power-On Timer
    
    @ DEVICE pic16F88, MCLR_ON 
    ' Master Clear Options (Internal)
    
    @ DEVICE pic16F88, BOD_OFF
    ' Brown-Out Detect
    
    @ DEVICE pic16F88, LVP_OFF
    ' Low-Voltage Programming
    
    @ DEVICE pic16F88, CPD_OFF
    ' Data Memory Code Protect
    ' Set to CPD_OFF for Development Copy
    ' Set to CPD_ON for Release Copy
    
    @ DEVICE pic16F88, PROTECT_OFF
    Also make sure to define your oscillator if you do not use default 4 mhz
    JS
    Last edited by Archangel; - 25th November 2006 at 09:00.

  6. #6
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default Time to go back to basics I think

    There are basically two things that could be stopping you display from working.

    1. a problem with the PIC

    2. a problem with the display.


    To test 1....

    I would assign an entire 8 bit port for the LCD eg PortB (just for test purposes) and connect LEDs to each bit. Also put LEDs on the pins of another port that you will use for the control lines.

    Have a count run from 0-255 and output that to port B and observe that the LEDs count up correctly.

    Likewise output all possible combinations on the pins you use for the control lines just to ensure that all your output pins are correctly configured and can successfully light the LEDs.


    to test 2......

    Once you know that you PIC is capable of driving all the required lines, connect up the LCD display in 8 bit mode and then try all the commands to get it working. Once you have it working it should be simple to change to 4 bit mode.

    As far as I can see the only difference between 4 and 8 bit mode is in the initialisation which tells the LCD how it is connected. All subsequent commands should be the same, the only difference being that instead of sending a byte you have to send two nibbles instead which obviously takes twice as long.

    I have had a further thought about something that caught me out a few weeks ago when changing to a different display. I didnt have the R/W line connected to the PIC, but I also didnt have it tied to anything either. The origianl display must have had some form of internal pullup/pulldown resistor as it didnt mind about the floating pin but the new display would not do anything until correctly terminated.

    The second datasheet you mentioned for the actual controller chip has full examples of initialising in 8 and 4 bit mode so all the actual values you need are listed there. Ignore the fact that it is written in 8051 assembler just use the values in your PBP code. Being 44780 compatable means that it should work fine with LCDout so my bet is a misconfiguration of the PIC or a wiring fault unless you are really unlucky and have killed a piece of hardware.
    Keith

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

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


    Did you find this post helpful? Yes | No

    Default Fuses!!!! yes, it works really :-)

    Wow Joe S!!

    Yes it works; I'm very surprised indeed. I was told it was not possible with ICProg.

    I'm using PBP. Where did you find the correct syntax to use for every fuses?



    Keith,

    You're right. Let's go on with method. I'm starting to check as you suggest. Will come back when done.
    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 : 1

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