??? 01/27/06 02:08 Read: times |
#108455 - D12 Example in "USB Design By Example" Responding to: ???'s previous message |
On the download page of "USB Design By Example" (Joseph introduced this book at the beginning of this thread), an example for D12 is found. In "Button and Light Variants" section (scroll to the bottom of the page), it is listed as "Philips D12 (Parallel)".
The host application is also listed as "Buttons and Lights". VB and VC sources are downloaded. download page of "USB Design By Example" http://www.intel.com/intelpres...wnload.htm "Philips D12 (Parallel)" ftp://download.intel.com/intelpress/usb/Examples/ZipFiles/d12.zip "Buttons and Lights" VB version ftp://download.intel.com/intelpress/usb/Examples/ZipFiles/BALVB.zip "Buttons and Lights" VC version ftp://download.intel.com/intelpress/usb/Examples/ZipFiles/BALVC.zip To compile the VC host app, header files (setupapi.h and hidsdi.h) from WinDDK is required. ftp://download.intel.com/intelpress/usb/Examples/ZipFiles/FromDDK.zip I overlooked it when I searched once, and found it today. ;-) I think this HID example will fit to your configuration with small (or no) change. In this example, D12 mapped address - D12.A51 - D12address EQU 4001H ; Command Register D12 Interrupt - INT0 And I/O routines for D12 are ISRs.a51 D12write: MOVX @DPTR, A NOP ; Delay a little so that we don't violate NOP ; the back-to-back timing of D12 NOP NOP RET D12command: ; Send command to D12 MOV DPTR, #D12address ; Point to D12 Command Register CALL D12write DEC DPL ; Return with DPTR -> D12 Data Register RET D12GetStatus: ; Get Status. Also clears interrupt CALL D12command ; Fall ino D12read D12read: ; Input from D12 component MOVX A, @DPTR NOP ; Delay a little so that we don't violate NOP ; the back-to-back timing of D12 NOP NOP RET D12 is accessed as a memory mapped I/O in XRAM space. If I could find it on the first search, you would setup your USB project more quickly. However, through the effort of this weeks, you mastered D12 operation and basic part of USB way. This valuable experience should be helpful to modify this example and make your own USB device. Tsuneo |