Look over Dave's shoulder as he tries to select a 7 segment LCD and suitable driving microcontroller.

Hi I know there's quite a few people out there who like watching me do these parametric design searches and components selection and things like that. and I was just working on a little uh project where I needed a couple of three-digit uh LCD 7 segment LCD uh LCD display uh, just little uh PCB Mount ones and I needed a microcontroller to actually drive those because if you know about uh, basic seven segment LCD displays I'm not talking about the DOT Matrix ones here, but the individual segment ones like you get in your uh, wristatch or or calculator product or something like that, you need special LCD driving circuitry to actually drive all those segments. so I thought I'd just show you uh, some uh parametric searching here on Digi key searching for uh, the LCD and a suitable microcontroller and see if there's any uh traps in here. So let's go.

So let's type LCD into our D key search engine here and uh I can use other sites I just uh, prefer dig at the moment you can use Mouser or far now element 14 or other ones um Jiko or something like that if you really want to. But let's go into we want um LCD modules um LCD uh OLED character and and numeric and we want um, basically I'd be happy with anything from say a 4 and a half I only need a three-digit one but uh I'll search up to say four and a half digits and this um parametric column here number of digits So let's go like that, let's select from three through to Uh 4 and 1/2 digits and as a first pass. So we apply our filter there and how many have we got? We got 38 uh 38 entries for that. So what we'll do is we'll sort by price because once again, Big Driver is always uh, sorting by price.

So I'll do my part quantity as 100 and bingo it's resorted those l CDs and then the cheapest one up there is a Lumix one by the looks of it. so let's take a look at that. It's $161 each in 100 of quantity. Okay, not too bad.

The other sort of jump up to $2 uh range over here. Yeah, Okay, so that's a pretty good, uh, pretty good price range there. I'm pretty happy with that. So let's go in and have a look at that one.

It's a dip uh package like this so it's uh, you know it's you can mount it on the PCB and that should be fairly nice for my needs. Uh, so let's go in and have a look at the um, well how many uh segment? Well we'll find out that let's open the data sheet, shall we? Let's go in and go straight to the Lumix website and here's your data sheet for it. And uh, as you can see, one of the important things you need to note about these segment LCDs is how they're actually uh configured. Now this pin table uh Arrangement you've got in here.

Let me zoom in on that and uh, you'll see that this is a look. This looks like a single common Uh chip because here it is it's they've arranged this. A bit weird. this table.

it should just be in one big long thing, but they've got three rows there of the PIN numbers 1 through 24. It's a 24 pin device and you'll see pin number one is Comm So how this display operates, it's got the one common terminal for all of the segments and then a separate pin for each one of the segments. So each one of those, um, seven segments there will have its own pin and there's only one common terminal. but not all LCDs will operate like that.
They might be they might have multiple common Terminals and that's important when you go to select uh, your LCD driver chip as we'll um, see or your or your microcontroller that's designed to drive um, that has a built-in LCD module that's designed to drive these LCDs It's got to not only support the number of segments, but also the number of Commons as well. So when we go, if we're happy with this LCD we would go and search for a microcontroller that has LCD capability that has at least one common terminal, supports at least one common terminal and up to Uh 20. Well, actually 23 Uh segments. but uh, once again, maybe if you don't need the decimal points or something like that, then you could, uh, eliminate one that maybe only had 21 or 22 segments.

Um, and that could be a big driver. If you're looking for, say, a 44 pin microcontroller or something, they may not be able to support the number of common segments you've got. But anyway, um, that looks like not a bad uh uh, LCD at all. But uh, let's go and have a look at some others here.

Let's go back. and uh, that's a 3digit display. Maybe if we went for a Varitronics one here, that's a 4 digit, uh, display. What have we got? We've got another Varitronics one.

Let's go in and have a look at this one here. What does it cost? $2 Okay, let's go in, have a look, download the data sheet for it. Thankfully, the internet works reasonably quickly. I Said well.

