Serial LCD controller for $17...

Grogster

Senior Member
Hi all.
I thought some of you might find this interesting:

http://www.sparkfun.com/commerce/product_info.php?products_id=258

Some of you may already know about it.

This unit piggy-backs onto many common parallel LCD's and can talk in various different serial baud rates. I know RevEd do their own serial LCD module, but the last couple of times I have wanted to use an LCD, the only thing on offer is the full RevEd module with LCD, whereas just the serial interface is what I really want, as I have stock of various LCD modules.

This thing is very cheap, and has several useful features, but does not have the RTC ability of the RevEd design.

Just thought the link might be useful for others...
 

kevrus

New Member
Rev-Ed do supply just the serial firmware chip, part no. FRM010. Ive used them a few times and they are excellent
 

Grogster

Senior Member
Can't get them in NZ, unless I have not found all the suppliers...
Anyone reading this from NZ or Australia know who stocks the RevEd chip?
If so, that might be even better. :)

I am unable to find this product number on the RevEd main page, and I have looked through most of the site.

Do you have a link?
 
Last edited:

Grogster

Senior Member
Great, thanks. :)

Do you know if you can use 4-line LCD's with this chip, or does it only support 2-line modules?
Provided you did not clear the LCD before sending data, then there should be no problems, but although I have downloaded the PDF for this chip, they don't mention if you can use LCD's with more then 2 lines...

Also, do you or anyone else know what the input-buffer size is for this chip?
 

hippy

Ex-Staff (retired)
Do you know if you can use 4-line LCD's with this chip, or does it only support 2-line modules?

I believe it should work and I'm sure at least someone has said it did. Whether 1 or 2 lines is usually needed to be known to send the right configuration sequence to the LCD HD47780 controller, 4-line configuration is the same as 2-line configuration. Configure a 4-line display as 1-line and I recall only lines 1 and 3 display.

[ Added ] Post #2 for confirmation it works with 4 line displays ... http://www.picaxeforum.co.uk/showthread.php?t=9238


Also, do you or anyone else know what the input-buffer size is for this chip?

I'm not sure there is any buffering as being single chip and able to invert the input signal means it uses a software driven serial receiver.

Buffering shouldn't normally be necessary anyway, there's usually plenty of time to get whatever needs to be done on the LCD during the stop bit of the received data byte. Only for Clear Screen is a delay needed, Home, cursor move and overwrite should each happen in just a few microseconds.

The Sparkfun module appear to do more than FRM010 ( such as auto line scrolling ) which would likely necessitate buffering, but that could also be one reason it's three times as expensive as the FRM010 ( excluding tax, P&P ).
 
Last edited:

eclectic

Moderator
Two displays (LCD + FRM10) running from one 08M.
One 4 x AA NiMH power supply.

And, I must learn how to spell.
And, I really must dust my scanner! :)

e
 

Attachments

boriz

Senior Member
Can’t you just buy a 14M for £2 and use Hippys LCD code with a small mod to receive serial?
 

hippy

Ex-Staff (retired)
Can’t you just buy a 14M for £2 and use Hippys LCD code with a small mod to receive serial?
It's a solution but not as usable as FRM010. The PICAXE takes longer to execute than a dedicated interface chip so it is necessary to include delays after every byte sent or run at a very low baud rate. You often cannot simply connect it up to an existing SEROUT/SERTXD line and expect it to work perfectly without dropping characters.
 

KIGX

Member
Greetings, I'm a Newbie around here. Have been working towards having a display for temperature etc - right now I'm using a pulse counter I made from 7-seg LEDs and 4026 counter chips - just pulse up to the Temp I want. Pretty crude but it works fine.

I'm pretty clueless in LCDs - does anyone know of a tutorial, either on the PICaxe forum or elsewhere to make me less clueless?

I like the looks of phanderson's 20X4 LCD modules but don't know how they work. He has a programmed chip that I assume drives the LCD but how do I drive the driver chip? Does he send instructions with it? Has anyone put a working example of it on the forum? I've searched around on the forum but I can't seem to phrase the search well enough to be useful.

Thanks
 

