Hello, welcome to our forum.

It looks like you have registered but you have not yet posted and messages. Our requirements are that you must post at least two messages, to allow the moderators to review your registration, before you will be allowed access to the full range of forum areas.

Please make a couple of posts, until then you may see a notice that says you are banned from certain forum areas.


Thank you.

Remove Text Formatting
Loading...

+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2017
    Posts
    2

    Default Display values from two PIC16F series controllers with one LCD display

    Has anyone ever attempted to display outputs of two PIC16F series controllers to one LCD display? I'm looking for a way to interface two PIC16F76 controllers that output the position of a Quadrature encoder (two axes values).
    I'm using a 2x16 LCD and would like to display each axes per line. The outputs are simply a 2 decimal place angular value such as 35.25. I though maybe connecting the data and control lines from one controller to another and have the second process to the display. Any ideas how can accomplish this?

    Thanks in advance...

    Chris

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

    Default Re: Display values from two PIC16F series controllers with one LCD display

    Assuming you connect the data lines together and the control signals together, you still need a way to arbitrate access to the common resource (the LCD). Therefore one extra handshake line from each cpu to the other should be enough to indicate ownership of the resource and thus be able to arbitrate control effectively. Never done this before, but, this could be a way forward.

  3. #3
    Join Date
    Sep 2009
    Posts
    586

    Default Re: Display values from two PIC16F series controllers with one LCD display

    For me, that is wrong way forward....
    Just use some serial protocol to transfer data from one to other pic, and then display all data to LCD.
    This will use less resource, hardware and software. If you have interrupts, then use I2C like protocol.

  4. #4
    Join Date
    Mar 2017
    Posts
    2

    Default Re: Display values from two PIC16F series controllers with one LCD display

    I know this can be done without using I2C protocol. I found a device that uses two PICs with one LCD just don't know how it's done in software.
    Lets call the PIC connected to the LCD the slave and other master

    I see that pins RB0-RB3 are connected from slave PIC to the master(the only interconnections) and RA0-RA3 pins of slave are connected to data lines of LCD. Additionally, the slave PIC uses all three control lines (RW, E, RS). Maybe using enable pin to multiplex data from both PICs? I'm sure there are many cases when using multiple PICs with a single display would be desirable. I really don't want to dedicate two LCD displays for each axes.

    I appreciate the responses so far.

    Chris

  5. #5

    Default Re: Display values from two PIC16F series controllers with one LCD display

    You could have a simple one-wire bus between the PICs that would "request the bus", which would change the TRIS bits from inputs to outputs and vice-versa for both?

  6. #6
    Join Date
    Sep 2009
    Posts
    586

    Default Re: Display values from two PIC16F series controllers with one LCD display

    If two pics share RW,E and RS line, then E pin of master pic(master is connected to DATA LCD pins), enables slave with E=0 and disables LCD. So pic could talk with each other using synchronous comm, or async. Eg I2C, or like, half of SPI etc, or Tx and Rx for async. When master want to free comm, just send dome break signal, or on transition from 0 to 1 on E pin slave pic just relist RW and RS pins by setting them to inputs.
    And I don't see why is I2C problem?
    It simple, robust protocol that can be done on that 3 pins. Most LCD have pull up on all pin, so it is very well suited for that task.

Similar Threads

  1. Trouble with LCD 2x8 and sequential display of values
    By fratello in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 27th February 2012, 15:51
  2. LCD Display
    By lambert in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th January 2010, 23:18
  3. Replies: 2
    Last Post: - 5th November 2009, 18:07
  4. glcd display vs lcd display
    By davids in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 3rd July 2009, 18:16
  5. LCD Display - Which One
    By Switch in forum General
    Replies: 1
    Last Post: - 21st January 2009, 23:44

Members who have read this thread : 16

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