Miniature 16x2 LCD display

Haku

Senior Member
Thought I'd share my latest acquisition and achievement at getting it to work: miniature 16x2 LCD displays from the same place those cool mp3 modules came from http://www.mdfly.com/index.php?main_page=product_info&products_id=201
They don't have a serial backpack so armed with info & code from this site http://www.jrhackett.net/ I removed the pre-attached flat cable and wired up the 1mm pitch connector pads of one of the displays to some normal 0.1" pin header using some 'high speed' solid core IDE cable and hooked it into a 18m2 on a breadboard:



So tiny it's almost cute ;)

Here's a size comparison with a 'normal sized' 20x2 LCD display:



I'm thinking of doing a 'dead bug' with a SMD 20m2 to the back of the 3 miniature LCD displays I bought as serial backpack setups. Shame they didn't have an LED for a backlight despite the soldering points for an LED but it's very readable even in low light.
 

manuka

Senior Member
And a great price of $US3.95, plus of course p&p should be modest with it's 47mm x 20mm size as well! FWIW Andrew Hornblow has managed easy 20X2 driving of a normal 16x2 LCD.
 

westaust55

Moderator
As already states, A great find and thanks for sharing the information.

From photo beside 20x2 display, it would appear to be about 75% the size of a normal 16x2 display.

With the new 14M2, you could potentially even have the driver code for 4-bit mode into a 14 pin chip for even smaller packpack space.
 

Haku

Senior Member
I first saw this sized LCD screen on the uWatch, a PIC powered DIY scientific wristwatch by a guy in New Zealand http://www.calcwatch.com/
Wasn't until I found the Mdfly site that I found the screen at an affordable price with international shippping (I note when I started this thread their stock count was 91, now 74) and only recently bought them because only now I felt confident I'd be able to get a non-serial'd LCD screen working, which I did first time :D

Couple of other notes about the screen, I wired a 10k pot to the contrast pin but found it wasn't needed as simply grounding it gave the best picture, the 1mm flat cable has glue over the solder which needed to be carefully sliced off with a knife before desoldering the cable to put my own on, so if you're buying some it might be worth getting the corresponding 1mm pitch socket http://www.mdfly.com/index.php?main_page=product_info&products_id=200 but either way the small size comes with a price: fine soldering skills needed.

As the SMD 14m2 is out of stock, the SMD 20m2 or 20x2 seem the logical choice because of the high pin count and they can do a straight 8-bit parallel connection to the LCD screen which the 14 pin Picaxes can't do, enabling faster updating. I'm going to see what I can do with my 18m2+LCD screen in terms of turning the Picaxe into a serial driver before deciding which SMD to buy.
 

Haku

Senior Member
My mistake, everyone on the internet is the same distance from me, about 3 foot, the distance to my screens :D


After much frustration & testing I finally figured out how to get the Picaxe to talk to these little LCD screens in 8 bit mode, very very fast.

The LCD screen is hooked into an 18m2 with these connections:
LCD pin 4 to 18m2 pin 17 (c.0)
LCD pin 6 to 18m2 pin 18 (c.1)
LCD pins 7-14 to 18m2 pins 6-13 (b.0-b.7)

With help from the code on http://www.jrhackett.net/ & searching this forum, I magic'd up this little program which will put two full lines of text on the screen in 10.3 milliseconds (ie theoretically being able to update the entire screen 97 times a second) with the 18m2 running at 32mhz:

Code:
' Very fast 8-bit LCD display test code

#picaxe 18m2

data  0,("PICAXE 18M2  LCD")               ' first line of LCD display test
data 16,("Serial   Display")               ' second line of LCD display test

symbol cmd = 0                             ' LCD command datatype
symbol txt = 1                             ' LCD ASCII text datatype
symbol enable = c.1                        ' LCD enable pin
symbol Datatype = pinc.0                   ' LCD register select signal pin
symbol char = b1
symbol index = b2

setfreq m32

dirsb=255                                  ' set portb to output
output c.0,c.1                             ' set control of LCD lines to output

'initialise LCD
pinsb=56:pulsout enable,1                  ' 8 bit 2 line LCD
pinsb=12:pulsout enable,1                  ' cursor off
pinsb=1:pulsout enable,1                   ' clear screen
pause 10                                   ' allow setting to take effect

do

 pinsb=128:Datatype=cmd:pulsout enable,1   ' put cursor to beginning of first line

 Datatype=txt                              ' set datatype to ASCII characters
 for index = 0 to 15
  read index, pinsb                        ' read character from EEPROM into port b
  pulsout enable,1                         ' output character to LCD
 next index
	
 pinsb=192:Datatype=cmd:pulsout enable,1   ' put cursor to beginning of second line

 Datatype=txt                              ' set datatype to ASCII characters
 for index = 16 to 31
  read index, pinsb                        ' read character from EEPROM into port b
  pulsout enable,1                         ' output character to LCD
 next index

 pause 2000                                ' wait 1/4 second
 
 pinsb=1:Datatype=cmd:pulsout enable,1     ' clear screen
 
 pause 2000                                ' wait 1/4 second

loop
(BTW if you put 16 "read" & "pulsout" commands instead of the loops it more than doubles the speed)

As the update rate is near the equivilant of serout at 38400 baud it means I should be able to rework this program to accept serial data at up to 19200 baud for displaying on the screen hopefully without a problem. (hopefully he says :) )
 
Last edited:

graynomad

Senior Member
According to the MBfly page.

