background image

 

 

http://www.daqsystem.com 

USB-EK01 Users Manual (Rev 1.0) 

- 1 -

 

 

 

USB-EK01   

User Manual 

 

 

 

 

 

 

 

 

 

 

AN2131

EZ-USB

 and 

Cypress

 are trademarks of Cypress Semiconductor, 

Keil

 and 

uVision2

 are trademarks of 

Keil software. 

Windows

Windows2000

Windows NT

  and 

Windows XP

  are trademarks of 

Microsoft

. We 

acknowledge that the trademarks or service names of all other organizations mentioned in this document as their 
own property. 
 
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. 

Summary of Contents for USB-EK01

Page 1: ... Windows2000 Windows NT and Windows XP are trademarks of Microsoft We acknowledge that the trademarks or service names of all other organizations mentioned in this document as their own property 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 reserve...

Page 2: ... 3 Board Driver Installation 4 USB EK01 Description 4 1 USB EK01 Concept 4 2 Memory Map 4 2 1 EK01 Memory map 4 2 2 IK01 Memory Map 4 3 Booting Option 4 4 CDROM Folder 5 Test 5 1 Example 5 2 Program Debugging with KeiluVision 5 3 USB Firmware 5 4 Make USB PC Driver 5 5 Make EEPROM Image 5 6 Application Program for PC Appendix A Driver Installation Remove B Board connector PIN map C Notice Referenc...

Page 3: ...1 Boare Extention JP7 Boare Extention P1 RS232 connection JP4 JP6 JP3 JP2 AN2131 D4 www daqsystem com Reset Power 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 More specific information refer to 4 1 USB EK01 Concept ...

Page 4: ... USB Support Advanced using 8051 core Micro Controller Convenient Interface USB SIE Serial Interface Engine Step by Step Debugging 8051 Compile Test Code size limited 4K Power Supply through USB Cable Max 500mA Two RS232 interface Maximum transfer speed 115200bps Debugging or It can use special purpose Board Reset Firmware Program Load through USB Easy device development through Cypress의 Developme...

Page 5: ...le 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 You can use the Development kit to download at homepage of Cypress www cypress com The Development kit is a software package minimum 60Mbyte size If it install the folder structure is as follows ...

Page 6: ...l 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 The Cypress Development Kit include Keil compiler and debugger you can freely use a code size of 4K byte in range not business purpose ...

Page 7: ...stallation 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 Figure 3 3 Select My computer Properties Figure 3 4 Device Manager window ...

Page 8: ...g Usable EEPROM is same as the following table to a board booting option Refer to I2C Boot Loader of AN2131 manual for special information Bytes EEPROM A2 A1 A0 16 24LC00 N A N A N A 128 24LC01 0 0 0 256 24LC02 0 0 0 4K 24LC32 0 0 1 8K 24LC64 0 0 1 When it is connected to USB cable New Hardware Search Wizard execute automatically you can check the USB device at Device Manager It don t require anot...

Page 9: ...C 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 For more specific information refer to Chapter 4 3 Booting Option Figure 3 7 A board was registered to PC without recognition EEPROM ...

Page 10: ... 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 and Cypress USB Util The execution screen of EZ USB Control Panel EzMr exe is like figure 3 9 If connection doesn t work a device the error message will be marked Figure 3 9 EZ USB Control Panel ...

Page 11: ... it will act to any contents and a report judges the contents as reading the first byte of EEPROM connected to I2C If the first byte is not 0xB0 or 0xB2 it is performed with default as judge it to things without EEPROM Vender ID 0x0547 Product ID 2131 It shall modify contents of EEPROM so that recognition gets a board done to a development board of DAQ system Vender ID 0xFFFF Product ID 0001 For m...

Page 12: ...VID is 0xFFFF and PID is 0x0001 When finished EEPROM writing press reset switch or remove and re connect the USB cable The board gets re registration at PC And then above ID doesn t currently get registration at PC New Hardware Search wizard will be open and display like figure 3 11 Figure 3 11 New Hardware search Wizard Window Press Next button ...

