Quantcast
Channel: Tom Hughes Electronic Projects
Viewing all articles
Browse latest Browse all 10

USB 2.0 development board

$
0
0

Introduction

This board was developed to enable me to develop projects using the Cypress CY7C68013 8051 USB microcontroller. This device is probably one of the easiest ways to interface to USB2.0 high speed.

The device differs from most 8051 microcontrollers on the market in the respect that it has on chip RAM to store the program, this in turn is configured at power up using either USB driver on the PC, or the on board EEPROM.

It took me a while to work out how to boot the device from the EEPROM as the instructions from Cypress aren’t straight forward and seem to assume a reasonable amount of prior knowledge. In order to create the EEPROM file it is necessary to create a hex file using either a standard 8051 C or assembler compiler then convert this file to an iic file using the Cypress USB Suite, this puts the appropriate flags into the EEPROM, if these are missing the CY7C68013A will ignore the EEPROM and attempt to boot of USB instead.

Step 1, Compile source code to *.hex file

This step is dependent on your compiler of choice my preference is the Keil uVision 4 this can be used for hobby use however it has a 2kB limit unless you buy a commercial licence.

Step 2, Convert *.hex file into *.iic file

Load a DOS prompt and change directory to location of where hex2bix is located on my laptop using the default installation this is C:\Program Files\Cypress\Cypress Suite USB 3.4.7\Firmware\bin\hex2bix.exe

As an example if you file is called 1.hex enter the following command line

hex2bix.exe 1.hex  -F 0xC2 -I -O 1.iic

you should then receive output from the program indicating the conversion was successful.

Step 3, Download the code in EEPROM

Using the Cypress USB suite, select the USB Console from the start menu. In the Main console program goto the Options menu and select EZ USB Interface Select the Lg EEPROM button and navigate to the directory where the iic file is saved you created earlier.

Note before downloading to the board ensure the device is selected from the device drop down box. If the device is not visible close the program and try resetting the board.  Also try removing the EEPROM especially if the first byte is 0xC0 or 0xC2.

Downloads

Schematic

Test software (Writes string via UART connection), written in Keil 8051 C, be sure to use external MAX232 level converter when connecting to PC RS232 port.

Unfortunately I don’t have a PCB overlay since the orignal PCB layout files seem to have been deleted from my PC by mistake. I hope the schematic provides a starting point for anyone wishing to reproduce my project.


Viewing all articles
Browse latest Browse all 10

Trending Articles