westaust55

Moderator
Greetings, I'm a Newbie around here. Have been working towards having a display for temperature etc - right now I'm using a pulse counter I made from 7-seg LEDs and 4026 counter chips - just pulse up to the Temp I want. Pretty crude but it works fine.

I'm pretty clueless in LCDs - does anyone know of a tutorial, either on the PICaxe forum or elsewhere to make me less clueless?

Thanks
You do not state whether you are considering parallel or serial interfacing to the LCD module.
Parallel requires more output lines and some bit-bashing of the data to send it to the LCD. It has already been done by others and a search of this forum will find past examples of code.
Serial interfacing uses the same parallel LCD module with a serial adapter (piggy back) board. These can use the inbuilt PICAXE serout command and only need a single output.


Have a look at the AXE033 datasheet on the Rev Ed website.
http://www.rev-ed.co.uk/picaxe/

Select the Datasheet Tab and then part way down click All PIXACE Datasheets.
Then select the AXE033 Serial LCD/Clock Kit – this LCD has both Serial and i2c comms modes.
Serial mode is the easiest and you can later use the i2c mode (with appropriate PICAXE) to directly read an option real Time Clock.
 
Last edited:

manuka

Senior Member
KIGX: You may want to check a 20M +7 segment LED +DS18B20 approach => http://www.youtube.com/watch?v=Fw0lHWN1pj0 . This is easier to read across a room when you are still in bed under a dozen blankets. Brrrr....

But LCDs are naturally the display way to go. Although Hippy himself has mentioned the need for pauses etc with his barebones 14M LCD approach, it may well be worth reflecting (pun..) that typical PICAXE LCD displays are for data that's quite sluggishisly refreshed. Temps etc & messages such as "New high score", "Hippy for King" etc have inherently slow changes (especially the latter).

As Hitachi style parallel LCDs abound on old laser printers etc, this £2 14M approach may be just the sort of thing "smell of an oily electron" schools have been looking for. IMHO 14Ms have been crying out for a killer application as well. The previous Hippy 18X approach ran to ~twice this cost, which may have meant a budget blowout for skinflint needs.

