Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

controlling Displays

Status
Not open for further replies.

Thunderchild

New Member
OK so I'm taking my limited pic skills one step further: controlling displays.

Now my first project will be a simple voltmeter, now what is the best way of interfacing with a 7 segment display from a pic ? I'm using mikroebasic so have the option of HD44780 communication but I think thats a bit too much as I'm only talking 3 characters and I think they come in a minimum of 8 chars. whats my best option ? because if I choose to "manually" interface 3 characters I'm going to be needing 3 7-8 bit ports on the pic or some contyrol circuitry that will make it awful cumbersome unless there are some semi intelligent diplays out there !

ideas anyone ?

I'm also at a loss as to where to buy HD44780 diplays as neither farnell or RS stock them
 
Last edited:
Hi Thunderchild..
I hope i am not doing something wrong
but here is a ebay address where i have bought mine from

**broken link removed**
He is cheap and the displays are good quality..

all the best from Claus in denmark
 
looks pretty neat, although dearer than HD44780 displays can be and I'll haveto pay postage to the uk but they are certainly more compact
 
I suppose the other option is to make a unit that will display from 4 sampling channels, that would make full use of a 16 X 2 display
 
Last edited:
although dearer than HD44780 displays can be and I'll haveto pay postage to the uk

I don't know if you read the description right, but the price is for 10 units, the postage is £1.99 and the seller is in the U.K.
Essentially making each display £1.20p.
 
I don't know if you read the description right, but the price is for 10 units, the postage is £1.99 and the seller is in the U.K.
Essentially making each display £1.20p.

my message was with reference to the sparkfun parts, I have bought those 16 X 2 displays off ebay and indeed at £1.20 each its a bargain, just gigger than i had in mind but then I cam make a bigger project of it ! I was hoping for a compact and cost effective solution
 
Hi,

You can multiplex 3 seven seg displays so you will only require 10 Pic pins.

If you use an lcd you can get away with 6 pins easily althougth there was a thread on here a few days ago demonstrating how to drive an lcd serially.

**broken link removed**
 
Last edited:
so how exactly am I driving a standard 3 digit 7 segment diplay from a pic without further decoding circuitry ? or is there another standard ? do those have inbuilt latches ? that are adressed ? if they do they are perfect
 
Last edited:
so how exactly am I driving a standard 3 digit 7 segment diplay from a pic without further decoding circuitry ? or is there another standard ? do those have inbuilt latches ? that are adressed ? if they do they are perfect


You do the decoding in your software (look up table). Not neccessary to use latches. Drive the led's at 60+ Hz refresh rate.

Multiplexing is straightforward. Put the data for digit 1 on portx and turn on that digit (via transistor or mosfet in series with digit cathode, assuming a common cathode display). Small delay, then turn digit 1 off. Put data for digit 2 on portx, turn on digit 2, small delay, turn digit 2 off, etc, etc.
 

Attachments

  • Multiplex 1.png
    Multiplex 1.png
    26.4 KB · Views: 182
  • Multiplex 2.png
    Multiplex 2.png
    21.1 KB · Views: 152
Last edited:
A latch IC can be used quite effectively as part of a high performance multiplex display driver.
 

Attachments

  • 3-digit 7-seg example.PNG
    3-digit 7-seg example.PNG
    30.1 KB · Views: 161
Last edited:
I'm also at a loss as to where to buy HD44780 diplays as neither farnell or RS stock them

Both have extensive ranges of LCD text modules based on those chips.

For simple 7 segment LED displays simply multiplex them together to make the display as long as you want - you can drive them pretty well direct from the PIC, although you will need drivers if you want them bright, or a large number of digits.

My tutorials show how to multiplex two displays, and it's a simple matter of extending that, another tutorial shows how to multiplex an 8x8 LED matrix, a combination of the two does everything you require.
 
so basically the common pin (anode or cathode) on each digit is used as an "address line" and the displays are cycled through by the pic so fast that they all appear to be on ?

I'm using basic but I'll take a look at your tutorials as its the concept I'm after not the actual program, maybe if the display was controlled by transistors a small capacitor could be put in paralel with each segment to help persistance on large displays or in cases where the program has other things to do as well like read the ADC input and make that data into 7 segment friendly data
 
Last edited:
For Basic, it is much easier to do a serial output and have the display show the results...
Just my 2¢
 
Last edited:
yes thats what I have started to think and so HD44780 seems to be the way to go, as I need to use a 2 port pic anyhow to deal with any display I might as well make use of the 4 ADC inputs and have a single display with 4 voltage readings at once,

a further development of the project could see one or more of the ADC inputs fed with amperage data (obtained through appropriate opamp circuitry) so that the unit can display volts amps and.... calculate watts
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top