English
Language : 

ISP1161A Datasheet, PDF (34/134 Pages) NXP Semiconductors – Full-speed Universal Serial Bus single-chip host and device controller
Philips Semiconductors
ISP1161A
Full-speed USB single-chip host and device controller
9397 750 13962
Product data
However, if communication with a peripheral USB device is desired, the device should
be connected to the downstream port and pass enumeration.
// The example program for writing ATL buffer RAM
#include <conio.h>
#include <stdio.h>
#include <dos.h>
// Define register commands
#define wHcTransferCounter 0x22
#define wHcuPInterrupt 0x24
#define wHcATLBufferLength 0x2b
#define wHcBufferStatus 0x2c
// Define I/O Port Address for HC
#define HcDataPort 0x290
#define HcCmdPort 0x292
// Declare external functions to be used
unsigned int HcRegRead(unsigned int wIndex);
void HcRegWrite(unsigned int wIndex,unsigned int wValue);
void main(void)
{
unsigned int i;
unsigned int wCount,wData;
// Prepare PTD data to be written into HC ATL buffer RAM:
unsigned int PTDData[0x28]=
{
0x0800,0x1010,0x0810,0x0005, // PTD header for IN token #1
// Reserved space for payload data of IN token #1
0x0000,0x0000,0x0000,0x0000, 0x0000,0x0000,0x0000,0x0000,
0x0800,0x1008,0x0808,0x0005, // PTD header for IN token #2
// Reserved space for payload data of IN token #2
0x0000,0x0000,0x0000,0x0000,
0x0800,0x1010,0x0410,0x0005, // PTD header for OUT token #1
0x0100,0x0302,0x0504,0x0706, // Payload data for OUT token #1
0x0908,0x0b0a,0x0d0c,0x0f0e,
0x0800,0x1808,0x0408,0x0005, // PTD header for OUT token #2
0x0200,0x0604,0x0a08,0x0e0c // Payload data for OUT token #2
};
HcRegWrite(wHcuPInterrupt,0x04); // Clear EOT interrupt bit
// HcRegWrite(wHcITLBufferLength,0x0);
HcRegWrite(wHcATLBufferLength,0x1000); // RAM full use for ATL
// Set the number of bytes to be transferred
HcRegWrite(wHcTransferCounter,0x50);
wCount = 0x28; // Get word count outport
(HcCmdPort,0x00c1); // Command for ATL buffer write
Rev. 03 — 23 December 2004
© Koninklijke Philips Electronics N.V. 2004. All rights reserved.
34 of 134