almost didn't get away with saying that. Uh, you'll notice that this one has um, it's a 3 and A2 digit, but it's got the plus minus uh as as well and it looks like it's got a little uh Arrow up the top as well. So um, you can get all these um LCDs com in all sorts of weird and wonderful uh configurations and you'll notice that this one is, also, um, just a single uh, common by the looks of it. Now the other thing to consider when you're looking at uh LCDs like this is whether or not it comes in what type it is.

Now it's got display type up here and this is Twisted pneumatic, but that's not what I'm talking that about. That's more the that's more the uh actual technology used to manufacture it, um, and used to display it. But the display type I'm talking about is this reflective type and the transflective type. And the difference between the reflective one is if um, the reflective one will not work with the backlight, it means it's got a silver mirrored like reflective, uh, back in underneath the segment.

So you're relying on external light to uh, bounce back off that mirror and uh, and come back to you. There's no ability to put a generally no ability to put a backlight on those. So um, maybe you can get like an edge lit, uh, backlight or something like that, perhaps. but you actually can't get one behind the surface of the segments and these are really good If you don't want a backlight and you want the highest possible contrast, um, the highest possible readability in a um, you know, in like a daytime type environment.
um, whereas the transflective type here, uh, that will. um, they will. Actually, as the name suggests, it's trans reflective. so it it's semi-reflective It does sort of reflect, but not as good as the true reflective one.

but it also allows light to come through from the back. so you can actually put a Uh backlight behind it. so if you do want to integrate a backlight, a transflective type may actually be better for that purpose and you'll notice that uh, this particular model number uh, uh Lumix one actually comes in two types, the TR at the end and the TF one's reflective one's transflective. so you choose the best one based.

So we'll just go back here and we'll back to the main selection uh screen up here and we'll actually choose one that has um, more uh digits. We'll choose one of these 14 segment ones so we'll actually reset that and instead of a segment display, we might have a look at one of these 14 segment ones cuz then you can get um Alpha uh type ability. not just uh numbers on there as well. But there you go.

That's uh, $292 There's not too many of them, but here's one. in a 100 off, it's $182 It's not too bad at all, and that's actually an8 digigit. uh 14 segment display. so that's quite capable.

and maybe um, in my product I might be able to integrate uh both display into the one if I used this um eight character display so it might actually work out cheaper. Instead of buying two uh, three-digit ones, might be able to buy one of these uh eight digigit ones and have uh 14 segment uh capability as well. So let's go in and uh, see if we can find the data sheet for this thing. product, photos, catalog drawing, and no, but that's what it's That's what it looks like.

They're going to be the characters um, as as you can see instead of your standard seven segment. It's actually got that Uh 14 segment also known as a starburst uh type display as well. And with those, you can display uh letters as well as Uh numbers and other uh symbols which is really quite neat. But I don't seem to be able to get the data sheet for this one.

Well, just for a bit of a change. I'm going to actually search Uh Mouser here and uh, type LCD into here and we'll go into LCD displays. they got 4, 40 of them. I'll just see what they've got.

they might have something slightly different. We'll go into LCD displays. We don't want modules, we don't want drivers cuz our we're going to have a microcontroller to drive this thing. and we want a numeric display, not a character based display.
So we'll click 361 of them. and let's uh, once again, select number of digits from three to say 4 and a half. Let's apply that filter and see what we get. We get 79 matches and then what we'll do.

We've got our pricing column here. We'll sort via ascending price so we want the cheapest first. Um, unfortunately it's not unlike unlike the digi key one, it doesn't let you um put in a quantity. say you know I want the price for a th000 and up or 100 and up.

Um, but at least it does give you the price. Uh, breaks in the column here and whoa, look at this first one. There's no photos, but in 100 of quantity at 95? W Now we're talking transflective available in reflective. It's a lumex one.

