Oki JOB60851 user manual Serial port SIO0 Chapter Internal timer 9 and following

Page 63

Chapter 4 Software Development

For further details on these components, refer to the MSM6657 Family User's Manual.

Serial port (SIO0): Chapter 12

Internal timer:

Chapter 8, page 9 and following

The source code file stdrw573.c sets up the serial port for these functions using the following steps between the start and end comments for port and timer setup.

(1)Configure timer 3 for use as baud rate generator (BRG)

The serial port used for standard I/O derives its baud rate from the MSM66Q573 internal timer 3 overflow signal. The source code file stdrw573.c contains the settings for producing a 38,400- b/s baud rate from the JOB60851 board's 24-MHz system clock.

(2)Configure serial port

All serial ports have registers for controlling operation. SIO0 has four such registers.

(a)SIO0 Transmit Control Register

This register specifies the data format for transmitting data and enables or disables the relevant interrupts. The source code file stdrw573.c uses the following settings.

Word size

8 bits

Stop bits

2

Parity check

None

Transmit buffer empty interrupt

Enabled

Transmission end interrupt

Enabled

(b)SIO0 Receive Control Register

This register specifies the data format for receiving and enables or disables the relevant interrupts. The source code file stdrw573.c uses the following settings.

Word size

8 bits

Baud rate clock

Timer 3

Parity check

None

Receive end interrupt

Enabled

SIO0 receive

Enabled

(c)SIO0 Receive/Transmit Buffer Register

This 8-bit register holds the transfer data. It is actually two separate registers differentiated by access. Writing to it writes to the transmit buffer. Reading from it reads from the receive buffer.

(d)SIO0 Status Register

This status register gives the error status at the end of transmit/receive operations and the running status during such operations. Note that the hardware does not reset this register, so the user application program must do so before using the serial port.

Framing error flag

"0"

Overrun error flag

"0"

Parity error flag "0"

 

Transmit buffer empty flag

"0"

Transmit end interrupt flag

"0"

page 4-28

Image 63
Contents JOB60851 Starter Kit Page OKI Contents Software Development Port 7 LED2 Control Introduction Checking Packing List Introduction1. Packing List Host Environment Precaution for Safe and Proper Use LabelsIcons Do not pile objects on top of the product Use only the specified voltageUse only the cables and other accessories provided Notation Putting Board through Its Paces Setup Configuring JOB60851 BoardPutting Board through its Paces Installing Development Software Running Flash Memory Program Running Default ProgramConnecting Board Installing USB DriverUse the -u command line option to view the USB pipe numbers Running User Programs Loading Terminal Emulator Connecting Serial CableDownloading and Executing Synchronizing LinkOverwriting Flash Memory Contents System Specifications System Components System SpecificationsSystem Components System ObjectiveHardware Specification Connectors and SwitchesUse only the AC adapter included with the product System Specifications 2. Circuit Diagram 1/2 Circuit DiagramSystem Specifications 1. Parts List 1/2 Parts ListMemory Maps 4. Memory Map for Download Mode5. Memory Map for Flash Execution Mode 6. Memory Map for Application Mode 7. Memory Map for Flash Rewrite Mode System Limitations Resources Uses1. MSM66Q573 Pin Assignments 1/2 P11-3/XTOUT System Specifications 1. MSM66Q573 Pin Assignments 2/2Software Development USB Basics Bus Topology, Addresses, and Hot PluggingSoftware Development Core Specifications Specification DocumentsData Flow Types Bus Transactions2. USB Data Flow Types Packets Endpoints3. lists the USB packet types 4. Maximum Payload Sizes Device Class Specifications5. USB Device Class Specifications Data Rates7. Control Transfer Data Packet Device RequestsStandard Device Requests 6. Device Request TypesDevice Descriptor for Bidirectional Printer Device DescriptorsString descriptor 1. Sample USB Firmware SetupSample Firmware Specifications Sample USB FirmwareSample USB Host Software Compiling and Executing Sample USB FirmwareConfirming USB Compliance with Usbcheck.exe Software Development Creating USB Mouse Demo Modifying Application Layer Receive Only Skeleton Evaluating USB Equipment Simple DebuggingOverview of ML60851C Operation Device Controller Specifications1. ML60851C Specifications USB Bits and Pieces1. ML60851C Block Diagram Connecting Microcontroller to USB Controller2. Microcontroller with 16- or 32-Bit Bus Special USB ConsiderationsBuilding a Product Vendor and Product IDsOther Tools Necessary Products Limitations Port 7 Registers Port 7 LED2 ControlChanging LED2 Color Sample Port 7 Control Program JOB60851 Board Standard I/O Standard I/O over Serial Link2. Serial Port Structure Serial PortSerial port SIO0 Chapter Internal timer 9 and following 3. read Operation Read and write Functions4. write Operation Standard I/O Examples Sample Program Using Standard OutputDebugging with Standard I/O Sample Program Using Standard Input