(8-bit binary to two digit bcd) or (8-bit binary to two digi

F

Fangs

Guest
how do i write a code for (8-bit binary to two digit bcd) or (8-bit binary
to two digit seven segment)??

thanks.
 
"Fangs" <super_fangs@hotmail.com> wrote in message
news:8997c11eccbf1ba0d808d3d8d9ea1a8c@localhost.talkaboutprogramming.com...
how do i write a code for (8-bit binary to two digit bcd) or (8-bit binary
to two digit seven segment)??
The structural way to do this is to convert the 8 bit binary to BCD fist,
then convert BCD to 7 segment.
The BCD to 7 segment is very easy to implement. It is just a ROM with BCD as
the input and seven segment as the output. It's simple because you only have
10 cases to consider, 0000 to 1001 in each BCD. The rest of the cases, 1010
to 1111, you just put don't care or all zeros or all ones for the outputs.
The binary to BCD is much more difficult. You can search the web for the
algorithm. If you contact me privately, I can send you the handouts
regarding with the algorithm.

Hendra
 

Welcome to EDABoard.com

Sponsor

Back
Top