shared data lines for LCD and LED'S?


Closed Thread
Results 1 to 5 of 5
  1. #1

    Default shared data lines for LCD and LED'S?

    I'd like to multiplex a 3digit 7seg led display and lcd data lines together.

    I need 8 i/o for the led segments and decimal point, I'd like to use the same 8 i/o as the LCD data lines.

    figuring the LCD wont act on the data until the EN pin is toggled, and the
    LED displays wont show anything until the corresponding digit lines are lowered. (common cathode)

    using an 877a, lcd/led data PortD, lcd rs&en on portc (4&5?) and the 7seg leds on portE(0-2). I figure I can use lcdout in pbp to send data to the lcd, and use a timer interupt for an asm led refresh..
    neither would be in use at the same time? (I could even disable interrupts during LCD writes if needed, shouldn't blank the digit displays too long, and re-enable them after the lcd write)

    anyone see a problem with my logic or doing this?

    I was going to try and do assembly for the led's but as I know zilch in assembly, what I thought would be fairly simple, (in asm move digit data variable from pbp to portd and lower corresponding digit portE pin), um, isn't. lol so would probably use DT's instant interupts and do that in PBP as well.

    it seems too logical, I must be missing something as I cant find information on it being done anywhere.
    Last edited by nomad; - 7th February 2009 at 08:35.

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default

    Your thought processes seem to be right. I could suggest that you write to the LCD within the interrupt during the interdigit blanking period. Doing the LCDout outside the interrupt may give you wierd results when there is a clash between the LCDout code and the LED code. Assuming you disable interrupts for an LCDout, there may be a visible flicker in the LED which may be bearable or even irritating depending on the severity.

    To write to the LCD inside the interrupt, you could signal the write after preparing a message. The interrupt code would then handle the write and you will not see a perceptible flicker.

    This technique is usually used in small microcontrollers to multiplex 7segment LEDs with upto 8 keys.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Have you looked at 16F914?

  4. #4


    Did you find this post helpful? Yes | No

    Talking Groovy!

    Thanks, I just wanted to see if there was something obvious I was missing.

    The lcd is one of the standard hd4470? parallel 2 line types, so I don't think the 16f914 is going to help me there, funny you mention it though, as I just recieved some 917's and 946's (same family)

    Thanks again for the input.

  5. #5


    Did you find this post helpful? Yes | No

    Default

    lol, now that I asked I found in microchips App note AN234, (Hardware Techniques for PICmicro Microcontrollers)... there's a section about sharing LCD data lines for other i/o.

    day late dollar short? :-) time to at least browse all the app notes.. some darn good stuff in there..

Similar Threads

  1. i cant get 18f2550 work as HID
    By Ahmadabuomar in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 13th October 2009, 16:39
  2. Going Loopy - How do i get my Loops sorted out ???
    By gtvmarty in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 24th September 2009, 05:02
  3. Use of a PIC
    By Edwardo in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 22nd March 2007, 14:11
  4. Using LEDs as light sensors
    By skimask in forum Code Examples
    Replies: 3
    Last Post: - 30th December 2006, 22:19
  5. controlling leds with the switches
    By ilteris in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th October 2005, 21:02

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