7 Segment Multiplexing


Thread Starter


I am learning 8051 microcontroller. I want to know how to do 7 segment multiplexing. Suppose I am using 89s51 and four 7 segment display of common cathode. So how to write code? Please provide sample code as well as theory behind it.

Curt Wuollet

I'll tell you how to write the code. You can write it. All segment lines are in parallel. ( 1 8 bit port) Individual digit lines are separate (4 bits in your case). Turn on segments for first digit. Turn on first digit common. Turn off first digit common. Repeat for 2,3,4. The idea is that the 7 segment lines are multiplexed across N digits by time division among the digit commons.

They do have chips for this. :^)