Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

7-segment multiplexing

Status
Not open for further replies.

redhat

Advanced Member level 4
Joined
Aug 1, 2004
Messages
116
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,296
Location
Egypt
Activity points
979
i have connected 10 7-segment displays to PIC16f877, each 2 displays are grouped together and i am using multiplexing to output data to them . how to split a 2 digit number like 12 to "1" and "2" using CCS to display each on a 7-segment display?

regards
 

the matter is easy as I think. To split a number into its ones and tens, divide the number by 10 to get the tens and the remainder is the ones.
the code may written in C like:
unsigned char x,ones,tens;
x=12;
tens=x/10;
ones=x%10;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top