For those who've just come in, herewith Hippy's mid 2008 14M code. See =>http://www.picaxeforum.co.uk/showthread.php?p=67665 for more details
Code:
;                                        .----.
;       Out 5 -------------------------->| 14 | DB7
;       Out 4 -------------------------->| 13 | DB6
;       Out 3 -------------------------->| 12 | DB5
;       Out 2 -------------------------->| 11 | DB4
;       Out 1 ----------------------.    | 10 | DB3
;       Out 0 -------------------.  |    |  9 | DB2
;                                |  |    |  8 | DB1
;       +V    --------.------.   |  |    |  7 | DB0
;                     |      |   |  `--->|  6 | E
;                    .|.     |   |  .--->|  5 | /WR
;               10K  | |<-.  |   `--|--->|  4 | RS
;               Pot  |_|  `--|------|--->|  3 | Vo
;                     |      `------|--->|  2 | Vcc
;       0V    --------^-------------^--->|  1 | Vss
;                                        `----'

        SYMBOL  RS        = 0         ; 0 = Command   1 = Data
        SYMBOL  E         = 1         ; 0 = Idle      1 = Active
        SYMBOL  DB4       = 2         ; LCD Data Line 4
        SYMBOL  DB5       = 3         ; LCD Data Line 5
        SYMBOL  DB6       = 4         ; LCD Data Line 6
        SYMBOL  DB7       = 5         ; LCD Data Line 7

        SYMBOL  RSCMDmask = %00000000 ; Select Command register
        SYMBOL  RSDATmask = %00000001 ; Select Data register

        SYMBOL  getb      = b11
        SYMBOL  bite      = b12
        SYMBOL  rsbit     = b13

    PowerOnReset:

        GOSUB InitialiseLcd

    DisplayTopLine:

        EEPROM 6,("Hello")

        FOR getb = 6 TO 10
          READ getb,bite
          GOSUB SendDataByte
        NEXT

    MoveCursorToStartOfSecondLine:

        bite = $C0
        GOSUB SendCmdByte

    DisplayBottomLine:

        EEPROM 11,("World!")

        FOR getb = 11 TO 16
          READ getb,bite
          GOSUB SendDataByte
        NEXT

        END

    InitialiseLcd:

        FOR getb = 0 TO 5
          READ getb,bite
          GOSUB SendInitCmdByte
        NEXT

        ' Nibble commands - To initialise 4-bit mode

        EEPROM 0,( $33 )    ; %0011---- %0011----   8-bit / 8-bit
        EEPROM 1,( $32 )    ; %0011---- %0010----   8-bit / 4-bit

        ' Byte commands - To configure the LCD

        EEPROM 2,( $28 )    ; %00101000 %001LNF00   Display Format
        EEPROM 3,( $0C )    ; %00001100 %00001DCB   Display On
        EEPROM 4,( $06 )    ; %00000110 %000001IS   Cursor Move

                            ; L : 0 = 4-bit Mode    1 = 8-bit Mode
                            ; N : 0 = 1 Line        1 = 2 Lines
                            ; F : 0 = 5x7 Pixels    1 = N/A
                            ; D : 0 = Display Off   1 = Display On
                            ; C : 0 = Cursor Off    1 = Cursor On
                            ; B : 0 = Cursor Steady 1 = Cursor Flash
                            ; I : 0 = Dec Cursor    1 = Inc Cursor
                            ; S : 0 = Cursor Move   1 = Display Shift

        EEPROM 5,( $01 )    ; Clear Screen

        RETURN

    SendInitCmdByte:

        PAUSE 15                        ; Delay 15mS

    SendCmdByte:

        rsbit = RSCMDmask               ; Send to Command register

    SendDataByte:

        pins = bite / $10 * 4 | rsbit   ; Put MSB out first
        PULSOUT E,1                     ; Give a 10uS pulse on E
        pins = bite * 4 | rsbit         ; Put LSB out second
        PULSOUT E,1                     ; Give a 10uS pulse on E

        rsbit = RSDATmask               ; Send to Data register next

        RETURN
 
Last edited:

westaust55

Moderator
Last edited:

fernando_g

Senior Member
Grogster: Thanks for posting this very useful link...I've been pondering using a standalone serial display for a small project I'm working on.

One question, though... have you used these displays with a PICAXE at the default 9600 bps setting? Or do you have to scale down to 2400 bps?

I know that the PHAnderson also sells a similar kit that defaults to 9600 bps, but for PICAXE users it offers a 2400 bps variant.

I've used the AXE033 display in the past, but it has never been clear to me whether the 2400 bps requirement is due to the AXE033 or PICAXE limitations.
 

hippy

Ex-Staff (retired)
The 2400 baud 'standard' is really for convenience. Most of the current PICAXE range support 4800 baud, many 9600 and some even higher but all PICAXE's ( new and old, even very old in fact ) can support 2400 baud so it's a sensible "hassle-free" baud rate to choose.

2400 baud sounds slow but isn't that bad; a 2x16 display can be completely written in about a sixth of a second. Lower baud rates often mitigate problems higher speed serial may have.
 

BCJKiwi

Senior Member
Used the 9600baud unit and setfreq m8 to get the default terminal comms (sertxd) or other serial to match - makes it more universal if you want to move the LCD to another application.
 

manuka

Senior Member
A Kiwi teacher,seduced by a Surplustronics ~US$6 8x2 => www.surplustronics.co.nz/shop/product-LA0295.html ,recently emailed re it's possible use in a "barebones" PICAXE LCD setup. It's (predictably) ex China,being a SureElectronics DM-LM001 => http://www.sureelectronics.net/pdfs/DE-LM001.pdf.It has classic Hitachi style HD44780 control,with presumably 4-bit interface suitable for Hippy style 18X/14M 6 output driving.

Naturally,when compared with regular 16x2 etc,such an 8x2 raises minimalist "how low can you go" display issues! However compact LCDs may suit small micro. projects where more than just a blinking LED is needed for feedback, & educationally such a nifty LCD greatly appeals. See => www.youtube.com/watch?v=0iirQQ9yEDI

Any thoughts/experiences PICAXEing such compact 8x2 LCDs? At least their p&p should be lower! Stan.

EXTRA:See the SURE (@~US$7) 8x2 USB demo board DE-LM204 => www.sureelectronics.net/goods.php?id=684
 

Attachments

Last edited:

fernando_g

Senior Member
The 2400 baud 'standard' is really for convenience. Most of the current PICAXE range support 4800 baud, many 9600 and some even higher but all PICAXE's ( new and old, even very old in fact ) can support 2400 baud so it's a sensible "hassle-free" baud rate to choose.

2400 baud sounds slow but isn't that bad; a 2x16 display can be completely written in about a sixth of a second. Lower baud rates often mitigate problems higher speed serial may have.
So, if I understand your post correctly, the 2400 baud is an AXE033 LCD requirement only..... I can have the PICAXE drive other LCD displays @ 9600 if supported. Correct?
 
Last edited:

KIGX

Member
Thanks everyone. I downloaded and printed some manuals and code from phanderson and wulfden. I'll do my homework and then see where I am at...

Westaust55 asks if I'm thinking of using serial or parallel. Not knowing how the things really worked I had no preconceived notion. Since I have been only fiddling with 08Ms I guess serial out of a PICaxe into something would be my natural inclination - 08Ms don't have very many pins and I know how to use the serout cmd. (I have Hippy's 14M LCD code to figure out what he did). It got me wondering though, is anything really parallel? You can flip a pile of pins at once using a pins cmd but they can't possibly all change at the same time can they? I suppose it is like all things - it's all relative - and on the time scale (baud rate?) that 'communication' is occuring it just looks like all the pins flipped at once because they flipped close to the inherent speed of the processor whereas the baud rate is a lot slower - 4MHz processor versus 4800 bps = 0.0048MHz ~1000X difference...?
 

hippy

Ex-Staff (retired)
Any thoughts/experiences PICAXEing such compact 8x2 LCDs

I've use 8x2 and even 8x1 in the past ( not with PICAXE ). It really depends on what you need to display and tuning the application to suit the display size. Some things work, some things don't, you just have to put more effort into it and in getting the aesthetics right.

In my experience it's usually the case that bigger is better, or at least easier to work with. Going smaller means more compromise in what can be displayed and how, at some point going too far either way and it sort of 'becomes a nonsense' for what you're trying to do. One has to decide what one is trying to achieve, does it need a certain display to be a viable result, or does one have to work with what one can get or afford ?

No reason not to use multiple small displays when you can get away with it or your budget doesn't stretch further. When there is some leeway, getting what you want can often be worth the extra cost.

As you also suggest, some projects can benefit from a display which hadn't been considered and something cheap and cheerful can be very useful. Even a humble battery monitor can look so much more impressive and informative with a voltage display than a LED which says it's in the acceptable range.
 

westaust55

Moderator
Serial vs parallel LCD

Thanks everyone. I downloaded and printed some manuals and code from phanderson and wulfden. I'll do my homework and then see where I am at...

Westaust55 asks if I'm thinking of using serial or parallel.

It got me wondering though, is anything really parallel? You can flip a pile of pins at once using a pins cmd but they can't possibly all change at the same time can they?
The command LET PINS = xx will set all pins simultaneously.

Even if you use something like a 74HC595 shift register, which has been done before to drive a parallel LCD module, you send the data to the 74HC595 one bit at a time but then use the Latch command to the 74HC595 to transfer all bits to the '595 output pins simultaneously.

However keep in mind that such bit-bashing will use up a fair portion of the available program space on a 08M. As such while it can be done, the one signal serial modules which "piggy back" only the parallel LCDs are a good way to go to use the least IO pins.
 

westaust55

Moderator
Aztronics - A South Aust electronics parts supplier

Aztronics are not just limited to those in Adelaide or South Aust.

http://www.aztronics.com.au/

I have purchased chips from them in the past. Their prices are good and they have some less popular items that many others such as Dick Smith, Altronics and Jaycar do not.
 
Top