Computer Rolling Dice System

Status
Not open for further replies.

asmon

New Member
Well, i have the following circuit

**broken link removed**

with the following 'c' code
Code:
#include <stdio.h>
#include <conio.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#include <dos.h>
void main (void)
    {
	int a,b,d;
	int c=0;
	clrscr();
	randomize();
	while (1)
	   {
	       b=0x00;
	       b=inportb(0x379);
	       b&=0x80;
	       if(b==0x80)
		  {
		     clrscr();
		     a=rand()%6+1;
		     gotoxy(27,12);
		     textcolor(14);
		     cprintf("The number on the dice is: %d",a);
		     switch(a)
			{
			    case 1:c=0x77;
				break;
			    case 2:c=0x6b;
				break;
			    case 3:c=0x36;
				break;
			    case 4:c=0x2a;
				break;
			    case 5:c=0x22;
				break;
			    case 6:c=0x08;
				break;
			}
		     outp(0x378,c);
		  }
	   }
    }


I know it's too general, but i need information about how the circuit works.
for example what each of those components (555,324,74hct244) does in the circuit.
and i need to split the receiver into few pieces and explain what's the purpose
of each. (i guess it's similar to the previous question)

thank you.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…