Help LCD with 2 wire Connect (Idea)


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jetpr
    Ken i Use 4 Resistors of R1=10k,R2=20K,R3=30K,R4=40 AND USE THE
    ADCIN VoltChannel, Voltage

    IF Voltage > XXX THEN THIS IS = BUTTON ONE AND SO ON
    In principle yes.

    There are many different ways to set this up,
    it depends on what type of buttons you have.
    if they have NO + NC contacts then you could setup a real R2R Network
    this would allow to detect any combination of keys pressed.
    (more than one at a time)

    The simplest (with primitive NO-pushbuttons) would be:
    5 resistors all of the same value (say 2k2, or 4k7) in series.
    (but if more than one key is pressed at a time you will only detect the one pressed closest to the input.)
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  2. #2
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Cool Get it straight two PICs, One Master (doing real jobs) and one slave display/switch

    Lets get down to the requirements straight in break it in short.

    You need a remote LCD display. (Master Tx / Slave Rx)

    You need to sense a few buttons. (Slave Tx / Master Rx)

    To make everything simple connect both the PICs using hardware USART. Depending on the speed needed and code overhead you can choose for RS232 or RS485. This solves the communication problems and takes two wires. The other two wires would be used for power.

    Now getting to real life issues :

    1. Suppose you send a character from the Master PIC and want to display it on the slave PIC (LCD) , you need to send the cursor position (or there has to be a provision for ). While the character is transmitted the slave PIC was doing something else (say reading buttons and the character buffer overflows), so you miss characters.

    The same thing can happen when send switch commands from here.

    Send me details (on the forum) on the master PIC (what it is doing) , its code and schematic if possible, I will then send you the design for the slave display and switch module. I am attaching one file that is a serial display routine and you can just access a LCD as if you were accessing the LCDOUT command.

    Depending on your app (time sensitive, tight loop), you can go for an interrupt driven prog or poll. Anyway you are in a full duplex mode. So send a character and listen if it was sent okay and bingo its another PBP marvel.

  3. #3
    Join Date
    Sep 2004
    Location
    Tallinn, Estonia
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    Hi!
    It is possible to use just 2 PIC pins for I/O. I did it implementing a shift register for reading keys and another for writing to Nokia 3310 LCD. Take a look at http:/parsek.yf.ttu.ee/~felc You find an unfinished soldering station project with PIC12F675 with schematic and assembly code. Comments are in Estonian but i hope you understand the code
    rgds,

    /Felch

    PS. It IS a little bit slow routine but it works.

Similar Threads

  1. Free Project - 245 LED Display
    By T.Jackson in forum Code Examples
    Replies: 221
    Last Post: - 16th August 2009, 04:59
  2. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  3. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  4. having problems with Hantronix 20x4 lcd
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 22nd December 2005, 12:22
  5. how? 2 wire lcd with pbp?
    By nimonia in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 20th October 2005, 07:41

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