[code=c]
#include<stdio. h>
#include<reg52. h>
void main()
{
int bit1, z=0;;
SCON = 0x50;
TMOD |= 0x20;
TH1 = 0xFA;
TR1 = 1;
TI = 1;
PCON |= 0x80;
printf("enter bit to set ? \n ");
scanf("%d", &bit1);
z = z | (1 << bit1);
printf("z=%x \n", z);
}
[/code]
could not see the printf statement.wat is the error in the code?
#include<stdio. h>
#include<reg52. h>
void main()
{
int bit1, z=0;;
SCON = 0x50;
TMOD |= 0x20;
TH1 = 0xFA;
TR1 = 1;
TI = 1;
PCON |= 0x80;
printf("enter bit to set ? \n ");
scanf("%d", &bit1);
z = z | (1 << bit1);
printf("z=%x \n", z);
}
[/code]
could not see the printf statement.wat is the error in the code?
Comment