Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/03/01 08:38
Read: times


 
#10506 - RE: 8051 microcontroller help!!!!!
a free running counter is a very good solution for this dice problem. Freeze the counter's value as soon as the pushbutton is released.

But care should be taken is you make a counter that counts from 1 to 6 only. This is because you need some extra software to check on the value 7. If the counter reaches 7, it must wrap back to 1. This takes some extra execution time. Therefore you will have more chance of rolling a 1 than the other numbers. The easyest way to overcome this is to add some extra NOPs in the case the numbers are 2 to 6, to make all loops of equal length.

happy programming

List of 14 messages in thread
TopicAuthorDate
8051 microcontroller help!!!!!            01/01/70 00:00      
RE: 8051 microcontroller help!!!!!            01/01/70 00:00      
RE: 8051 microcontroller help!!!!!            01/01/70 00:00      
RE: 8051 microcontroller help!!!!!            01/01/70 00:00      
RE: 8051 microcontroller help!!!!!            01/01/70 00:00      
RE: 8051 microcontroller help!!!!!            01/01/70 00:00      
RE: 8051 microcontroller help!!!!!            01/01/70 00:00      
RE: 8051 microcontroller help!!!!!            01/01/70 00:00      
RE: 8051 microcontroller help!!!!!            01/01/70 00:00      
RE: 8051 microcontroller help!!!!!            01/01/70 00:00      
RE: 8051 microcontroller help!!!!!            01/01/70 00:00      
RE: 8051 microcontroller help!!!!!            01/01/70 00:00      
RE: 8051 microcontroller help!!!!!            01/01/70 00:00      
Rio Estika            01/01/70 00:00      

Back to Subject List