Again, it's the Um S401 instead of the S301. There's that same S301 that we had before from Digi. It looks actually a bit cheaper from Mousa There there you go. $130 in 50 of quany, $127 in 50 of quantity down in there.

But let's go and have a look at this one up here. They've only got 89 in stock. not a huge amount of stock for the transflective one there. Um, and they've got, uh, non-stocked here a lead time of n weeks.

ouch for the uh reflective type. so you'd have to be careful to design. if you wanted to design that one in. uh, you'd have to be very careful about uh, stock and things like that.

Looking for alternative supplies? this one down here, which we've been uh, playing with no problems at all. There's 1,197 in stock 4333 of the reflective um type, so there's quite a big difference anyway. I want to go in and I want to look at the data sheet for this top one up here. the Bingo the LCD S401.

There you go. It's only got It's through hole once again, but it's only on one side. Very low pin count, which means it's probably going to uh Multiplex the Commons or it has to. Let's go right down.

Look at the display here. It's got megap, Pascals kilop, Pascals. uh PSI So um, obviously this is like a one designed for, um, some sort of pressure gauge or something like that. But if you didn't want to use that, you could, just, uh, disable those segments of course, not not drive them and use it as a four-digit uh display.

No problems at all, as long as it met your size requirements. And here we go. Here's the pinout table and this is what I'm talking about. There you go: Com zero there once again.

PIN Numbers one through to 13 and uh, uh, Common zero, common one, common two, and common three. So it's got four common pins. so if you want to drive this display you as we'll see later, you'll need a microcontroller that can drive up to a four common segments with up to um, uh, what have we got 1, 2, 3, 4, five, 6, 7, 8, nine uh segments. So You' need four Commons by nine segments to drw this display and it's a very attractive uh price point for that one.

but well, I think just for argument sake, we'll go back to this one here. It's a safer uh choice and we'll try and find a microcontroller that has a single common and can support up to 23 segments. So in dig key here we'll type in microcontroller. We're going to be very broad.
I could go to the direct to the manufacturers if I was a microchip Fanboy or an atmail Fanboy or a TI Fanboy I could go directly to their uh websites and do parametric searches there. but I'm not too fussed about the brand. So I'm going to go in and search 32,000 different microcontrollers here. There it is 32 651 of them and I'm going to try and use the parametric search.

Now, the problem with this is you're not always going to get it right because Dig Ke may not always capture the correct um uh information in the perip pereral column here for the chip so you could miss out um, on the odd device. but I need to go through. Unfortunately, there's no column where I can just select LCD So I've got to go through and look for any one of these that actually have LCD in them in the parametric search. So I go through LCD LCD and this all means it'll have an LCD module in it and uh, we should.

It's a bit tedious so I might skip through this part and I've tediously selected all the ones through there so that have LCD in them and you cross your fingers that Digi key have done their jobs. the Oompa Loompas at Digi key have uh imported all this data correctly and we've got 2,36 microcontrollers of all of these different manufacturers Atmail Cirrus Cyprus Energy Micro Free scale Fujitsu Max and Microchip blah blah blah blah blah Rena say oh sharp Micron St to Shea Zog it's all there. So no shortage of Manufacturers who make microcontrollers with LCD drivers in them. but we care about a the price and B that it supports the number of digits whereafter and we need a couple of other features I Want an ADC buil in a couple of channels? say you know two or three channels of ADC would be uh nice as well.

Well pretty essential actually. So what we'll do is we'll um search for uh price over here and unit price. Let's do say a 100 of which is a nice sort of round value to give you an idea for. um sort of.

You know, short run prototypes or first run prototypes and what have we got? First up, um it looks like the uh cheapest one we've got here is a free scale RS uh 08 but we will that have the number of IO required number of IO 26 Well I know for a fact that it's not going to do it. So we actually need um probably up here to search for a higher number of IO because we need at least 23 Uh segments plus the Uh pin as well. So if we go up so we need so there's 24 pins right there that we need. So let's start from say 30 upwards.

