??? 11/12/06 05:47 Read: times |
#127802 - Why? Responding to: ???'s previous message |
Why would that happen?
I take a number, divide it by ten and store the remainder (B) into r4, divide by 10 again and store the remainder into r3 and then once more for r2. Thus, r4 should have the LSB, r3 the middle bit, and r2 the MSB. Before I wrote this program, I used the same circuit (3 7-segment displays) and the same bin_to_bcd code and I wrote a program that would simply increment an 8-bit register and display that value on the displays. All numbers from 0 to 255 were displayed (including odd values). If the bin_to_bcd did not produce odd values, then why would this work? Thanks for the response. |