3-wire LCD interface?


Closed Thread
Results 1 to 21 of 21
  1. #1
    atomski's Avatar
    atomski Guest

    Question 3-wire LCD interface?

    Hello everyone,

    here's yet another question, I couldn't
    find info about in the forum archives. How
    would one go about connecting an alpha
    numerical LCD (e.g. 1X16 HD44780) via
    74HC595, 74HC154, CD4094 or similar?
    I'm short of pins and I'd like to build a
    cheap serial LCD using 12C508/509 w/
    3-wire interface to the LCD. Sample source
    code would be appreciated. I'd prefer to
    use 74HC595 as I have an abundance of
    these Serial comm. on 12C508/509 is
    something I've never tried out, but I have
    2 or 3 laying around and I'd like to give it
    a try. Thanks very much in advance...

    --
    Sincerest regards,

    YZ7REA Vladimir M Skrbic
    4N7ATV Repeater Administrator
    YU7GHZ Radio Club President

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


    Did you find this post helpful? Yes | No

    Default

    Have you tried the attached ?
    Attached Images Attached Images  

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


    Did you find this post helpful? Yes | No

    Default

    here's yet another question, I couldn't
    find info about in the forum archives. How
    would one go about connecting an alpha
    numerical LCD (e.g. 1X16 HD44780) via
    74HC595, 74HC154, CD4094 or similar?
    I'm short of pins and I'd like to build a
    cheap serial LCD using 12C508/509 w/
    3-wire interface to the LCD. Sample source
    code would be appreciated. I'd prefer to
    use 74HC595 as I have an abundance of
    these Serial comm. on 12C508/509 is
    something I've never tried out, but I have
    2 or 3 laying around and I'd like to give it
    a try. Thanks very much in advance...


    I posted some code earlier, for a two wire interface.
    You use 2 wires, one for data, and one for clock. It has
    a extremely fast baud rate. (controllable to any speed, but in the 10's of thouasans uncontrolled) If you would like, I will repost
    the code.... I also have designed a single wire interface, to
    where a 12f675 can be used to control a LCD. with one wire.
    I use a 16f648A for the receiver of the data, and controller of the
    LCD. (for both cases). That way, a single 12f675 can control
    5 LCD's at once...separately and the 6th pin of the 675 is the MCLR or input pin.


    Dwayne
    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...

  4. #4
    atomski's Avatar
    atomski Guest


    Did you find this post helpful? Yes | No

    Default

    Guys, thanks for the reply. I have already
    built a serial LCD using 16F628 & MAX232,
    however I'd like to use a cheaper PIC like
    508/509 and one of the mentioned IC's.
    The schematics on the image looks ok, but
    I still don't know how to drive the HC IC
    I've never used 3-wire bus before. As I
    said earlier I would prefer using 74HC595
    as I have tons of these in my drawer. Any
    chance any of you guys could help me out
    with 595 pbp code? Thanks!

    --
    Sincerest regards,

    YZ7REA Vladimir M Skrbic
    4N7ATV Repeater Administrator
    YU7GHZ Radio Club President

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


    Did you find this post helpful? Yes | No

    Default

    @ DWAYNE

    ---> Glass is 1/2 full, not 1/2 emty

    Having thought about it I came to the conclusion:

    The glass is neither ½ full nor ½ empty,
    it is twice as big as it needs to be !

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


    Did you find this post helpful? Yes | No

    Default

    Hello NavMicoSystems,

    NMS>>@ DWAYNE

    ---> Glass is 1/2 full, not 1/2 emty

    Having thought about it I came to the conclusion:

    The glass is neither ½ full nor ½ empty,
    it is twice as big as it needs to be !<<

    <chuckle> Good one. But I like having that little extra room, just in case I can come out a little more ahead than someone else <g>.


    But, your response reminded me when I shot in the nationals in 2000. I shoot BareBow Olympic Style, and there is was a saying that us BareBow shooters used.

    to explain how it works, a BareBow has no sights, no added mechanical devices to help you... It is just a bow with a string on it. The other bows have all these fancy "precision" sights and stablizers, and all the widgets that allow you to shoot bullseyes all day. (A bullseye is a 3 1/2 inch diameter circle at 20 yards away). The saying went something like....

    A Recurve shooters attitude is "I hope I hit!, and is happy when he does hits" The other shooters attitude is "I hope I don't miss, and is embarrased if he does!" <g>


    Dwayne
    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...

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


    Did you find this post helpful? Yes | No

    Default

    @DWAYNE,

    we are running a bit off topic, but here is one more:

    That "blinky light" could be seen as something that...

    works, doesn't work, works, doesn't work. . . .

    and this is certainly something to be investigated in depht.

    @atmoski

    sorry, the last posts mgiht have been of no use on your way to solve the 3-wire LCD problem, but they probably have made you smile.
    Last edited by NavMicroSystems; - 18th May 2004 at 19:50.

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


    Did you find this post helpful? Yes | No

    Default

    Hello NavMicroSystems,


    NMS >>sorry, the last posts mgiht have been of no use on your way to solve the 3-wire LCD problem, but they probably have made you smile.<<

    Well, in actuallity, I was helping another Gent on the 3 wire system. Unfortunately I have not had the experience with the chips that he wanted to use.

    I have built a 2 wire system to control a LCD, and on the same principal, I built a single pin LCD controller. The baudrate is alarmingly fast, and you do not need any Serin or Serout rountines. That means any pin you want (that is a output) can control the LCD. I mainly did this, so that I could work with a bunch of 12f675's to control some LCD's and display data to it, when it reads the AD off of the 12f675.

    And it gives me a little more knowledge on how the timing is on these little PIC chips. They are a whale of a lot different than the Philips chips! But fun to work with...


    And by the way...Yes, I do enjoy good laughs, smiles, and conversations. Thanks!

    Dwayne
    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...

  9. #9
    atomski's Avatar
    atomski Guest


    Did you find this post helpful? Yes | No

    Default

    Hey guys no prb,

    I enjoy when people around me have a
    positive attitude. I would like to find
    out more about your 1 wire protocol,
    though. Hope you can shine some light
    on this subject for me please. Thanks!

    --
    Sincerest regards,

    YZ7REA Vladimir M Skrbic
    4N7ATV Repeater Administrator
    YU7GHZ Radio Club President

  10. #10
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I do recall posting this sometime over the last year... it could have been to the email forum... it may be of interest...
    Attached Images Attached Images  

  11. #11
    atomski's Avatar
    atomski Guest


    Did you find this post helpful? Yes | No

    Default

    Hey Mel,

    Yes, it looks nice and I'd like to try it out.
    However, as I said I have a whole pile of
    74HC595's and I'd like to use them. BTW
    I found a basicstamp source code for the
    3-wire LCD interface, but the syntax is so
    different I couldn't make it out

    Vlad

  12. #12
    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...

  13. #13
    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?

  14. #14
    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.

  15. #15
    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!

  16. #16
    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

  17. #17
    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.

  18. #18
    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.

  19. #19
    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.

  20. #20
    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...

  21. #21
    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