Making Code Smaller for a Multiplexed LCD Display


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default Re: Making Code Smaller for a Multiplexed LCD Display

    Quote Originally Posted by Jerson View Post
    Even if it could, the underlying code will still have to do the same hard work of juggling bits around.
    Yeap, you are right. I was hoping that somebody knew of a clever way of doing this.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Making Code Smaller for a Multiplexed LCD Display

    Hello

    Which pic are you using? There are some newer chips like the 16f1939 with 1k ram and 16K of program space. There are 18f with double.

  3. #3
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default Re: Making Code Smaller for a Multiplexed LCD Display

    Quote Originally Posted by mark_s View Post
    Hello

    Which pic are you using? There are some newer chips like the 16f1939 with 1k ram and 16K of program space. There are 18f with double.
    Actually, I'm using the 16F1939. I'm going to check for the 18F that you mentioned.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  4. #4
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Making Code Smaller for a Multiplexed LCD Display

    I think it’s tough, but a curiosity now,
    Code:
        LCDDATA11.1 = PATTERN.7
    How did you define these?
    Is PATTERN a single byte you are looking at bits 0-7,
    and LCDDATA, there are 11 bytes, and you look at bits 0-7 of all 11 bytes?

    I’ve not used that syntax before, but PATTERN.bit7 (to address a bit), or PATTERN[7] (to address a byte).

  5. #5
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default Re: Making Code Smaller for a Multiplexed LCD Display

    Art, in this example there is a multiplexed 7-segment LCD, 4 commons, display that I am running directly from the PIC. The advantage of the 4 commons is that you only need one pin in the PIC for every 4 segments of the display, so you minimize the number of needed pins.

    The byte PATTERN changes its value for everyone of the 8 digits of the display. After enabling the LCD feature in the PIC, you need to load LCDDATA the registers for it to work.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

Similar Threads

  1. LCD display without firmware, problem with code
    By tomadarpel in forum mel PIC BASIC
    Replies: 1
    Last Post: - 30th May 2013, 11:20
  2. Making code more efficient, any ideas please?
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 26th July 2011, 13:28
  3. Trying to make code smaller
    By plyrathrt in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 5th January 2009, 17:20
  4. Making PBP code more modular
    By forgie in forum General
    Replies: 30
    Last Post: - 25th October 2005, 16:24
  5. Help Quick Need to make code smaller
    By Programmednew in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 25th January 2005, 03:46

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