In debug mode , why the serial window gets nothing output? Thank You #include <at89x51.h> #include <stdio.h> void main(void) { SCON = 0x50; TMOD = 0x20; TCON = 0x40; TH1 = 0xE8; TL1 = 0xE8; T1 = 1; TR1 = 1; while(1) { printf("Hello World\n"); } }
Hi Frank, I not experienced with 8-bit, but for 16-bit processors you have to set transmit interrupt request flag for ASC to get printf() to work. For me this works.
ASC0_TIC_IR=1;
"you have to set transmit interrupt request flag for ASC to get printf() to work" Indeed, and I think this is what's gone wrong. Frank seems to have set "T1" rather than "TI". Stefan