LCDOUT with a 12F683


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305

    Default LCDOUT with a 12F683

    Ladies and Gents,

    I was wondering if anyone can give me a few clues on how to get an LCD to work when driven by a 12F683 and using LCDOUT. I'd tie the R/W pin to ground like the book says since I won't be using it. Ten I'd tie the RS and E to +5V 'cause as I see it the LCD should always be ready for data.

    I know there aren't 4 pins in a row so I'd need to use GPIO.0, GPIO.1, GPIO.2 and GPIO.3. I won't have anything exotic running to it but I think it will be a good lesson is using LCds

    For the DEFINEs the manual says
    DEFINE LCD_DREG PORTA
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTA
    DEFINE LCD_RSBIT 4
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 3
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 1500
    DEFINE LCD_DATAUS 44

    but the 12F683 has PORT0. Can I use:

    DEFINE LCD_DREG GPIO
    DEFINE LCD_DBIT 0
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 1500
    DEFINE LCD_DATAUS 44

    And not use these:
    DEFINE LCD_RSBIT 4
    DEFINE LCD_RSREG PORTA
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 3
    since their always high with my scheme.

    I saw the example of bit banging on the MELabs site but wanted to use LCDOUT for it's ease of use.

    Your replies are almost always appreciated especially if they work.

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


    Did you find this post helpful? Yes | No

    Default Re: LCDOUT with a 12F683

    You cannot tie the LCD's RS and E to +5V.

    RS is the "Register Select", and it needs to select between Command and Data registers for the LCD to work.
    E clocks in the data nibbles, without the clock the LCD never receives data. It is not just an "Enable" pin.

    GPIO.3/MCLR/Vpp when not used as MCLR, is an Input Only pin. You cannot use it for the data bus output.

    There just aren't enough pins on a 12F683 to drive an LCD directly.
    You can do it with a shift register, or port expander. But if you are going to have two chips ... you might as well just use a bigger PIC to begin with.

    Mike did a strange little circuit here that uses the serial data to control the RS bit. Which means you have to send two byes serially for every byte sent to the LCD, and you have to bit-bang the LCD routines since LCDOUT will not work.
    But then again ... WHY? When you can just use a bigger PIC.
    DT

  3. #3
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: LCDOUT with a 12F683

    Thanks for the input and sorry for showing so much ignorance. I didn't even have to be connected to +5 to learn something. Usually it takes 220V or higher to get my attention;-)

    Going with a bigger PIC appears to be my only option. I just wondered if it were possible, thought I'd ask and I found a butt load of them in the shop.

    Thanks for your time and willingness to impart your knowledge.

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: LCDOUT with a 12F683

    That link to Mike's project posted by Darrel Taylor has been updated.
    here

    no longer needs 2 bytes and is serout, debug, etc compatible!.. pretty slick actually (My opinion)


    (is there still a "buttload" in a shop? lol)
    Last edited by nomad; - 6th May 2014 at 00:26. Reason: buttload

Similar Threads

  1. LCDOut Woes
    By LetTheSmokeOut in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 11th June 2008, 02:45
  2. LCdout
    By lerameur in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd December 2006, 17:14
  3. 8bit LCDout vs 4bit LCDout
    By keithdoxey in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th May 2006, 13:16
  4. Lcdout
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th February 2006, 02:39
  5. LCDOUT help
    By f6ggy in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 6th October 2003, 13:51

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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