Page 13: ... www daqsystem com USB EK01 Users Manual Rev 1 0 13 figure 3 12 Driver Installation Window Press Next button Figure 3 13 Driver File Search Window After select a location like above figure press Next button ...

Page 14: ...ish driver installation If installation finish press finish button and disappear window like figure 3 15 Figure 3 15 Driver Installation Completion window If installation finish you confirm a registration state that you perform regedit exe at Window All contents registered to OS Windows that is saving to PC stored contents and revised program that can edit it is an registry editor regedit exe ...

Page 15: ...ution 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 Notice If a key value want erase it can erase it at Security items as it perform regedit32 after having exchanged use authority in case of Windows2000 This concludes all installation procedure of test and development ...

Page 16: ...g embedded USB board Firmware development USB device driver development for PC Application Programming through using USB interface at PC and we made it to use debugging practice step by step when embedded firmware development 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 p...

Page 17: ...nnection 13 JP6 Power selection connector It select a power whether get from the power at USB cable or external electric power supply banner 14 JP7 Address Data I O extension connector 15 P1 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...

Page 18: ...01 Users Manual Rev 1 0 18 USB USB EK001 Switchs and LEDs Board Expantion RS232 P S JP3 AN2131 T RxD I O JP4 Addr Data I O 5V 5V COM1 COM1 I2C USB 3 3V D EEPROM 5V Addr Data I O SCL SDA Figure 4 2 USB EK01 Functional Block Diagram ...

Page 19: ...essing in a bit unit From 0x80 to 0xFF of address is SFR Special Function Register area when access to direct addressing methods is general data area IDATA when access to indirect addressing methods The SFR area has the registers for CPU calculation and for control surrounding I O area 8051 has separate space of the data memory area XDATA and the program memory area CODE each area accessing classi...

Page 20: ...is RAM area when first Power ON reset and can make it so that a program operates that user wanted it The USB EK01 board doesn t have special external memory RAM ROM it is same structure of memory map like AN2131 chip 0xFFFF XDATA CODE 6 976 Bytes EA 0 AN2131QC Internal IDATA REGs SFR BDATA DATA 0x0000 REGs Buffers DATA REGs Buffers 0x1B3F 0x1B40 0x1FFF 0x2000 0x27FF 0x7B40 0x7FFF 16x64 Bulk End po...

Page 21: ...ser don t need to special ROM Writer and added LED switch DIP Tact for I O test and was equipped with a chip PCF8574 that can expand I O through I2C interface Also user can freely make a hardware program with EPLD XC9536XL In other words it can exchange an area of address and usage methods of I O This modify can perform to connect a printer port of PC without special device Inclusion ISP interface...

Page 22: ...1 chip But if EA pin of chip is High Level 1 it use external memory area In other words it decide on whether or not there is to perform the first program to enforce in where with EA pin input state when 8051 reset 0xFFFF RAM32K CODE or XDATA USB IK01 Board 0x0000 Note Can be programed the location by EPLD programming and DIP sw 0x7FFF FLASH 64K CODE AN2131QC Internal 0x2000 Figure 4 7 When USB IK0...

Page 23: ...C at Host PC it perceive at EZ USB core automatically it inform this to 8051 to generate interruptINT2 Most registers aren t affected when USB Bus Reset Mainly registers related to USB data transmission are set up to initial prices 8051 Core Reset EZ USB Core XIN OUT Reset Oscillator PLL 2 CLK24 EA I2C EEPROM Address Data 3 3V 12Mhz 24Mhz 48Mhz USB Power ON Reset USB Bus Reset 8051 Reset Figure 4 ...

Page 24: ...e 8051 from Reset VID EEPROM 1 2 Bytes PID EEPROM 3 4 Bytes 8051 remains in Reset Program code may be loaded from host VID 0x0547 Cypress PID 0x2131 EZ USB chip 8051 remains in Reset Program code may be loaded from host VID from Program code PID from Program code Program code from external CODE memory area Release 8051 from Reset Figure 4 9 AN2131 Booting Sequence Below contents shows a sample of ...

