Freescale Semiconductor Microcontrollers User Manual

Page 310

Advertising
background image

HC08 Full Chip Simulation

Configuration Procedure

310

Microcontrollers Debugger Manual

; (C)opyright P&E Microcomputer Systems, 2005
;
; You may use this code freely as long as this copyright notice
; and website address is included. Visit us at www.pemicro.com

; This application is meant to demonstrate a framework for an
; application running on the 68HC908JW32. It demonstrates a simple HID
; interface for a USB device and uses interrupts from the USB
; peripheral. The HID interface is supported through standard API calls
; in Windows® XP, Windows® 2000, or Windows Vista™ Operating Systems.
; For more information on USB, visit the USB
; developers website at www.usb.org and download the USB specification
; revision 2.0 and the HID device class specification version 1.1 for
; more details.

RAMStart equ $0060 ; start of RAM for JW32
RomStart equ $7000 ; start of Flash for JW32
VectorStart equ $FFEE ; start of Vectors for JW32
EP1BuffStart equ $1000 ; start of buffer for endpoint
1 of the USB
EP2BuffStart equ $1010 ; start of buffer for endpoint
2 of the USB

$Include 'JW32regs.inc'

org RamStart
Setup_Packet ds 8 ; array for SETUP packet
bmReqType equ Setup_packet ; Characteristic of Request
bRequest equ {Setup_packet+1} ; Request Code
wValueL equ {Setup_packet+2} ; Low byte Value Field
wValueH equ {Setup_packet+3} ; High byte Value Field
wIndexL equ {Setup_packet+4} ; Low byte Index Field
wIndexH equ {Setup_packet+5} ; High byte Index Field
wLengthL equ {Setup_packet+6} ; Low byte Length Field
wLengthH equ {Setup_packet+7} ; High byte Length Field

GET_DESC equ 6 ; Standard Request code for
GET_DESCRIPTOR
SYNC_FRAME equ 12t ; Standard Request code for SYNC_FRAME

control ds 1 ; type of transfer in progress
descptr ds 2 ; pointer to descriptor being sent
descendptr ds 2 ; end pointer to descriptor being sent
buffptr ds 2 ; index into the USB data buffer
tptr ds 2 ; temporary pointer for storage
EP2data ds 8 ; endpoint 2 output received data

org RomStart

Advertising