LCD serial backpacks


Closed Thread
Results 1 to 40 of 68

Hybrid View

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

    Default Yes

    Quote Originally Posted by skimask
    I get what you're cooking...I hope
    LCDOut is a familiar command, why mess with it? Replace it with SerOut, and you're done.
    My master plan includes throwing a few buttons on the unit and using a 4 wire hookup (v+, gnd, tx, rx, maybe an RJ11 phone connector).
    If my figuring is right, I'm going to throw in a bit of code that looks for a double $fe (or whatever) and that'll be my signal to send back a code if any keys are pressed. Using an equivalent to an LCDIn command might be a bit trickier (not by much), but that'll come later...

    The only big thing left to do is to find a dozen or so LCDs with backlights. ebay maybe?
    JDG
    Hi skimask,
    Yeah well partly, it is much easier to put a display in a difficult place if you only need to run 3 wires to it, whereas you may have 20 or so going to your main p/c board and it might be real inconveinient to run 20 to your display. I have bought LCD displays from sure electronics on ebay and thay are cheap. I did have one fail though, I think from ESD.
    http://cgi.ebay.com/ws/eBayISAPI.dll...tem=7617627971
    for larger order check his store: http://stores.ebay.com/Sure-Electronics

  2. #2
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by Joe S.
    Hi skimask,
    Yeah well partly, it is much easier to put a display in a difficult place if you only need to run 3 wires to it, whereas you may have 20 or so going to your main p/c board and it might be real inconveinient to run 20 to your display. I have bought LCD displays from sure electronics on ebay and thay are cheap. I did have one fail though, I think from ESD.
    http://cgi.ebay.com/ws/eBayISAPI.dll...tem=7617627971
    for larger order check his store: http://stores.ebay.com/Sure-Electronics

    Ain't that the truth!
    On every one of my little projects up until the last few, I've always had to design in a method for control and display, and always at the expense of pins, which could be better used for something else. So, on the last few, I built up a control/display module with 4 wires running to it using various LCDs/LEDs and switches/keypads laying around. For each different type of LCD, I have to modify the code to handle it, not to mention mount the thing up. I'm getting tired of that now also.
    It's about time I'm making this standardized module, with a standard LCD, in a standard mount, with standard buttons, using a standard 'library' to run it, and connect it with a standard cable.

    You want to go in and buy up a bunch of LCDs in bulk and save some $$$?

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

    Default $$$$ and it aint hex

    Quote Originally Posted by skimask
    You want to go in and buy up a bunch of LCDs in bulk and save some $$$?
    Sorry, no can do, I got a couple of extras right now ,no space, no bucks.
    JS

  4. #4
    skimask's Avatar
    skimask Guest

    Default

    Oh well...

    Any other takers? 16x2 (or whatever, I'm up for ideas) LCDs in some sort of a quantity buy, split the savings amongst a few of us?

    JDG

  5. #5
    Join Date
    Oct 2006
    Location
    Cape Town SA
    Posts
    23

    Default Much simpler for newbie like me

    That code with interupts and all is pretty hot, but going back to the very first question all he wanted to do was emulate a serial LCD, ie PIC is doing nothing else. I knocked this up yesterday and it works, and doesn't miss anything, very simple - like me! Go on eat me alive!

    A back space key tells pic next char is a command - see commands in the select case area
    A double back space makes it spit out a pangram back at you.


    DEFINE LCD_DREG PORTC 'DATA PORT
    DEFINE LCD_DBIT 4 'STARTING BIT (0 OR 4)
    DEFINE LCD_RSREG PORTC 'REGISTER SELECT PORT
    DEFINE LCD_RSBIT 1 'REGISTER SELECT BIT
    DEFINE LCD_RWREG PORTC 'READ/WRITE SELECT PORT
    DEFINE LCD_RWBIT 2 'READ/WRITE SELECT BIT
    DEFINE LCD_EREG PORTC 'ENABLE PORT
    DEFINE LCD_EBIT 0 'ENABLE BIT
    DEFINE LCD_BITS 4 'BUS SIZE (4 OR 8)
    DEFINE LCD_LINES 2 'LINES IN DIPLAY
    DEFINE LCD_COMMANDUS 2000 'CMD DELAY TIME IN uS
    DEFINE LCD_DATAUS 50 'Data DELAY TIME IN uS
    define Osc 4
    '************************************************* ***********
    ADCON1 = 7 'disable A/d work digital
    TRISB = %00000000 'unused port b set to o/p
    TRISA = %00000000 ' PortA outputs
    TRISC = %00000000 ' PortC outputs
    OPTION_REG.7 = 0 ' Enable PORTB pull-ups

    'T2400 con 16780 '2400bd, driven, inverted, no parity
    T2400 con 396 '2400bd, driven, true, no parity
    'will need to use rs232 inverter
    comsout var PORTA.0
    comsin var PORTA.1
    datarray var byte[1] 'incoming array on rs232
    '************************************************* ***********
    start:
    Pause 500 ' Wait for LCD to startup
    Lcdout $FE, $0C 'turn cursor off


    Lcdout $fe, 1 ' Clear LCD screen
    Lcdout $fe, 2 ' go home
    Lcdout "GPL PIC System"
    Lcdout $FE, $C0 'move cursor to begin of line 2
    Lcdout "Serial in at ",DEC T2400

    Pause 1000 ' Wait 1 second
    Lcdout $fe, 1 ' Clear LCD screen
    '************************************************* ***********
    main: while 1 'forever loop
    serin2 comsin, T2400, [ datarray[0]] 'get a char
    if datarray[0] = 8 then 'next byte is a LCD command after BS received
    serin2 comsin, T2400, [ datarray[0]]
    select case datarray[0]
    case 48 '0 = Clear LCD screen
    Lcdout $fe, 1
    case 49 '1 = move cursor to begin of line 1
    Lcdout $fe, 2
    case 50 '2 = move cursor to begin of line 2
    Lcdout $fe, $C0
    case 51 '3 = move cursor to begin of line 3
    Lcdout $fe, $94
    case 52 '4 = move cursor to begin of line 4
    Lcdout $fe, $D4
    case 8 'BS again so transmit a pangram
    gosub send
    case else 'do nothing
    end select
    else
    Lcdout str datarray\1 'show 1 char to LCd
    endif
    wend

    send: serout2 comsout,T2400,["How quickly daft jumping zebras vex",13,10]
    return
    '************************************************* ***********

    END
    '************************************************* ***********

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

    Default Now Why Would Anybody Do That ?

    Quote Originally Posted by websmith
    Go on eat me alive!
    THERE ALWAYS MULTIPLE WAYS OF DOING ANYTHING. There is nothing wrong with brewing an alternative, I will study your code and learn something from it, therefore I am grateful for your post. Thank You, JS

  7. #7

    Wink

    hey joe! almost started singing that hendrix song. lol. Did you ever finish polishing off the bells and whistles? i'm a newbie and already tired of all the display wires, which keep getting pulled out of the breadboard! weeeeeeee

Similar Threads

  1. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  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. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Serial LCD
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th November 2007, 08:31
  5. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07

Members who have read this thread : 1

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