C code example
I'm writing the code using MIDE-51
actually i prefer examples which looks something like this :
#include < at892051.h > /* Include 89C2051 header file */
char const num[ ] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
void wait (void)
{ ; /* wait function */
}
void main( void )
{
unsigned int i;
unsigned char j;
P1 = 0; /* initialize ZERO to P1 */
while(1){
for( j = 0; j < 8; j++ )
{
P1 = num[ j ];
for ( i = 0; i < 10000; i++ )
{
wait(); /* delay for half second */
}
}
}