how? 2 wire lcd with pbp?


Closed Thread
Results 1 to 24 of 24
  1. #1
    Join Date
    May 2005
    Posts
    33

    Default how? 2 wire lcd with pbp?

    is it possible to use shiftout with 2 wire lcd configuration? or do we have to shift the datas and strobe the data and clock pins manually

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


    Did you find this post helpful? Yes | No

    Default

    i'm not sure of your of your actual LCD but more than often they use simple serial communication @2400/4800/9600 bauds. Use Hserout or Serout statement.

    P.S.: for all your future post, please include more details.. part #, web link, provider or any info you have. That help us to give you the right answer.
    Steve

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

  3. #3
    Join Date
    May 2005
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    thnx for replying mister e. sorry for the lack of information... wat i eamnt was a 2 wire lcd using a using a shift register 74ls174 wic uses a datapin and a clockpin... http://www.rentron.com/Myke1.htm i think predko did it. i've seen melanie showing a same example too but wondering if someone could show me is it possible to use shiftout with this circuit and sending a LCDOUT string.

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Smile

    HI,

    Another solution is using an I2C device like the PCF 8574 ...that allows bus sharing.

    Alain

  5. #5
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    I think the questions are:

    Can I redirect the output of the PicBasic LCDOUT command to my 2-Wire LCD Interface?
    (I am using an LCD module with a Hitachi 44780 controller or equivalent).

    Would I have to write my own LCD routines in order to use my 2-Wire LCD Interface?
    (I am using an LCD module with a Hitachi 44780 controller or equivalent).

    Luciano

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


    Did you find this post helpful? Yes | No

    Default

    I do recall posting this a couple of years back... you will have to use SHIFTOUT or similar commands to drive it.
    Attached Images Attached Images  

  7. #7
    darkman's Avatar
    darkman Guest


    Did you find this post helpful? Yes | No

    Default

    @Melanie please update here an example code for your circuit
    thanks..

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


    Did you find this post helpful? Yes | No

    Default

    Aw, c'mon... build it and try it... if I told you all the answers it takes all the fun out of playing... pretty obvious if you did a truth-table for the configuration of the 74LS174.

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


    Did you find this post helpful? Yes | No

    Default

    Hello Melanie,

    Melanie>>if I told you all the answers it takes all the fun out of playing...<<

    You have touched on a very important point. How is one to learn, if they don't play a little? Get their feet wet? At least TRY to some degree.

    I have been wondering if college students bring their assignments here the day before they are due, and ask for the answers...yet has no code to show for their own... OH well...

    Take care... Keep up the great work.

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

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


    Did you find this post helpful? Yes | No

    Default

    >> I have been wondering if college students bring their assignments here...

    Now you've hit it... either that or somewhere out in the world is a money-spinning application for dimming three LED's that I can't figure...

  11. #11
    Join Date
    May 2005
    Posts
    33


    Did you find this post helpful? Yes | No

    Default to darkman

    referring to myke's page at rentron.com... we haf to shift out 6 bits... bit 6 is a dont care i guess. while bit 5 is the rs bit and the bottom four are the data bits.. havent tried shifting out yet coz searching for my 74ls174 wic i misplaced somewer... once tested and running i'll post it..

  12. #12
    darkman's Avatar
    darkman Guest


    Did you find this post helpful? Yes | No

    Angry

    I'm delete my account in this forum because not support
    I'm not use now pic basic pro I'm delete pbp directory in my pc
    I'm using now C languege with full support

    @mel
    please delete my account in this forum thanks...
    Last edited by darkman; - 19th May 2005 at 08:57.

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


    Did you find this post helpful? Yes | No

    Default

    The definition of "Support" is where there is a problem with the product that needs addressing. I think everyone will agree that this forum goes way beyond that... Ultimately, people need to be nudged into thinking for themselves (even if it is as simple as reading the Datasheet, or Manual, or Searching the Forum or MeLabs Archives) - because always asking for an answer and expecting it to be handed to you "ready-packaged, debugged and royalty-free" on a plate is not the way to learn. This will apply to whatever compiler you chose to use.

  14. #14
    Join Date
    May 2005
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    darkman stop being a loser... anyway for the rest who are viewing i've tried and its impossible with shiftout.. referring to myke's site on the 2 wire lcd the way the datapin and clockpin toggles are different frm ****out? anyway i've tried the shiftout command and doesnt work... tried manual subroutines still aint working... any clues melanie? u dnt haf to giv the answer just clues...

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


    Did you find this post helpful? Yes | No

    Default

    I assume you successfully initialised your LCD to work in 4-bit mode before throwing data at it?

  16. #16
    Join Date
    May 2005
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    do i haf to always shift out 6 "0"s b4 sending every instruction set? how long do i ahf to pause b4 sending the next instruction?

  17. #17
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    What about I2C?

    * * *

    Nuts & Volts Column #109 May 2004 by Jon Williams:

    Easy IO – Easy LCD Terminal
    (I2C to LCD + Pushbuttons).

    http://www.parallax.com/dl/docs/cols.../col/nv109.pdf
    http://www.parallax.com/dl/docs/cols...code/nv109.zip

    Microchip MCP23016 16-Bit I2C™ I/O Expander
    http://ww1.microchip.com/downloads/e...Doc/20090b.pdf

    Luciano

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


    Did you find this post helpful? Yes | No

    Default

    Actually I just LOVE the MCP23008 from Microchip... you could do it with that too (using LCD 4-bit mode)...

    I find that the skinny DIP (16F876/P type) is a nice economic package... but sometimes you just plain run out of I/O's... the 40-pin plastic package (16F877/P) takes up far too much real-estate and additional expense, so adding I/O's with the MCP23008 or 20016 is a very easy and neat solution - and they've got weak pull-up's too! Just perfect for remote Keypad/Display interface applications.

    There's a lot of ways you can do LCD down two wires... (the obvious is to put a PIC at the LCD end), but at only a few cents for the package, the 74LS174 method (strictly it's 3-wires if you count Ground) has to be the rock-bottom cheapest.

    PS... nimonia... use the same timing as PBP's LCD defines.

  19. #19
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Smile

    Hi, nimonia

    Devantech sells a ready to use I2C LCD ...

    Here, for example :
    http://www.robopolis.com/produit/156...I2C--serie.php

    or Here : http://www.robot-electronics.co.uk/s..._LCD022058.htm

    sooooooo easy.

    Alain
    Last edited by Acetronics2; - 21st May 2005 at 13:30.

  20. #20
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Thumbs up Just a tiny correction.

    "adding I/O's with the MCP23008 or 20016 is a very easy and neat solution"

    Melanie is referring to the MCP23016, in case anyone is trying to find a 20016.

    I agree, I'm in love with the MCP23008/16 chip (8 and 16 I/O pins). It's an awesome way to increase I/O pins on older chips like the 16F628 (a good strong and proven workhorse if you ask me).

    The 16F877 is better, but at a cost. If you don't need more I/O pins AND extra memory, then it's overkill in a lot of applications.

    Robert
    Last edited by Demon; - 26th September 2005 at 02:04.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

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


    Did you find this post helpful? Yes | No

    Smile Hope this helps

    Hi,

    This is a serial LCD using a PIC. It takes commands in the LCDOUT style, hence is easy to incorporate.

    Regards

    Sougata
    Attached Files Attached Files

  22. #22
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Exclamation Timing

    One note to those having problems with these I/O expanders, remember to scroll all the way down the PDF and check out the timing requirements.

    MCP23008: top of page 23.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  23. #23
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default

    Sougata,

    I checked your attachment and I noticed something odd. The LCD is parallel, it's the communication to the PIC that is serial.

    Or am I more confused than I think I am?

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

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


    Did you find this post helpful? Yes | No

    Default It is a normal LCD with a dedicated PIC for serial com

    Hi there,

    Parallel LCDs are easily available and cheaper (at least here in India). The SELD is a dedicated PIC programmed with PBP that drives a normal parallel LCD. The PIC takes its command via a serial input thus freeing up resources on the main controller.

    I personally use a PIC18F452 based circuit that uses interrupt based serial routine handling and gives me the freedom to use buttons and indicators at the same time. A complete user interface module you can say. This reduces wiring in my panel from the main coontroller and leaves the controller more useful for other sensing and control tasks.

    Regards

    Sougata

Similar Threads

  1. lcd stops after about 5 minutes and gets stuck
    By robertpeach in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 15th September 2009, 12:03
  2. one wire
    By karenhornby in forum General
    Replies: 7
    Last Post: - 18th June 2008, 20:24
  3. cant get my Lcd to work using Pic18f452
    By civicgundam in forum General
    Replies: 13
    Last Post: - 7th October 2007, 00:13
  4. encoder wowes
    By wallaby in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 6th December 2005, 21:56
  5. 2 decimal display on LCD
    By pt3rg in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 7th January 2004, 14: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