Longmcx
Junior Member level 1

Hi everybody!
I have a little trouble with my project. I use 8052 to communication with my computer by Serial port. when my computer sent a char 'a' to 8052 then 8052 will sent back to my computer char 'b'. But this work properly if i click Reset on 8052 board. if i want to continue, i have to click reset again.I use Keil C.
// sfr have right value
void main(void)
{
while(1)
{
ch = _getchar();
if (ch == 'a')
putcha('b');
)
}
Please help me!
thanks for your attention!
I have a little trouble with my project. I use 8052 to communication with my computer by Serial port. when my computer sent a char 'a' to 8052 then 8052 will sent back to my computer char 'b'. But this work properly if i click Reset on 8052 board. if i want to continue, i have to click reset again.I use Keil C.
// sfr have right value
void main(void)
{
while(1)
{
ch = _getchar();
if (ch == 'a')
putcha('b');
)
}
Please help me!
thanks for your attention!