??? 11/25/06 16:26 Read: times |
#128503 - I like see the program 0-255 Responding to: ???'s previous message |
Dan K. said:
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. Hi Dan: Can you post the program you wrote that displays 0-255 on 3 digit 7 segment display. I have interest in randon number generators. You must have written some other computer code before 8051. There no way you could write code like you did in 4 days in less you use another processor or language. Best reguards, Ralph Sack |