The information in this document is subject to change without notice and no part of this document may be copied or reproduced without the prior written consent. Copyrights 2005 DAQ system, All rights reserved. http://www.daqsystem.com - 1 -...
USB-EK01 Users Manual (Rev 1.0) 1. Introduction JP1(Boare Extention) DAQ system www.daqsystem.com D1 D2 D3 RS232 connection AN2131 Reset Power (USB B type Connector) JP7(Boare Extention) [Figure 1-1. USB-EK01 Out-side View] Above picture views board out-side, it display Reset switch and Power LED which light on when power supply with connection cable.
USB-EK01 Users Manual (Rev 1.0) 2. USB-EK01 Function & Specification <Function> - USB Protocol Test & Development - 8051 Program Test & Development - PC용 USB device driver Test & Development - Step by Step Debugging Practice <Specification> - Full speed (12Mbps) USB Support...
USB-EK01 Users Manual (Rev 1.0) 3. Installation 3.1 Confirm Product Contents [Figure 3-1. USB-EK01 Main Contents] (1) USB-EK01 Evaluation board (2) USB (A-B) Cable (3) 9Pin Null Modem cable (4) CD (Manual/Schematic/Sample test etc..) 3.2. Cypress Development kit Installation A development and exercise of board refer to mainly Development Kit at Cypress, you can get a lot of information and report.
Page 6
USB-EK01 Users Manual (Rev 1.0) [Figure 3-2. Folder Structure] [Notice] If you want a Keil software and separate reference report, you shall select a custom install option not default. You confirm a folder at your PC as above picture when normally finished install.
USB-EK01 Users Manual (Rev 1.0) 3.3 Board Driver Installation (Notice) All test made a Windows2000 Professional with bases, we are having finished the final test at Windows XP. Execute “Device Manager” at My Computer -> Properties -> Hardware -> Device Manager window.
Page 8
USB-EK01 Users Manual (Rev 1.0) Figure 3.4 shows that “Device Manager” execution window. You can check all USB device connection at your PC. Currently not yet connect “USB-EK01”, it is not marked. [Figure 3.5 USB-EK01 Connection] The USB-EK01 is connected to PC through USB cable after jumper setting like above red circle.
Page 9
USB-EK01 Users Manual (Rev 1.0) [Figure 3.6 A board was registered with default to PC] If the jumper don’t connect, the screen is as follows. The way that you can confirm, after remove jumper, reset switch of a board is “ON/OFF” or reconnect a USB cable after remove.
Page 10
USB-EK01 Users Manual (Rev 1.0) You confirm to register to PC like figure 3.6 that rebooting a board after connection jumper. After that, “EZ-USB Control Panel(EzMr.exe)” utility which given Cypress Development Kit perform. [Figure 3.8 EZ-USB Control Panel] (Notice) When development a product at Cypress, Usable utility is searchable in “Cypress\USB \Bin”...
Page 11
PC. Basically all test above setting even is possible, a driver of DAQ system shall be install in case of the debugging that used Keil software in order to put a necessary image to a board. The Vender ID which used to installation is “FFFF”, this is not the ID which it was registered and I used it as I select temporary.
Page 12
USB-EK01 Users Manual (Rev 1.0) The contents that it was changed are as follows. 0000h: B0 FF FF 01 00 00 00, in other words, VID is 0xFFFF and PID is 0x0001. When finished EEPROM writing, press reset switch or remove and re-connect the USB cable.
Page 14
USB-EK01 Users Manual (Rev 1.0) [Figure 3.14 Driver Selection window] After select a file “daqusbw2k.inf” in Software\Driver folder at CDROM, press “Confirm” button and will finish driver installation. If installation finish, press “finish” button and disappear window like figure 3.15.
Page 15
USB-EK01 Users Manual (Rev 1.0) At display of “Start/Execution”, write “regedit” and press “Confirm” button. [Figure 3.16 “Start/Execution” Window] [Figure 3.17 Registry Editor Window] If a registry editor is used most a case, it use to confirm and erase a value of key.
User can test all functions only using the USB-EK01 board, all development tools can use it to free or evaluation type. Also, you can easily use because you don’t need special power supply.
Page 17
RS232C connection, it can use a debugging and general communication to maximum 115200bps. Figure 4.2 shows USB-EK01 functional block diagram, we put emphasis to expansibility and a design was performed around the main AN2131QC chip. All Data, Address, I/O can exchange a board expansion, can connect external device through RS232C, USB, I2C interface.
USB-EK01 Users Manual (Rev 1.0) 4.2 Memory Map 4.2.1 USB-EK01(8051) Memory Map Figure 4.3 shows general 8051 Microcontroller memory structure. The 8051 is equipped with a memory which display inside dotted line, it is different from memory which it use external data/address bus.
Page 20
6,976 Bytes DATA EA = 0 BDATA REGs 0x0000 [Figure 4.4 USB-EK01(AN2131) Memory Map] But, if the USB-EK01 board use an expansion connector and it connect with USB- IK01, the board can use external memory area. http://www.daqsystem.com - 20 -...
Page 21
I/O.) This modify can perform to connect a printer port of PC without special device.(Inclusion ISP interface itself). [Figure 4.5 USB-IK01 Out-side View] [Figure 4.5 USB-IK01 and USB-EK01 combination] http://www.daqsystem.com - 21 -...
Page 22
0x1B40 0x0000 [Figure 4.6 When USB-IK01 and USB-EK01 combination Memory Map(EA = 0)] If EA pin of chip is Low Level(‘0’), the program memory use a RAM of inside AN2131 chip. But, if EA pin of chip is High Level(‘1’), it use external memory area.
USB-EK01 Users Manual (Rev 1.0) 4.3 Booting Option In case of AN2131, there is three reset mode. (1) Power On Reset : When power on, let reset state stay to EZ-USB core as much as a time constant at external RC circuit until internal PLL becomes stabilization.
Page 24
USB-EK01 Users Manual (Rev 1.0) AN2131 registers it to Host(PC) to 0x0547, 0x2131. 8051 core is stayed with reset state. The Figure 4.9 shows by an action regarding booting to Flow Chart. Power On Reset Not Detected Check EEPROM Check EA...
USB-EK01 Users Manual (Rev 1.0) (ex. 2) 0000h: B0 FF FF 01 00 00 00 (Refer to sample.eep) daqusb.sys driver is used. VID FFFF PID 0001 In case of 0xB2 (refer to fw_out.eep) 0000h: B2 FF FF 01 00 00 00 In case of others(it is not 0xB0 or B2) ezusb.sys driver is used.
PRINTER Port is able to program EPLD of USB-IK01. [Figure 5.1 Host(PC) Port] USB-EK01 is connected to PC through USB cable like figure 5.2. If it is connected, LED in the red circle lights on to show power supply. RS232C cable is used to test serial communication or debugging. If there is no used, you don’t need to connect.
Page 27
If it is loaded file at once, it use to press “ReLoad” button as it is remembering information of a file loaded next time. At this time, file dialogue box don’t appear. [Figure 5.3 A way downloading an executable file(*.hex) to USB-EK01] http://www.daqsystem.com...
Page 28
USB-EK01 Users Manual (Rev 1.0) < LED lighting test > You can find a file which it is used to test in folder of “Software\Example\USB- EK01\Led” at CDROM, and test to download led.hex. After execution, a LED (D1 and D2) in the red circle repeat alternately lighting and lights out.
Page 29
For a RS232 communication program is used to a test, the program that it is used most is Windows HyperTerminal. But, we used the “comm1” which was the communication program that it made at DAQ system. The USB-EK01 connects to PC with RS232 cable and executes program “comm.exe”. This program can find in “Utility”...
Page 30
USB-EK01 Users Manual (Rev 1.0) < Switch ON/OFF test > You can find a file which it is used to test in folder of “Software\Example\USB- EK01\Switch” at CDROM, and test to download “Switch.hex”.. For a RS232 communication program is used to a test, if press switch1, LED(D1) lights on and transmits contents to serial.
Page 31
USB-EK01 Users Manual (Rev 1.0) < EEPROM read/write test > You can find a file which it is used to test in folder of “Software\Example\USB- EK01\EEPROM” at CDROM, and test to download “eeprom.hex”.. For a RS232 communication program is used to a test, if press switch1, it transmits through communication as reading contents of EEPROM.
Page 32
USB-EK01 Users Manual (Rev 1.0) < USB Disconnection test > You can find a file which it is used to test in folder of “Software\Example\USB- EK01\Discon” at CDROM, and test to download “discon.hex”. If press switch1, a device disconnect at PC. You can confirm that a driver disappeared at a “Universal Serial Bus controllers”...
Usage of a necessary program refers to Keil C51 manual to a test. You can get detailed information in Keil Web site. You can use the evaluation copy to download Keil Web site. First, double click Software\Example\USB-EK01\Led.Uv2. (If Keil software installation normally worked, a project opens like below picture.) An extension of project is .Uv2.
Page 34
USB-EK01 Users Manual (Rev 1.0) [Figure 5.10 a way to download execution binary (*.hex) at USB-EK01] The above way is a way testing a direct execution code after download through USB connection, a way of debugging with serial communication is as follows.
Page 35
USB-EK01 Users Manual (Rev 1.0) And it uses a communication speed to 19200bps in the debugging mode. For the following Dialog box to appear a setting way if you perform a menu “Target1” at Project/Option for Target, you set it up to press a setting button as you select a debug tab.
Page 36
USB-EK01 Users Manual (Rev 1.0) [Figure 5.13 Keil Debugging setup window2] 5.3 Firmware(Ezusbfw) Description A firmware source code is providing that it implemented a basic USB protocol at 8051 cores to developers at Cypress. You can find a source code as like picture.
Page 37
USB-EK01 Users Manual (Rev 1.0) If double clicks “fw.Uv2” at the above screen, the project is opened at Keil program as like below picture. See the figure 5.14, A file used 5(fw.c periph.c dscr.a51, ezusb.lib, usbjmptb.obj), VID/PID and string table which it is used USB device registration can find at DSCR.A51(Assembly Source Code) and it can modify.
USB-EK01 Users Manual (Rev 1.0) 5.4 Make USB PC driver DDK(Driver Development Kit) shall be installed to PC in order to make a driver for Win32. Usable DDK is Windows 98/2000/me. Before DDK installation, Visual C++ shall be installed more than version 5.0.
Page 39
USB-EK01 Users Manual (Rev 1.0) (3) Driver Compile A driver source to provide to a sample at Cypress is ezloader, ezmon, ezusbdrv three this. It can find a “Drivers” folder, three drivers entire source is same, but there is some difference.
USB-EK01 Users Manual (Rev 1.0) Basic source of all WDM drivers is as follows. ♣ DriverEntry(): CallBack Routine Registration ♣ AddDevice(): DriverObject Creation, Symbolic linkname Registration, TopOfStackObject Get ♣ PnP Process: Power/Pnp Relevant Facts Process, USB Descriptor Get, Pipe Information Get, Device Remove Routine ♣...
Page 41
USB-EK01 Users Manual (Rev 1.0) PID Low PID High DID Low DID High Not Used 5.5.3 Serial EEPROM with First Byte is 0xB2(fw_out.eep참조) If the first byte value is 0xB0, registers it to Host(PC) as like following table. After an execution binary image download to memory at EEPROM, you shall release 8051 at reset at a device driver or application program.
Page 42
-IR -M 0x8000 -V 0x6712 -P 0x0001 -F 0xB2 -O fw_out.eep fw.hex An EEPROM image to make uses “EZ-USB Control Panel” like figure 5.17, and uses download to EEPROM memory of USB-EK01 board. [Figure 5.17 EEPROM download image] http://www.daqsystem.com...
USB-EK01 Users Manual (Rev 1.0) 5.6 Application Program for PC There are a lot of tools and methods to make application for PC, we used a way to make it with using Visual C++ of Microsoft at this manual. A way to be the best in case of programming, individual engineer is the best to use a tool that it is familiar and comfortable.
Page 44
USB-EK01 Users Manual (Rev 1.0) For more information, refer to “EZ-USB General Purpose Driver Spec.pdf”. Figure 5.10 is an execution screen of the last application finished. When a program execute, a device searches for connection at PC. If it does not find, it closed automatically.
Page 45
(D1/D2) of board fits it on the button and repeat ON/OFF. Also, if it press a switch in the blue circle of USB-EK01, LED(D1/D2) repeat ON/OFF. This contents transfer automatically and it is appeared to LED output of an application.
USB-EK01 Users Manual (Rev 1.0) Appendix A. Driver Installation and Remove <Driver Installation> If a device (PCI, USB etc.) supporting Plug and Play is connected in a system(PC), to make Enumeration at OS as using device ID(VID) and product ID(PID). At this time, if it is found a driver to fit in a device at registry, it is loaded with a relevant driver.
Page 47
USB-EK01 Users Manual (Rev 1.0) Above two executable file is unified at the Windows XP, also you shall erase a key value in “Security” menu as you select “user authority” after selecting all authority. Registry key and file which you shall erase are as follows.
Page 48
USB-EK01 Users Manual (Rev 1.0) We can know the inf file which we shall remove at the above picture. It is a “oem6.inf”, this file can find an inf folder in Windows installation folder. For example, it is a “C:\WINNT\Inf” folder.
Page 49
USB-EK01 Users Manual (Rev 1.0) B. Connector (JP1 and JP7) PIN map <JP1> PIN# Name Description No Connection No Connection Signal Ground Signal Ground Serial ROM select 0 Serial ROM select 1 (short to ground for 24LC64) 8051 General Purpose PortA 7...
Page 50
USB-EK01 Users Manual (Rev 1.0) Signal Ground 8051 General Purpose PortB 2 8051 General Purpose PortB 3 8051 General Purpose PortB 0 8051 General Purpose PortB 1 3.3V 3.3V Power supply 3.3V 3.3V Power Supply <JP7> PIN# Name Description USB_N...
Page 51
USB-EK01 Users Manual (Rev 1.0) Address Bus 11 8051 General Purpose PortC 0 Signal Ground 8051 General Purpose PortC 2 8051 General Purpose PortC 1 Address Bus 12 8051 General Purpose PortC 3 Address Bus 14 Address Bus 13 8051 General Purpose PortC 4...
Page 52
USB-EK01 Users Manual (Rev 1.0) Reference 1. EZ-USB Manual Technical Reference Manual V1.10 -- Cypress Semiconductor Corporation 2. EZ-USB General Purpose Driver Specification -- Cypress Semiconductor Corporation 3. USB 2.0 System Architecture -- Don Anderson, USB SIG (www.usb.org) 4. Universal Serial Bus Specification -- Compaq/Intel/Microsoft/NEC, MindShare Inc.
Need help?
Do you have a question about the USB-EK01 and is the answer not in the manual?
Questions and answers