Page 25: ... case of others it is not 0xB0 or B2 ezusb sys driver is used VID 0547 PID 2131 4 4 CDROM Folder description The structure and explanation of folder is as follows Figure 4 10 CDROM Folder Structure Table 4 2 CDROM Folder Description Folder Name Description Document Manual Hardware Schematic and BOM Software Source Code Application Driver Sample EEPROM image etc Utility RS232C communication Program...

Page 26: ...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 Figure 5 2 USB EK01 and PC connection using cable A folder of Software Example USB E...

Page 27: ... DownLoad button at EZ USB Control Panel a dialogue box appears and designates a binary file to perform at boards If file transmission is completed a program loaded is newly performed at microcontroller automatically as it make reset of 8051 core at EZ USB Control Panel program 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...

Page 28: ...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 Figure 5 4 LED lighting test ...

Page 29: ...m1 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 folder at CDROM First it fit communication setting Baudrate Stop bits Data bits Parity etc at program We use COM1 like a picture we use a setup value that 38400bps 8 data bit 1 Stop bit Parity None The program perform to downl...

Page 30: ...d 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 If press switch2 LED D2 lights on and transmits contents to serial Figure 5 6 Switch ON OFF test ...

Page 31: ...ss switch1 it transmits through communication as reading contents of EEPROM If press switch2 0x11 record from address of 0 to address of 10 of EEPROM So first after press switch1 you confirm contents of EEPROM To press switch2 new information is writing you confirm recorded contents after press switch1 again Figure 5 7 EEPROM read write test If a test is finished to exchange contents of EEPROM to ...

Page 32: ...n hex If press switch1 a device disconnect at PC You can confirm that a driver disappeared at a Universal Serial Bus controllers of device manager If press switch2 a device try to reconnect to PC As a program didn t program a necessary code in case of re connection at sample program a suitable driver isn t installed If you want to add a code refer to EZUSB firmware code Figure 5 8 USB Disconnectio...

Page 33: ...o 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 Figure 5 9 Keil program execution window You make simply complie as you adjust ON OFF time For more...

Page 34: ... serial communication is as follows As the debugging uses a serial communication COM1 at board you cannot use it with comm exe program at the same time If using com2 at board after being load with a mon int sio1 hex monitor program to a board you shall use it as making JP2 of a board and the separate cable which can connect The cable connection is as follows 1 3 2 1 3 2 4 5 6 7 8 9 5264 03 DSUB 9p...

Page 35: ... default driver of DAQ in case of the debugging At this time you test it as you perform it after confirming contents of a cpdaqmon bat file of a Driver folder You perform it after disconnecting a board with PC when you use batch command In the state that loading became a project and press button like figure 5 9 a screen will be changed by operating debugger like figure 5 12 From here you can test ...

Page 36: ...e 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 Figure 5 13 Firmware source folder ...

Page 37: ...b 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 Most of application code modify at Periph c and can use USBJmpTb OBJ is object code But it can find in Target lib folder with a source form and can use Ezusb lib can modify and use to fit the developers Figure 5 14 VID PIC Modify For more detailed usage and contents r...

Page 38: ...tion Checked build environment is a compile environment which involved a debugging information and it is used in case of development Free build environment is used a driver for distribution Figure 5 15 Installed DDK You shall make generally compile after the first installation In other words if each environment performs it will move to the folder which installed DDK Execution build cZ total source...

Page 39: ...e of Ezloader the code can download when booting You had better to use a source of ezmon You can make a binary image to use first booting and have to compile it A way is as follows that you made it First the program that it is performed make by Keil compiler A result file is xxx hex The binary image that it was used when it made a daqmon sys driver used a Keil debugger monitor mon int sio0 hex The...

Page 40: ...Ack is asserted it decide according to data of EEPROM first byte how to operate 5 5 1 No Serial EEPROM If there is EEPROM if the first byte value isn t 0xB0 and B2 the VID PID of AN2131 registers it to Host PC to 0x0547 0x2131 8051 core is stayed with reset state Therefore you shall release 8051 at reset at a device driver or application program VID 0x0547 Cypress semiconductor PID 0x2131 EZ USB c...

