I have made the new function putchar for redirect the output to LCD already. But by default, I also want to use this as output to serial port on the same program. I do not understand how to use both output function in parallel or other way to switch between each other. Please tell me if possible. With my thanks.
One more comment, should you choose to use function pointers, would be to have you take a look at Keil's function pointer appnote. http://www.keil.com/appnotes/docs/apnt_129.asp
Dear Dan Henry, Andy Neil Thank you very much for your guide and C51 module. After receiving your replies, I tested on two way successfully. The first one I simply use a global variable to switch functions and on the other one I write codes like your guide which used function pointer. Again thank you so much, see you next post.