 | Discussion Forum |  |
|
|
printf on 2nd serial interface?Next Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Stefan Kratzenberg Posted 19-Apr-2001 16:57 GMT Toolset C166 |  printf on 2nd serial interface? Stefan Kratzenberg Hi, I am looking for examples in programming the 2nd serial interface.I get data on ser0 and have to send it to ser1. Who can help me??? | | Read-Only Author Andrew Neil Posted 19-Apr-2001 17:37 GMT Toolset C166 |  RE: printf on 2nd serial interface? Andrew Neil You will need to rewrite putchar() to use the other port. It's in putchar.c - surprise!
See Chapter 6, "Advanced Programming Techniques" in the manual.
Similarly getkey() for input | | Read-Only Author L T Posted 20-Apr-2001 07:27 GMT Toolset C166 |  RE: Then what about interrupt mode? L T Since polled I/O consumes too much of the processor's computing power, can I find some example using buffered interrupt instead? | | Read-Only Author Andrew Neil Posted 20-Apr-2001 11:39 GMT Toolset C166 |  RE: Then what about interrupt mode? Andrew Neil Search the Keil support site - there's certainly a C51 interrupt-driven example there! | | Read-Only Author Eric Juve Posted 19-Apr-2001 17:40 GMT Toolset C166 |  RE: printf on 2nd serial interface? Eric Juve You need to write your own copy of getkey, and putchar to redirect the printf to the desired I/O port. The c166 toolchain includes a sample for you to modify. By the way they are polled I/O. | | Read-Only Author Jon Ward Posted 19-Apr-2001 17:59 GMT Toolset C166 |  RE: printf on 2nd serial interface? Jon Ward Take a look at the following knowledgebase article.
http://www.keil.com/support/docs/788.htm
Jon | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|