For serial communication programming, can I simply use getchar() as in CSample or do I have to use interrupt-driven one as in INTSIO? What is the difference between these 2 sample projects? In CSample, the serial port interrupt is even not enabled(?), so I wonder if it can really capture input stream from serial port, or it justs simulate keyboard input as serial port. If I use interrupt, can I bypass getchar(), and check the serial buffer directly? Can anybody please tell me what is the function of getchar() in serial port programming and how to correctly use it? I am a beginner of C51 development, any comments will be greatly appreciated. Thanks.
I don't use the '51 so I'm not sure but the source code for getchar() is probably included with your Keil tools. Look in the Keil subdirectories for 'GETCHAR.A51 or GETCHAR.c51?. You can look the code over and see if you can find your answers. Best luck