Uh, cuz really, if we you know, max out at say 102 or something like that I don't want a device that big, it'll probably be Overkill and too expensive. but we've narrowed that down even further and let's do our um uh well. our uh price search is already there and the first one up the top is a Px 16 F19 34. So there you go.
The cheapest one on the market according to Digi Key. Cheapest microcontroller you can get. Too bad if you're an Ill or a T I Fanboy sorry um, they're not. Don't even register on the first page if we go to the next page there pick pick picks who we just get into an Nxp there There we go that that would um LPC it looks like an arm uh, device it is.

It's a 32bit Arm Cortex M0. How much does that one go for? That's a whopping $33 Thank you Very much. Massively expensive compared to if we go back and go back, we've got our 16. LF Um, wh sorry.

Let's go forward our 16f 1934 there is only $168 What a bargain! So let's go in and take a look at that. I Really want that sucker and let's go in and have a look at the product brief for it. and P P 16f 1930 X Um device presumably just different memory features. Yes, here it is.

The 1934 has uh 4K of uh program memory 256 bytes of E prom I didn't mention that I will need some Eom I think um 36 IO uh which should be enough and bingo over here. This is what we care about. This column over here the LCD segments and Commons as you can see Ah perfect supports up to 24 segments with four Commons So we could drive four of those displays we've been looking at with this one uh doar 60 in 100 qualty Pck chip Awesome! I Love it! It's got uh, it's got I squ C Ur It's four uh, 8bit timers and once again, it's got 14 channels of 10bit analog to digital converter heaps so there's no reason why we can't use that or is there now as I I'm sure I've mentioned before, one of the traps with using and selecting microcontrollers like this is that a lot of or most of the functionality of these devices like the LC all the built-in peripherals, the LCDs, the uh, the timers, the Adc's and the I squ C's and all the peripherals and things like that Pwm outputs capture compare modules, comparators, whatever A lot of them share uh pin functionality so you can't use both of them often. can't use two competing things at the same time so we might.

This thing might very well well I guarantee you it'll be able to drive these 24 segments at up to four displays. But do those pins map to some of the analog to 14 analog to digital channels that we want to use. So if they do, we're screw. We won't be able to do both.

If those, if we want to use an I Squar C port, for example, are are those I Squ C interface pins overlapping our LC segments? It's very likely, but um, you know, odds are you're going to get a couple of analog to digital conver converters which don't share the same pin. So really, um, that's my main requirement at the moment. I think is my analog to digital converters and the LCDs. They've got to be separate.

So let's go down and see if we can actually find the pin mapping information. That's the 28 pin device. We don't want that. we're going to be using the Uh 40 pin.
uh oh, it comes in a there you go. It comes in a P dip uh package but I'm was pretty sure the digi key one is yep, a quad flat pack. Uh, probably can get it in other packages perhaps I don't know. 40 pin dip? no Ufn, no.

Looks like dig aren't going to stock that sucker in at least not in this price range. anyway. Um, the the dip H 16937 Anyway, let's not muck around with that. Let's have a look at the pin allocation table cuz that's going to tell us everything we need to know.

And here we go. This is the 40/44 PIN allocation table for the 16f 934 and you got to choose your right device and it can get complicated. And here's the column we want here, the LCD uh column and once again, the segments. It tells you which pins over here.

The Ra0 pin is segment 12, for example. Um, and we go through and there's some various uh LCD voltage pins as well that it requires. So let's see if they interfere with our analog to digital column. Here's our analog to digital column down here and as you can see, segments they overlap.

I Okay, no. I4 Segment 52 Uhoh, this ain't looking promising Um Well, hey, now look there we go. Com One: We're not using Com One, so we could get get one analog to digital channel on Rb5 pin Rb5 there, which is analog Channel 13 on Com One. So if we're no sorry, we're going to drive two displays.

