LCDout question


Closed Thread
Results 1 to 10 of 10

Thread: LCDout question

Hybrid View

  1. #1
    MikeTamu's Avatar
    MikeTamu Guest

    Default LCDout question

    Is there any way I can use the following pinouts with LCDout? I realize that I should use one port and either the upper or lower 4 bits...

    RS: Portb.7
    R/W: Ground
    E: Portb.5
    DB4: Portb.4
    DB5: Portb.3
    DB6: Portb.2
    DB7: Portb.1

    I'm stuck with a fabricated board that is connected in this manner. Is there any way I can go in and 'edit' in order to get the LCDout command to work with this configuration?

    Thanks.

  2. #2
    DaveB's Avatar
    DaveB Guest


    Did you find this post helpful? Yes | No

    Default RE: LCDOut

    Allo There,
    Yes you can define pins as follows :-

    DEFINE LCD_EREG PORTB ' Define enable port
    DEFINE LCD_EBIT 1 ' Set up enable bit
    DEFINE LCD_RSREG PORTB ' Define register select port
    DEFINE LCD_RSBIT 2 ' Set up register select bit
    DEFINE LCD_RWREG PORTB ' Define read/write port
    DEFINE LCD_RWBIT 3 ' Set up read/write bit
    DEFINE LCD_DREG PORTB ' Define data port
    DEFINE LCD_DBIT 4 ' Set up data bit
    DEFINE LCD_COMMANDUS 2000 ' Set Command Delay Time 2mS
    DEFINE LCD_DATAUS 50 ' Set Data Delay Time 50uS

    Have just started myself in the last week, got this working with a 16F873A and Powertip PC1602-H LCD module. You'll just need to alter this a bit to match your outputs and put it after any includes.

    Cheers

    Dave

  3. #3
    MikeTamu's Avatar
    MikeTamu Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks, I am aware of the LCD defines. I was actually wondering if I could change each individual data port. For example I don't have the data ports starting on Portb.0, but instead port portb.1. Also, the data ports are in backward order that they are supposed to be corresponding to portb.1,portb.2,portb.3, and portb.4.

    So, I need to be able to address each individual data port to a different port than standard. Is this possible?

    If not, is it possible to make my own Hitachi commands to do this instead?
    Last edited by MikeTamu; - 19th August 2005 at 14:42.

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default

    No you cannot do that. Only select 4/8 bit, and from 4 bits high port or low port bits (that is 0-3 or 4-7).

    Ioannis

  5. #5
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by TFM
    The LCD may be connected to the PICmicro MCU using either a 4-bit bus or an 8-bit bus. If an 8-bit bus is used, all 8 bits must be on one port. If a 4-bit bus is used, the top 4 LCD data bits must be connected to either the bottom 4 or top 4 bits of one port. Enable and Register Select may be connected to any port pin. R/W may be tied to ground if the LCDIN command is not used.
    I thought it might have to do with the amount of current the lcd draws and how much the micro can take, but I could be wrong. Looks like you might have to cut some traces, and reroute with with "wires of shame".

  6. #6
    MikeTamu's Avatar
    MikeTamu Guest


    Did you find this post helpful? Yes | No

    Default

    Well, I know the hardware (PIC18F252) is capable of running the LCD with my current setup. I designed the board with a Dios 28 pin microcontroller http://www.kronosrobotics.com/xcart/...roductid=16169 which is simply a PIC18F252 with a built in Basic compiler in one package. Kronosrobotic's Basic compiler has no problem in allowing any port on the MCU to be used for any pin on the LCD. I have my current configuration working in front of me with the Dios 28 mcu.

    However, for economic issues, I wanted to be able to switch to PBP. So, if the hardware permits my configuration, why doesn't PBP allow it? I assume MElabs wants a robust compiler, so I am not sure why there is not provisions in the compiler to allow LCD pin switching on permitting PICs.

    I guess I will have to write my own Hitachi LCD interface. I don't know what other options I have at this point.

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