- This topic has 1 reply, 2 voices, and was last updated 14 years, 4 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
|
Microcontroller › 8051 › source code
hey guys i required the source code for the ELECTONIC DICE using AT89C2051 !!!!!!
i didnt get it from anywhere can any1 giv me ????????? pls help me!!!!!!!!!!!
i can tell you one logic for this,
just make use of hardware interrupt,
declare temp as global variable and keep on incrementing that in your main loop and make it one as it counts beyond six
while(1)
{
temp= temp++;
if(temp>6) //since a dice has only six faces
temp=1;
}
//and in ISR
ISR(INT0_vect)
{
//use case and make your leds(or 7 segment if using) accodingly
}
apply that logic and code yourself for 8051