Well, I could use one of the other common pins. Okay, I don't have to use Com zero and Com 1 could actually use Com Zero and Com 3 I Guess So, um, looks like we might be able to squeeze out an analog pin there, but the others are mapping the segments down here. and if we want our decimal points, there's segment 23. If we want both decimal points.

Oh, we're struggling. Maybe if we dropped one of those decimal points if we didn't if we only needed the one fixed decimal point and we could might be able to squeeze out a second analog to digital channel7 on pin re2 there. But that's it. What do you know? Murphy screws us around again.

It ensured that almost all of these analog to digital converter pins were mapped to the LCD pins and that I Think that's going to have to rule out this device right there. cuz I really wanted? um, probably three uh, analog to digital uh converter um channels there. So really? ah, not that happy with that at all. We might have to scrap this device right there, let alone looking further into if you want uh, Pwm output or something like that.

Here's our capture compare module Ccp3 capture compare um, uh modules there and you'd have to look to see if they correlate to the LCD pins, but that's that's really tricky business as you can see just uh, selecting the right device unless we completely go Overkill and we get like a 100 pin device or something then you you. you're almost guaranteed that you're going to get the functionality you need on that. But I think we're going to have to rule this one out. Perhaps what a bummer, but that's the detail.
If you rushed in and bought some of these devices based on just the uh, you know, the based on the feature set um up here and that yeah, it has all these segments and meets all my specs. Rushed out and bought that design that into your product into your board. then well, you could find your Uh s up the Uh proverbial creek without a paddle. So I won't bore you with the details of actually going through and trying to find the correct microcontroller here because it could take all day.

and I've got to go back and check my specs and see which ones are a little bit flexible here and there. What my sort of toss around my price targets, what they're going to be and things like that and sort of trade a few things off perhaps. And yeah, it literally could take all day or several days just to do this and select the correct Uh Micr microcontroller for this particular product. and this is and I Hope you can appreciate this.

This is only for two. The detail that we've had to go into here for: Just Two Simple parameters like LCD and ADC tradeoff versus price at a low price point. Imagine if you're trying to, you know, juggle five different peripherals you need built into your Um microcontroller and you can't just choose the top of the range one because you're trying to meet a price target maybe a pin Target as well. You don't want to use a you know huge couple hundred pin device or BGA device which requires you to have an a different assembl who can handle that pitch? BGA You know if you choose one of those arm uh those cheap integrated arm devices or something? well it's a big can of worms I just uh thought I'd uh show you that just this simple case and how well things aren't always as they as they seem with microcontroller selection.

Anyway, I might have an update uh on this project in the future, but until then, catch you next time. Yeah.

Avatar photo

By YTB

