2 Pics, 1 Serial LCD


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2005
    Posts
    28

    Default 2 Pics, 1 Serial LCD

    I have a circuit that uses 2 Microchip PIC18F242 chips, programmed with PicBasic Pro. I would like to use a single serial LCD controlled by each of the chips. (See attached diagram).

    The program from the first PIC sends: Serout LCD, ON9600, [poscmd, 64, "Battery Voltage"]
    After a 1 second pause the program from the second PIC sends: Serout LCD, ON9600, [poscmd, 104, "OK"]

    The "Battery Voltage" message appears as expected, but when the second program is sent the screen goes blank.

    Note: I tried using N9600, and the first message appeared as expected, but the second message displayed, but not as expected.

    The LCD displays the message from either individual chip correctly, when the other chip is not in the circuit.

    Any suggestions?
    Attached Images Attached Images  

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Armadus View Post
    I have a circuit that uses 2 Microchip PIC18F242 chips, programmed with PicBasic Pro. I would like to use a single serial LCD controlled by each of the chips. (See attached diagram).
    The program from the first PIC sends: Serout LCD, ON9600, [poscmd, 64, "Battery Voltage"]
    After a 1 second pause the program from the second PIC sends: Serout LCD, ON9600, [poscmd, 104, "OK"]
    The "Battery Voltage" message appears as expected, but when the second program is sent the screen goes blank.
    Note: I tried using N9600, and the first message appeared as expected, but the second message displayed, but not as expected.
    The LCD displays the message from either individual chip correctly, when the other chip is not in the circuit.
    Any suggestions?
    After each SEROUT command, set the respective PICs pin to an input so it won't mess with the line between the two.

    Serout LCD, ON9600, blah blah blah
    INPUT LCD

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    As long as there's no collision.. Skimask's suggestion has to work. For sanity i would use an extra I/O on each PIC to know if the LCD is available or not. Still possible to plug the LCD on one PIC, and send the data from the first to the second one. The second one will monitor the whole thing.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Sep 2005
    Posts
    28


    Did you find this post helpful? Yes | No

    Default Thanks for the help

    By changing the pins to inputs after the Serial out commmand the circuit works very well.
    For this application there is not a problem with timming the two signals, so for this time I do not need the monitor, but it is an idea that I may use in the future.

    Thanks.

Similar Threads

  1. first project, and yes, doesn`t work
    By bogdan in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 28th April 2009, 06:13
  2. Optimizing DIV
    By skimask in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 22nd September 2008, 04:58
  3. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  4. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 02:43
  5. DS1820 headache
    By Calco in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 12th August 2004, 00:28

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