Posted by: edi nur rochman on: 28 November 2010

/* Display Two 7 Segmen */
/* Compiler : MIDE-51 */
#include < at89C2051.h > /* Include 89C2051 header file */
char num[ ] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
void wait (void) /* wait function */
{ ; }
void main( void ){
unsigned char cnt, right;
unsigned int i;
P1 = 0; /* ZERO port P1 & port P3 */
P3 = 0;
for( ;; ){
for (right=0;right<3;right++)
{
P3 = right;
for (cnt=0;cnt<10;cnt++)
{
P1 = num[cnt];
for (i = 0; i < 10000; i++)
{
wait(); /* delay for half second */
}
}
}
}
}
Theme: Albeo by Design Disease.
Recent Comment