Chapter 4 Software Development
4-5. Standard I/O over Serial Link
Section
C compilers for personal computers assign a keyboard to the standard input and a monitor to the standard output. The JOB60851 board has neither, but the programmer can provide substitutes as described in this section.
4-5-1. JOB60851 Board Standard I/O
The sample file stdrw573.c maps the JOB60851 board's standard input and output to a serial link joining a terminal emulator running on the host personal computer to an MSM66Q573 serial port on the JOB60851 board.
Standard input: Data from terminal emulator to MSM66Q573 RX pin
Standard output: Data to terminal emulator from MSM66Q573 TX pin
The functions required to create these mappings are read() and write(). Because of their tight links with hardware, these are known as
Figure 4.5.1 summarizes the data flows for the resulting I/O.
C language I/O functions
MSM66Q573 serial port
Terminal emulator running on
personal computer
getchar(), putchar(), and similar standard library functions
TX data from write(). RX data to read(). (Only SIO0 used)
Data received: from MSM66Q573 TX pin
Data transmitted: to MSM66Q573 RX pin
Figure 4.5.1. JOB60851 Board Standard I/O
Table 4.5.1 shows the dependencies on these two
page