[chbot] A neat idea for driving displays

Andrew Errington chchrobotics@lists.linuxnut.co.nz
Mon, 11 Sep 2006 20:21:14 +1200


On Mon, 11 Sep 2006 19:56, you wrote:
> To get me started with my dsPic and new programmer/debugger I thought it
> would be neat to add a 4 digit LCD display to my bot (plus I had some in
> my parts bin)
>
> The usual circuit I've seen involves 7 or 8 segment lines with a current
> limiting resistor on each and a transistor to switch each digit in a
> multiplexed fashion.
>
> Then I came across this:  http://members.cox.net/berniekm/super.html
> This guy is driving a display with a uC using no extra components. The
> smart bit is that you only drive one digit at a time only.
>
> I've managed to write the display drive code into a timer interrupt
> leaving the main code to just set the value.
>
> CR

Neat idea!  And great that you've got it going on the dsPIC at last! (Oh, 
and congratulations for the first technical post on the new mailing list.  
It was getting rather quiet...)

Another technique is nicknamed 'charlieplexing', where you use N pins to 
drive N x (N-1) LEDs.  In your project, 12 lines are used to drive 32 
segments (7 segments + decimal point * 4).  With charlieplexing you could 
do this with only 7 lines, except it's hard to do with 7-segment modules as 
each digit is wired to at least one common pin.

Here's a link to a project using charlieplexing, in case it is useful later:

http://www.instructables.com/id/E5COF05YF6EP287ITF/

Andrew