Oki JOB60851 user manual Connecting Microcontroller to USB Controller, 1. ML60851C Block Diagram

Page 53

Chapter 4 Software Development

USB D+

D-

Transceiver /receiver

Protocol engine

DPLL

Oscillator

Status and

control registers

Setup

registers

(8 bytes)

EP0receive

buffer ( 8 bytes)

EP0 trasmit

buffer (8bytes)

EP1 receive/

trasmit double

buffer

(64 bytesx 2)

EP2 receive/

transmit buffer

(64 bytes)

EP3 transmit

buffer (8 bytes)

FIFO

 

-DMA

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Microcontroller

interface

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A7-A0 AD7- AD0

INTR/

RD/

WR/

CS/

ALE ADSEL

D15-D8

DREQ

DACK

Figure 4.3.1. ML60851C Block Diagram

Protocol engine operation for a control transfer setup transaction differs from that for all other transactions.

Setup transactions always write the eight bytes in the associated data packet to the setup registers. If this data is received successfully, the protocol engine sends an ACK back to the host. It also sends a setup interrupt to the control microcontroller to request register readout.

Data receive transactions write the data from the USB bus to the specified endpoint's receive buffer if there is room. If this data is received successfully, the protocol engine sends an ACK back to the host. It also sends a data received interrupt for the command to the control microcontroller. If there is no room in the receive buffer or there is an error, the protocol engine sends an NAK back to the host.

Data transmit transactions send a data packet from the specified endpoint's transmit buffer to the USB bus if there one ready. If the host then sends an ACK completing the transaction, the Data transmit transactions send a data packet from the specified endpoint's transmit buffer to the USB bus if there one ready. If the host then sends an ACK completing the transaction, the protocol engine empties the buffer. It also sends a transmit buffer empty interrupt to the control microcontroller to request more data.

4-3-3. Connecting Microcontroller to USB Controller

The ML60851C offers the following configuration options for the microcontroller interface.

(1)Choice, with ADSEL pin, of separate or multiplexed address and data buses

(2)Choice, with register setting under program control, of 8- or 16-bit DMA

The 16-bit data bus is only available when 16-bit DMA is used.

The JOB60851 board uses separate address and data buses, an 8-bit data bus, and no DMA.

page 4-18

Image 53
Contents JOB60851 Starter Kit Page OKI Contents Software Development Port 7 LED2 Control Introduction 1. Packing List Checking Packing ListIntroduction Host Environment Icons Precaution for Safe and Proper UseLabels 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 Putting Board through its Paces SetupConfiguring JOB60851 Board Installing Development Software Connecting Board Running Default ProgramInstalling USB Driver Running Flash Memory ProgramUse 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 Objective System ComponentsUse only the AC adapter included with the product Hardware SpecificationConnectors and Switches 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 1. MSM66Q573 Pin Assignments 1/2 System LimitationsResources Uses P11-3/XTOUT System Specifications 1. MSM66Q573 Pin Assignments 2/2Software Development Software Development USB BasicsBus Topology, Addresses, and Hot Plugging Core Specifications Specification Documents2. USB Data Flow Types Data Flow TypesBus Transactions 3. lists the USB packet types PacketsEndpoints 5. USB Device Class Specifications Device Class SpecificationsData Rates 4. Maximum Payload SizesStandard Device Requests Device Requests6. Device Request Types 7. Control Transfer Data PacketDevice Descriptor for Bidirectional Printer Device DescriptorsString descriptor Sample Firmware Specifications SetupSample USB Firmware 1. Sample USB FirmwareConfirming USB Compliance with Usbcheck.exe Sample USB Host SoftwareCompiling and Executing Sample USB Firmware Software Development Creating USB Mouse Demo Modifying Application Layer Receive Only Skeleton Evaluating USB Equipment Simple Debugging1. ML60851C Specifications Device Controller SpecificationsUSB Bits and Pieces Overview of ML60851C Operation1. ML60851C Block Diagram Connecting Microcontroller to USB Controller2. Microcontroller with 16- or 32-Bit Bus Special USB ConsiderationsOther Tools Necessary Building a ProductVendor and Product IDs 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