This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

putchar and getchar

i have read Mark Odell's UART driver.
However,the code size is too large for me.

can i just using the simple function call:

char x,y;
getchar(y); //get char from urat
x=y;
putchar(x); //put char to urat

is it possible to do that in keil?

Parents
  • Of course it is - it will use Keil's Library implementations of putchar and getchar.
    But it won't be interrupt driven, and only supports the "standard" 8051 UART.

    Keil also have an interrupt-driven example in the downloads section - I dunno if it's any more compat than Mark's.

Reply
  • Of course it is - it will use Keil's Library implementations of putchar and getchar.
    But it won't be interrupt driven, and only supports the "standard" 8051 UART.

    Keil also have an interrupt-driven example in the downloads section - I dunno if it's any more compat than Mark's.

Children