
Cypress Semiconductor Corporation
SL811HS and SL811HST: Application Notes
©2001 Cypress Semiconductor Corporation. All rights reserved. The information
and specifications contained in this document are subject to change without
notice.
Date: 07/26/01
Revision: 1.21
Page: 20
4. SL811HS HOST SOFTWARE
These sample IO subroutines are based on the SL811HS DVK. The Address location is
mapped for the ISA bus space.
The User should redefine the SL11_ADDR variable to match user’s mapping.
The next section shows how a Microcontroller can communicate with SL811HS. In successive
sections, examples will be shown for two possible operations to be performed with the
SL811HS:
- Transmit Data Transmit Data
- Receive Data Receive Data
4.1. SOFTWARE APPLICATION
The SL811HS is intended for embedded systems. This document describes general interface
routines that are required by the SL811HS host USB interface. For integration with a specific
external Microcontroller, you will need to understand the following sections to know how to
communicate with the SL811HS. The interface to the SL811HS is described using an ISA bus,
but these functions can be translated for use with any external CPU or other type of interface
bus.
4.1.1 Single Write Operation
Writing a byte to the SL811HS involves two write cycles. On the first write, the application
must write a register address into the SL811HS's Address Pointer Register. On the second
write, the actual data is written to the chip.
In an I/O mapped application, the function to write a byte to an SL811HS register is shown
below:
Program Sample 1: Single Write Function
void SL11Write(BYTE a, BYTE d)void SL11Write(BYTE a, BYTE d)
{ {
outportb(SL11_ADDR,a); outportb(SL11_ADDR,a);
outportb(SL11_ADDR+1,d); outportb(SL11_ADDR+1,d);
}}
The function to write a block of data of a specific length into the SL811HS from the buffer,
which is defined by the pointer “addr”.
Comentários a estes Manuais