USB in 3 Steps
What you need
- A TLXusb board with 26-pin flat ribbon cable and CD
- A target suitable for the TLXusb
- A PC with Windows (98 or higher) and USB port
- A standard USB cable
- (Win)ECO-C. It is supposed that the target is connected to a serial port of the PC, and that you are able to compile programs with (Win)ECO-C and download them (under NICO) - as usual.
With the 26-pin flat ribbon cable connect ST1 on the TLXusb with the TLX+ connector of your target (ST2 is for additional TLX+ peripherals and CANNOT be used as connector to the target!).
Make sure that pin 1 on the TLXusb is connected to pin 1 on the target!
Connect the TLXusb with a USB port of the PC (standard USB cable) and power-on the target. When Windows reports that it found new hardware, choose the ftdi-folder on the CD as driver path. Follow the instructions of the installation program, which creates an extra - virtual - COM port on your PC, e.g. COM3.
Compile hello.c and usb.c in the sample-folder on the CD (makefile), or, for WinECO-C, create a new project, add the two project files and compile. Then load the generated ".bin file" under NICO and run the program with "sp".
Start the Windows-HyperTerminal and make a connection via the newly created COM port (e.g. COM3). In the HyperTerminal window the hello-text should now be displayed everytime you hit ENTER.
How to continue...
When you compile an existing application together with usb.c, and call usb_io() in main - as is done in the example above - all standard in-/output, e.g. puts(), printf(), getchar() etc., is done via the TLXusb.
Using the TLXusb, the download speed in the WinECO-C terminal window can be increased enormously. Program the USB version of the NICO monitor (in the nico-folder on the CD) with flashw.exe - just like a "normal" program. Under "Settings" in the WinECO-C terminal window, choose the appropriate COM port (this setting is stored together with the project settings). With WinECO-C, only COM1 to COM4 can be used as virtual COM port. You can change the number of the USB COM port in the device manager, if necessary.
The flash-folder on the the CD contains also the USB versions of the flashloader, as well as flashusb.exe to replace flashw.exe. How to install a new flashloader is explained in the Flashloader-Update package on the Download page. However, keeping the standard flashloader is recommended, because flash programming as a rule is only needed after program development is finished or for updating purposes.www.mct.net