25 thoughts on “Eevblog #248 – lcd enabled microcontroller selection”
  1. Avataaar/Circle Created with python_avatars NivagSwerdna says:

    Nice topic. I have a similar project and went through exactly the same process and ended up back at a PIC.

  2. Avataaar/Circle Created with python_avatars Membrane556 says:

    What about using a shift register to drive the LCD?

  3. Avataaar/Circle Created with python_avatars medabrundibar says:

    @EEVblog And better readability on strong external light level, e.g. direct sunlight

  4. Avataaar/Circle Created with python_avatars EEVblog says:

    I like using Digikey as a convenient reference point for designing due to their massive selection and mostly usable parametric search. Doesn't mean I will buy from them though.

  5. Avataaar/Circle Created with python_avatars EEVblog says:

    @skierplaterandy Much lower power consumption for LCD.

  6. Avataaar/Circle Created with python_avatars CampKohler says:

    The LCD datasheet has a no lead symbol. What do they plate the pins with instead of solder?

  7. Avataaar/Circle Created with python_avatars CampKohler says:

    @FTBoogie If you don't show up for a few days, we know where to find you: sitting in front of your PC clicking the replay button over and over and over.

  8. Avataaar/Circle Created with python_avatars CampKohler says:

    @c3br4x Ah, Grasshopper, when you can carry the solder pot full of molten solder from one bench to the other with your bare wrists, you will be ready to go out into the world. But first you must be able to snatch a 1N34 from Dave's hand before he can make a fist.

  9. Avataaar/Circle Created with python_avatars DMStern says:

    Are there any distributors with a parametric search for microcontrollers that's actually useful? Not that the manufacturers are much better. TI and Microchip are the only ones I can think of offhand that do it right (filter by features), but eg. ST just list all combinations as separate entries and expect you to sort it out yourself. Terrible!

    (Looking closer, Microchip's product selector looks awfully familiar to TI's old one. Must have gotten it from the same developers!)

  10. Avataaar/Circle Created with python_avatars Non Entity says:

    @FTBoogie Me too!

  11. Avataaar/Circle Created with python_avatars FT Boogie says:

    @detectiveinspekta super duper cereal

  12. Avataaar/Circle Created with python_avatars Jonathan Winterflood says:

    @skierplaterandy In reflective mode (no backlight), the power consumption is far far lower with an LCD. Also, viewing in bright daylight is fine with a reflective LCD but would require a very powerful LED display.

  13. Avataaar/Circle Created with python_avatars detectiveinspekta says:

    @FTBoogie Not sure if serious.

  14. Avataaar/Circle Created with python_avatars Henrik Sandaker Palm says:

    I didn't know microcontrollers even had numeric LCD/LED display peripherals. I've always just bit-banged them at it works perfectly. If you need less pins to drive them, you can use an alphanumeric driver chip (MAXIM has a few with SPI and I2C) or simply a multiplexer or a binary counter chip.

  15. Avataaar/Circle Created with python_avatars FT Boogie says:

    This is hands down, the most exciting video on the internet.
    I liked the part where he was on Digikey looking at datasheets.

  16. Avataaar/Circle Created with python_avatars xng14 says:

    For what project is this ?

  17. Avataaar/Circle Created with python_avatars Hola! Peter Camilleri says:

    It is highly likely that you do not need to used the LCD Voltage pins. The bias voltages can be generated internally. This frees up 3 pis

  18. Avataaar/Circle Created with python_avatars ballanux says:

    @Xenplex If you are going to buy a lot of things you may consider mouser.com which has free shipping for orders over 75€ and it has as many products as farnell

  19. Avataaar/Circle Created with python_avatars Aivaras says:

    @ssj3gohan456 I agree with you.

  20. Avataaar/Circle Created with python_avatars Mitchell Clarke says:

    Just spent 3 hours looking for an LED driver with fault monitoring… Not more parametric searching! Keep up the good work regardless Dave.

  21. Avataaar/Circle Created with python_avatars demultiplexer says:

    Funny thing is, I have never designed for more than 100 units production quantity, and in that case the hours you have to put in to actually get the cheapest device are ways more expensive than just taking the top-of-the-line part that you've already used in other projects. Even for 1000 units quantity the real nitty gritty selection doesn't quite always pay off.

  22. Avataaar/Circle Created with python_avatars EEVblog says:

    @Hobgoblin612 I was going to double check that. And so it seems that might be the case. The chip might still be usable.

  23. Avataaar/Circle Created with python_avatars DenizK says:

    thank you Dave, most useful.

  24. Avataaar/Circle Created with python_avatars Timothy Hobbs says:

    You may not need all the VLDC pins on the pic whitch would free up 1-3 more adc's. Have a look at page 335 of the full datasheet.

  25. Avataaar/Circle Created with python_avatars Konstantinos Kalleris says:

    Are you in my mind? Just now I was looking for display drivers etc and received an e-mail notification about this video! Thank you, it's very interesting! Do you know if there is an ic display like that but with multiplexing? Thank you again for your nice videos!

Leave a Reply

Your email address will not be published. Required fields are marked *