3-wire LCD interface?


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Folks,

    I will post the receiver and transmitter part of the 1 pin Xcvr.

    The principal lies upon the receivers timing, in connection with the transmitters timing. You only have two critical points to ponder.

    1. The initial Rcvr *must* be slower than the transmitter until it receives the start bit.

    2. The Rcver *must* be faster than the transmitter after receiving the start bit.

    After #2 starts or begins, you control your Baud rate by the transmitter, *NOT* the receiver, or both.

    I wanted the overhead of the transmitter to be almost zero. The receiver was a 16f648A, and its only job was to control the LCD, so instead of using a interupt (which you can), I left the receiver in a loop, waiting for data communication from the 12f675. When a full byte is received, the 648 checks to see if it is a LCD command byte or a LCD data byte. (x254) if it is a command byte, it tells the LCD to accept next byte as a command, and waits for the next byte.

    Dwayne


    It has been 100 percent reliable so far. When I get home, I will post the code.
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  2. #2
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136


    Did you find this post helpful? Yes | No

    Default code?

    Melanie could you please give me the code to interface your circuit?

  3. #3
    Join Date
    May 2007
    Location
    Republic Serbia
    Posts
    105


    Did you find this post helpful? Yes | No

    Wink hi vlad

    Pa de si bre Vlad puno pozdrava od Tanga.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by shahidali55 View Post
    Melanie could you please give me the code to interface your circuit?
    That was over 3 years ago...you know that right?
    And there is code around here...just needs a bit of searching...who knows, maybe you could even write code yourself!

  5. #5
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Post

    That's a good idea - using a Hex D Flip-Flop. So basically when Q6 is low the LCD's disabled, (the diode sinks current from the 4k7) then Q6 swings high allowing the data line to re-enable the LCD after clocking in the bits you want.
    Last edited by T.Jackson; - 5th June 2007 at 16:11. Reason: 174 is certainly not a parallel shift register like I initally first thought

  6. #6
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Post

    Quote Originally Posted by skimask View Post
    That was over 3 years ago...you know that right?
    And there is code around here...just needs a bit of searching...who knows, maybe you could even write code yourself!
    Give him a break - writing code for this is a lot easier said than done.

  7. #7
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136


    Did you find this post helpful? Yes | No

    Default

    Couldn't find anything using search.
    Last edited by shahidali55; - 5th June 2007 at 17:01.

  8. #8
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136


    Did you find this post helpful? Yes | No

    Default

    I didn't know what PBP was before 3 years.
    I don't think any code in PBP was posted for 3 or 2 wire interface till now.
    I tried to understand the code given on http://www.rentron.com/Myke1.htm.
    But couldn't really understand the command sequence. I didn't really get how the RS and E lines of the LCD are being handled.
    Last edited by shahidali55; - 5th June 2007 at 19:39.

  9. #9
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by shahidali55 View Post
    I didn't know what PBP was before 3 years.
    I don't think any code in PBP was posted for 3 or 2 wire interface till now.
    I tried to understand the code given on http://www.rentron.com/Myke1.htm.
    But couldn't really understand the command sequence. I didn't really get how the RS and E lines of the LCD are being handled.
    That's the same book/code/idea I was talking about. I picked up that book back in '01 (give or take a few months). Basically you manually preload a shift register with all the data bits, then the rest of the control bits and the last thing to get 'tripped' is the Enable, all done by a shift register.
    Not a new idea by any stretch, but a handy one...

  10. #10
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by shahidali55 View Post
    I didn't know what PBP was before 3 years.
    I don't think any code in PBP was posted for 3 or 2 wire interface till now.
    I tried to understand the code given on http://www.rentron.com/Myke1.htm.
    But couldn't really understand the command sequence. I didn't really get how the RS and E lines of the LCD are being handled.
    Look at this thread:
    http://www.picbasic.co.uk/forum/showthread.php?t=4972
    HTH
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. More Servo Woes
    By chrisshortys in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 13th May 2009, 08:40
  2. Please help with EDE702 - Serial to LCD interface
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th October 2008, 02:48
  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. Replies: 6
    Last Post: - 10th June 2005, 07:31

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