Page 41: ...ge download to memory at EEPROM you shall release 8051 at reset at a device driver or application program It is mainly used when the program capacity is small and EEPROM capacity is enough and you need not to directly connect to PC EEPROM ADDR Description 0 0xB2 1 VID Low 2 VID High 3 PID Low 4 PID High 5 DID Low 6 DID High 7 Length High 8 Length Low 9 Start Address High 10 Start Address Low Data ...

Page 42: ... only transfer to internal memory of AN2131 It don t transfer to external memory To make EEPROM image it is convenient to make a batch file using hex2bix utility The under example shows firmware fw hex is made of EEPROM image you can find a eprom bat file at EEPROM_IM folder in CDROM hex2bix 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 ...

Page 43: ...e driver EZ USB device is registered to Host PC for symbolic names of ezusb i The i is created according to device order registered Figure 5 19 show that a programming with using Visual C you can find a source at Software application folder in CDROM Figure 5 18 Programming with using Visual C This application is for the purpose of operating 32bit Windows operating systems it is essence to use Win3...

Page 44: ...tion 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 If it success to find the program is performed ...

Page 45: ...program processes an ON OFF button of a above screen LED 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 Figure 5 20 Application Interlock Test ...

Page 46: ...ify a driver and exchange ID of a device when it development the work that shall remove a driver of the device which I was registered It shall modify a registry at this time a registry can cause a fatal error if it modifies wrong as it is putting all information of a Microsoft Windows Reference when a registry removal Windows98 and 2000 XP use all different a value of registry key You shall have e...

Page 47: ...ave to CurrentControlSet key it store before control set to ControlSet001 and ControlSet002 and a registry can restore in case of the error occurrence at Windows The ControlSet001 and ControlSet002 shall erase it according to cases 2 It erase a value which it is registered to class in HKLM SYSTEM Current ControlSet Control Class 36FC9E60 C465 11CF 8056 444553540000 A class ID 36FC9E60 C465 11CF 80...

Page 48: ... 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 3 HKLM SYSTEM CurrentControlSet Services Service Name Normally the company name is used most a case ...

Page 49: ...A 4 11 PA3 8051 General Purpose PortA 3 12 PA2 8051 General Purpose PortA 2 13 PA1 8051 General Purpose PortA 1 14 PA0 8051 General Purpose PortA 0 15 GND Signal Ground 16 WAKEUP Wakeup input from CPU suspend 17 SCL I2C signal clock 18 SDA I2C signal data 19 BKPT Break Point Output 20 3 3V 3 3V Power Supply 21 D6 Data bus 6 22 D7 Data bus 7 23 D4 Data bus 4 24 D5 Data bus 5 25 PB6 8051 General Pur...

Page 50: ...t 3 USB_P USB D 4 RESET Reset Output Low Active 5 DISCON USB Disconnection Output Low Active 6 PSEN Program strobe Enable 7 3 3V 3 3V Power Supply 8 GND Signal Ground 9 3 3V 3 3V Power Supply 10 CLK24 CPU clock 24Mhz 11 A0 Address Bus 0 12 GND Signal Ground 13 A2 Address Bus 2 14 A1 Address Bus 1 15 A4 Address Bus 4 16 A3 Address Bus 3 17 A6 Address Bus 6 18 A5 Address Bus 5 19 EA External Access ...

Page 51: ...36 A15 Address Bus 15 37 PC6 8051 General Purpose PortC 6 38 PC5 8051 General Purpose PortC 5 39 5V 5V Power Supply 40 PC7 8051 General Purpose PortC 7 C Notice Notice 1 USB VID 0xFFFF to use boards isn t registered to USB sig www usg org because it is artificial ID you cannot use it to the formal products just test only Notice 2 A lot of sections of this manual are referring to Cypress Developmen...

Page 52: ...ion 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 Addison Wesley 5 EZ USB Design by Example A Practical Guide to Building I O devices John Hyde Intel University Press WILEY ...

Reviews: