Page 3 - OKI
OKI NOTICE 1. The information contained herein can change without notice owing to product and/or technicalimprovements. Before using the product, please make sure that the information being referred to isup-to-date. 2. The outline of action and examples for application circuits described herein have...
Page 4 - Contents
i Contents 1. Introduction ............................................................................ 1-1 1-1. Cheking Packing List ................................................................................... 1-2 1-2. Host Environment ...........................................................
Page 5 - ii
ii 3-2-1. Connectors and Switches .............................................................................. 3-3 3-2-2. Circuit Diagram .............................................................................................. 3-5 3-2-3. Parts List ..............................................
Page 6 - iii
iii 4-2-8. Simple Debugging........................................................................................ 4-16 4-2-9. Evaluating USB Equipment ......................................................................... 4-16 4-3. USB Bits and Pieces ..............................................
Page 8 - Chapter 1 Introduction
Chapter 1 Introduction page 1-2 1-1. Checking Packing List Thank you for purchasing the JOB60851 Starter Kit. The JOB60851 Starter Kit drives an Oki Electric Industry ML60851 Universal Serial Bus (USB)device controller with an Oki MSM66Q573 microcontroller to create a starting point for developingpr...
Page 9 - Microsoft Windows 98
Chapter 1 Introduction page 1-3 1-2. Host Environment The JOB60851 Starter Kit assumes the following development environment. • Microsoft Windows 98 • USB interface fully compatible with Microsoft Windows 98 USB driver • Terminal emulation software The compiler package will also run under Microsoft ...
Page 10 - Precaution for Safe and Proper Use; Labels; Warning; Icons
Chapter 1 Introduction page 1-4 1-3. Precaution for Safe and Proper Use This User’s Guide uses various labels and icons that serve as your guides to operating this productsafely and properly so as to prevent death, personal injury, and property damage. The followingtable lists these labels and their...
Page 11 - Use only the specified voltage.
Chapter 1 Introduction page 1-5 Please read this page before using the product. Warning Use only the specified voltage. Using the wrong voltage risks fire and electrical shock. At the first signs of smoke, an unusual smell, or other problems,unplug the emulator and disconnect all external power cord...
Page 12 - Please read this page before using the product.; Caution; Such factors risk fire and breakdown.; Use only the cables and other accessories provided.; Using non-compatible parts risks fire and breakdown.
Chapter 1 Introduction page 1-6 Please read this page before using the product. Caution Do not use this product on an unstable or inclined base as it canfall or overturn, producing injury. Do not use this product in an environment exposing it toexcessive vibration, strong magnetic fields, or corrosi...
Page 13 - Notation
Chapter 1 Introduction page 1-7 Notation This manual utilizes the following notational conventions for convenience. n Caution n A “caution” indicates a section of the manual thatrequires special attention. n Reference n A “reference” provides information related to the currenttopic and indicates the...
Page 14 - Putting Board through Its Paces
Page 15 - Chapter 2 Putting Board through its Paces
Chapter 2 Putting Board through its Paces page 2-2 2-1. Setup 2-1-1. Configuring JOB60851 Board Make sure that the switches and jumpers numbered 4, 7, 8, and 9 in Figure 2.1.1 are all in theirfactory default positions, B. Figure 2.1.1. JOB60851 Board, Top View (1) AC adapter jack (6) Serial (RS-232C...
Page 16 - Installing Development Software; Work directory and Batch file fields to the names used above.; Note
Chapter 2 Putting Board through its Paces Page2-3 2-1-2. Installing Development Software (1) Install CC665S compiler package 1. Create a directory for the package--c:\665s, for example. 2. Copy the contents of the CD-ROM directory \package\cc665s to that directory. readme.txt c665spak.exe mac66k.exe...
Page 17 - Connecting Board
Chapter 2 Putting Board through its Paces page 2-4 2-1-3. Connecting Board This section gives the procedures for preparing the JOB60851 board for connection to thedevelopment host. 1. Make sure that the Flash writer selection switch (FW-SEL, #4 in Figure 2.1.1) is in its Bposition. 2. Plug the AC ad...
Page 18 - The options and the meanings are:
Chapter 2 Putting Board through its Paces Page2-5 VENDOR -- Vendor Request test Detail Usage for -? option: RwBulk INFO -? RwBulk BULK -? RwBulk DESC -? RwBulk CLASS -? RwBulk VENDOR -? Examples: RwBulk -u RwBulk DESC 03 00 00 00FF RwBulk -o Pipe00 -fo out.dat -vl 2 RwBulk -i 1 -r 8192 -fi in.dat -v...
Page 19 - Try one data transfer in each direction.
Chapter 2 Putting Board through its Paces page 2-6 "USB_ENDPOINT_DESCRIPTOR for Pipe00" "USB_ENDPOINT_DESCRIPTOR for Pipe01" "USB_ENDPOINT_DESCRIPTOR for Pipe02" The software defines three pipes, PIPE00 to PIPE02. The first is for output--that is, from thedevelopment host to ...
Page 20 - Connecting Serial Cable; serial cable to the JOB60851 board.
Chapter 2 Putting Board through its Paces Page2-7 2-3-1. Connecting Serial Cable 1. Disconnect the USB cable from the board and plug the AC adapter into the jack (#1 in Figure2.1.1). Make sure that the power (#2 in Figure 2.1.1) is OFF. 2. Plug one end of the serial cable into a serial port on the d...
Page 21 - Synchronizing Link
Chapter 2 Putting Board through its Paces page 2-8 Speed 38,400 b/s Word size 8 bits Parity check None Stop bits 2 Flow control None (3) Activating JOB60851 board Once the terminal emulator is configured, turn on the power (#2 in Figure 2.1.1). 2-3-3. Synchronizing Link Before communicating with the...
Page 22 - the above program to display a different string.; st byte; Save the modified version. Exit or minimize the text editor.
Chapter 2 Putting Board through its Paces Page2-9 the above program to display a different string. 1. Copy the source code main.c to a new name, test.c, in the work directory--c:\test in our example. 2. Open the copy in a text editor. #include <stdio.h> #include <stdlib.h> #include <m...
Page 23 - System Specifications
Page 24 - Chapter 3 System Specifications; System Objective
Chapter 3 System Specifications page 3-2 3-1. System Components 3-1-1. System Objective The JOB60851 board's primary objective is lowering the threshold for developing new USB devices. 3-1-2. System Components The JOB60851 board has the components shown in Figure 3.1.1. JOB60851 Figure 3.1.1. System...
Page 25 - Connectors and Switches; The included AC adapter has the following specifications.
Chapter 3 System Specifications page 3-3 3-2. Hardware Specification 3-2-1. Connectors and Switches Figure 3.2.1. JOB60851 Board, Top View (1) AC adapter jack The included AC adapter has the following specifications. Input: 100 V AC, 50/60 Hz, 18 VA Output: 10 V DC, 850 mA n Note n Use only the AC a...
Page 26 - This Series B connector is for the USB cable.
Chapter 3 System Specifications page 3-4 (4) Flash writer selection switch (FW-SEL) The B side of this switch is for executing the program in the MSM66Q573 Flash memory oroverwriting it with the PW66K Flash writer (available separately). (5) USB connector This Series B connector is for the USB cable...
Page 27 - Circuit Diagram
Chapter 3 System Specifications page 3-5 3-2-2. Circuit Diagram Figure 3.2.2. Circuit Diagram (1/2)
Page 29 - Parts List
Chapter 3 System Specifications page 3-7 3-2-3. Parts List Tables 3.2.1 and 3.2.2 list the parts on the JOB60851 board. Table 3.2.1. Parts List (1/2) Item Quantity Reference Part DSCRIPTION 1 15 C13,C15,C16,C17,C18,C19,C20, C21,C22,C23 0.1uF Ceramic Capacitor C24,C25,C26,C27,C28 2 1 C7 1000pF Cerami...
Page 30 - Memory Maps
Chapter 3 System Specifications page 3-8 3-2-4. Memory Maps This Section gives code and data memory maps for the various JOB60851 operation modes. (1) Download mode This mode maps the code memory to the EPROM and the data memory to program RAM andFlash memory. It uses the loader, a program stored in...
Page 34 - Resources Uses
Chapter 3 System Specifications page 3-12 3-3. System Limitations 3-3-1. Resources Uses The user connectors (CN1 and CN2) on the JOB60851 board make available to the user applicationsystem almost all onboard MSM66Q573 microcontroller pins and thus most microcontrollerfunctionality. The JOB60851 boar...
Page 36 - Software Development
Page 37 - Chapter 4 Software Development; Bus Topology, Addresses, and Hot Plugging
Chapter 4 Software Development page 4-2 Section 4-1. "USB Basics" provides an overview of the Universal Serial Bus (USB) specifications aswell as URLs for obtaining detailed specifications. Section 4-2. "Sample USB Firmware" provides a functional overview of the sample device firmwar...
Page 38 - Specification Documents
Chapter 4 Software Development page 4-3 4-1-2. Specification Documents USB specifications have been established by the USB Implementers Forum. These and othermaterials are available on the World Wide Web at the following URLs. Forum top page http://www.usb.org/developers/ Developers section http://w...
Page 39 - Hub Specification; Data Flow Types
Chapter 4 Software Development page 4-4 standard device requests, and standard devicedescriptors Chapter 10 USB Host: Hardwareand Software Functions and operation of host hardware andsoftware Chapter 11 Hub Specification Hub port operation, requests, and descriptors Chapter 4 provides a firm groundi...
Page 40 - Packets; Endpoints
Chapter 4 Software Development page 4-5 Figure 4.1.2. Two USB Transactions All bus transactions begin with a token packet from the host. Devices never initiate data transfers ontheir own. The host controller is in charge of scheduling all traffic on the bus. It schedules the appropriatetransactions ...
Page 41 - Data Rates; or less; Device Class Specifications; There is also a standard for downloading programs to devices.
Chapter 4 Software Development page 4-6 4-1-8. Data Rates The USB supports two data rates: 12 Mb/s and 1.5 Mb/s. Table 4.1.4 lists the maximum payloadsizes for each combination of data flow type and data rate. Table 4.1.4. Maximum Payload Sizes MAX Payload Size Transfer Types 12 Mbps 1.5 Mbps Contro...
Page 42 - There are three types of device requests.; A control transfer consists of up to three stages.
Chapter 4 Software Development page 4-7 4-1-10. Device Requests Device requests represent commands from the host to USB functions using control transfers. TheUSB function parses the request, performs the necessary action, and returns the appropriateresponse. There are three types of device requests....
Page 44 - (4) Endpoint descriptor Total size of this descriptor in bytes
Chapter 4 Software Development page 4-9 Device release number in binary coded decimal Index numbers for string descriptors describing manufacturer, product, and device serial number Number of possible configurations (2) Configuration descriptor Total size of this descriptor in bytes Number of interf...
Page 45 - Setup
Chapter 4 Software Development page 4-10 4-2. Sample USB Firmware The JOB60851 Starter Kit includes the complete source code for use as the starting point for the userUSB firmware. To see the effects of user modifications on behavior, edit the source code, compile it,link it into an executable .HEX ...
Page 46 - Sample USB Host Software; queries with regard to this software.; Compiling and Executing Sample USB Firmware
Chapter 4 Software Development page 4-11 4-2-3. Sample USB Host Software The CD-ROM directory \package\host contains the following USB host software for testing suchthings as bulk data flow. A brief overview of operation appears in Section 2. Readme.txt Software description, usage notes, etc. Rwbulk...
Page 47 - Detach all USB devices connected to the personal computer.
Chapter 4 Software Development page 4-12 http://www.usb.org/developers/complian.html n Note n As of August 1999, this software is at version 3.2 and requires Windows 98 SecondEdition. Users of older Windows 98 versions should download version 2.9 instead. Once this software has been successfully ins...
Page 48 - Creating USB Mouse Demo; (4) Downloading program and installing mouse driver
Chapter 4 Software Development page 4-13 4-2-6. Creating USB Mouse Demo The next stage involves modifying the sample program slightly so that the JOB60851 boardemulates a USB mouse. Use the following steps to modify the source code and then recompile. (1) Modifying source code The file Include\Class...
Page 49 - Modifying Application Layer; descriptor; For further details on the API functions, refer to the file M852.txt.
Chapter 4 Software Development page 4-14 n Note n The Windows 98 CD-ROM is not necessary if the OEM release has copied theinstallation image from the CD-ROM to the directory c:\Windows\Option. If so, specifythat directory instead of the CD-ROM. (5) Operate mouse with terminal emulator After reading ...
Page 50 - Receive Only Skeleton
Chapter 4 Software Development page 4-15 Receive Only Skeleton char buf_rx[BUF_SIZE]; void bulk_rx(uchar *buf, uint size) { /* Called after receiving each packet, this function manages buffer overflow for the application layer. */ if(Receive buffer threatens to overflow){ usb_rx_start(buf_rx, EP_RX)...
Page 51 - Simple Debugging
Chapter 4 Software Development page 4-16 4-2-8. Simple Debugging The JOB60851 board allows simple debugging over the serial link to a terminal emulator withprintf(), scanf(), and other C standard I/O library functions. Also available for use in debugging isLED2, which is connected to Port 7 and thus...
Page 52 - Device Controller Specifications
Chapter 4 Software Development page 4-17 4-3. USB Bits and Pieces 4-3-1. Device Controller Specifications Table 4.3.1 summarizes the ML60851C specifications. For detailed device specifications, see thedata sheet (Ml60851c.pdf). Table 4.3.1. ML60851C Specifications Data transfer speed Full speed (12 ...
Page 53 - Connecting Microcontroller to USB Controller; The 16-bit data bus is only available when 16-bit DMA is used.
Chapter 4 Software Development page 4-18 Figure 4.3.1. ML60851C Block Diagram Protocol engine operation for a control transfer setup transaction differs from that for all othertransactions. Setup transactions always write the eight bytes in the associated data packet to the setup registers. Ifthis d...
Page 54 - Special USB Considerations; A for
Chapter 4 Software Development page 4-19 Figure 4.3.2 shows sample connections to a microcontroller with a 16- or 32-bit bus. Register must be 8 bits wide. Only DMA uses 16-bit bus. Registers must be aligned at wordboundaries for 16-bit bus and at double boundaries for 32-bit bus. Figure 4.3.2. Micr...
Page 55 - Building a Product
Chapter 4 Software Development page 4-20 with the above-mentioned requirement for average suspend current. 4-3-5. Building a Product Generally speaking, building a product with the help of the JOB60851 board requires the followingmodifications and additions to the software. (1) Adding and modifying ...
Page 56 - Computer Access Technology Corporation (CATC); Genoa Technology USB ExpertTM Protocol Analyzer; Japanese distributor:; Note on Porting
Chapter 4 Software Development page 4-21 A bus monitor also comes in handy during host driver development when the personal computerhangs, making it impossible to pinpoint the exact circumstances producing the failure. Bus monitor data is also highly effective in tracing host controller operation an...
Page 57 - Limitations; small models. Other memory models have not been tested.
Chapter 4 Software Development page 4-22 (4) #asm and #endasm These two directives enclose an in-line assembly language block, which the compiler simplypasses to the assembler. The sample firmware uses them in read_fifo() and write_fifo(), thefunctions for reading from and writing to USB controller ...
Page 58 - Port 7 Registers; Port Secondary Function Control Register (P7SF)
Chapter 4 Software Development page 4-23 4-4. Port 7 LED2 Control The MSM66Q573 microcontroller on the JOB60851 board has twelve bidirectional ports (P0 to P11)with 75 pins and an input only port (P12). The Section describes the use of Port 7 (P7), the one connected to LED2. 4-4-1. Port 7 Registers ...
Page 59 - Changing LED2 Color; Configure Port 7 pin 1 for output
Chapter 4 Software Development page 4-24 This concludes the description of Port 7. To use the port, manipulate the above registers within theprogram. For further details on registers for other ports and Port 7 operation, refer to Chapter 5 in theMSM6657 Family User's Manual. 4-4-2. Changing LED2 Col...
Page 60 - Sample Port 7 Control Program
Chapter 4 Software Development page 4-25 Sample Port 7 Control Program /* Sample program(Port7) */ /* Filename:port7exp.c */ /* Copyright(C) 1999 TECHNOCOLLAGE,Inc. All rights reserved. */ #include<stdio.h> #include<stdlib.h> #include<m66573.h> void main(void) { int i = 0; unsigned...
Page 62 - Command Line; Serial Port
Chapter 4 Software Development page 4-27 Table 4.5.1. Library Functions Calling read() and write() I/O Library Function Required Low-Level Function fgetc,fgets,fscanf,getc,getchar,gets,scanf read fflush,fprintf,fputc,fputs,fwrite,printf,putc,putchar,puts,vfprintf,vprintf write For further details on...
Page 64 - Receive end interrupt flag
Chapter 4 Software Development page 4-29 Receive end interrupt flag "0" (3) Configuring TX and RX pins These pins represent secondary functions for Port 7 pins 1 and 0, respectively, so write thefollowing values to the corresponding bits in the Port Mode (P7IO) and Port SecondaryFunction Con...
Page 65 - pointer as necessary for string input.
Chapter 4 Software Development page 4-30 pointer as necessary for string input. If the character is a carriage return, the function echoes both it and a line feed back to the terminalemulator and stores the latter in memory instead. The function repeats the above cycle the number of times specified ...
Page 66 - Standard I/O Examples; This Section presents examples actually using this standard I/O.; Sample Program Using Standard Output
Chapter 4 Software Development page 4-31 4-5-4. Standard I/O Examples This Section presents examples actually using this standard I/O. For further details on the printf_c(), puts(), and gets() library functions used, refer to the RTL665SRun-Time Library Reference. (1) Using standard output and write...
Page 67 - Sample Program Using Standard Input; Debugging with Standard I/O
Chapter 4 Software Development page 4-32 Sample Program Using Standard Input /* Read/Write sample program 2 */ /* Filename:rw_smpl2.c */ /* Copyright(C) 1999 Oki Electric Industry Co.,Ltd. all right reserved. */ /* Copyright(C) 1999 TECHNOCOLLAGE,Inc. all right reserved. */ #include<stdio.h> #...