Built in Green Backlight
But that page is a bit sus because it shows a different display, one with no mounting holes which is pretty useless. But yours does have holes.
 

Haku

Senior Member
Sorry for the confusion, I bought my 3 modules through their eBay listing: http://www.ebay.co.uk/itm/300530403111 but I posted their main website because I thought anyone wanting a module would be more at ease than buying through eBay.
Usually everything they sell through eBay is identical to what they sell on their website except it appears not in this instance, looking closely the difference is their website version has no mounting holes but does have LED backlight, and mine has mounting holes (and wider) but no LED backlight.
 

SAborn

Senior Member
For the Aussie members, Jaycar sells one about the same size, but the last time i looked they dont list a data sheet for them and it was a pain to figure the correct pinouts.
 

Haku

Senior Member
I wrote a simple, though not very robust, serial-to-LCD piece of code which read and processed characters one at a time from a serin command but doesn't work at baud rates above 4800 even with the 18m2 running at 32mhz.

Meaning to get a very fast update on the screen (so the main Picaxe isn't heavily delayed by the serout command) I need to buy a pre-programmed serial-to-LCD firmware chip which can take 19200 baud like this SMD one http://www.phanderson.com/lcd106/lcd117_soic.html , or use a Picaxe with enough spare pins (10 for 8-bit connection, 6 for 4-bit connection).

But when speed isn't an issue I could use a shift register to reduce the Picaxe pin use count down to 3. I think my first project using one of these mini screens will be running off a spare 28x2 I have kicking around with a 10mhz resonator; high speed and plenty of pins :)
 

radiogareth

Senior Member
Sadly now out of stock and despite some trawling I can't find any more listed on the www
??? I really need a couple of these to put in the front panels of a PYE ex-PMR radio I have converted. (Amateur radio).
 

radiogareth

Senior Member
Thanks, I'd stretch to one if the shipping wasn't so punitive. I'm surprised that China eBay isan't awash with them, they are used on the e.g. SARK aerial analyser which is where I first saw one. Search terms seems to be compact and 3mm.....no rush at this point, but its what I need.
 

Haku

Senior Member
There used to be one or two sellers with that particular size 16x2 screen on eBay, and you had to search hard to find them in amongst the sea of cheapie 'standard sized' displays, I guess the fact that it uses a FFC instead of 0.1" pin header connectors put off a lot of hobbyists.

It appears the version without backlight is still being manufactured though, try this search:

http://www.aliexpress.com/wholesale?SearchText=LMB162XBC
 
Last edited:

radiogareth

Senior Member
Thanks Haku, $5 US each with shipping will do just fine. Just have to wait for them to arrive a week or two. The cheapest one seems to show the presence of a backlight insert....
 

Haku

Senior Member
Yes it does look like some there do have backlights as indicated by the bit of white plastic sticking out from under the LCD.

The few I have, the screens are identical sizes but the boards are slightly different size because ones with mounting holes don't have a backlight, and ones with a backlight don't have mounting holes...
 

radiogareth

Senior Member
I bought 1 lot of these (2). http://www.aliexpress.com/item/Free-shipping-2pcs-lot-LC1629-1602ALCD-display-module-sreen-small-size-Compatibel-HD44780-OM16213-FMA16213-LMB162XBC/2052385505.html?spm=2114.01020208.3.2.S88vAh&ws_ab_test=searchweb201556_2,searchweb201644_3_79_78_77_82_80_62,searchweb201560_1

They do indeed have a back light and also 4 fixing holes. Supplied with the ribbon cable and a socket for the other loose end too. Might make up a little adaptor PCB to go between the supplied socket and the AXE 132 driver. It will be a bit of a game soldering individual wires to it!
 

radiogareth

Senior Member
The main problem with these displays is simply connecting to them 1 mm per trace including insulation space. Mine came supplied with a spare socket each and the required rigid but very thin ribbon cable. With a magnifier its possible to cut and separate each 'wire'. I wanted mine a bit shorter so gave the top printed surface some stick with hot solder and flux. Lo and behold, they tinned up nicely. Cut and separated, they were then attached to a serial Picaxe driver, using heat shrink tubing to hold each wire to the remaining part of the pin. They work. Just what I needed. Picture says it all......Back light works too as supplied.2016-01-13 18.03.28.jpg2016-01-14 19.39.00.jpg
 

Haku

Senior Member
On one of my displays I did a 'dead bug' solder of a SMD 20m2 on it's back, not my greatest soldering work as I don't have a very fine tip iron:



The backlight on yours appears to be much better than on the few I have which have LEDs on the ends meaning the center isn't as bright. Is the light an even brightness over the whole display?
 

lbenson

Senior Member
Nice job, Haku. Can you describe your wiring, and perhaps provide a photo of just chip and solder connections?
 

Haku

Senior Member
Knowing I could directly wire the B pins of the Picaxe to the LCD for 8 bit parallel data transfer I then sort of made things up as I went along.



I've added a 6 pin 0.1" pitch socket since the original picture to access more pins so it could be more than just a serial LCD display which is what I set out to make it be at first. The programming socket is 2mm pitch to avoid wrong connector problems, and there is a SMD decoupling capacitor buried in there somewhere :)
 

lbenson

Senior Member
Very nice. Thank you.

Does this have the HD44780 controller (so hippy's nibble interface would work with a 14M2), or is it a different interface?
 
Last edited:

Haku

Senior Member
Standard HD44780 controller.

The part number of one of the variants is definitely OM16213, google it for the pdf.
 
Top