HOME

PROJECTS

TUTORIALS

C FUNCTIONS

PROGRAMS

PRODUCTS

VIDEOS

COMPANY

SPANISH

                 

tutorial: the USB stack for 18F2550. How to set a project and program in ANSI C using simple USB-UART C18 functions.

Introduction:

The term "stack" refers to either the abstract data structure (not relevant for this), or to a collection of software that performs a specific function. In the case of a "USB stack", it's the collection of hardware, firmware, drivers, and user programs that allow communication over USB links.

The term "stack" is used because being a high level protocol, the software components are layered on top of one another, each using the services of the layer(s) below it.

A very comprehensive tutorial on the functioning of the USB protocol is described in detail here:

http://www.usbmadesimple.co.uk/

STEP 1. Download folder: BOLT-18F2550-USB-PROJECT.zip After decompressing, the folder should look like the image below. Open the MPLAB IDE project clicking on the specified file.

STEP 2. Once the MPLAB IDE project is opened, you will see an this organization shown below. Test that everything is well configured, complete and in place by compiling: >project >build all  (you should get a "built succedded" result)

STEP 3. Following the instructions of Project-Bolt-v.Lite-USB-Port-18F2550-Guide.pdf, test the compiled .hex file in your Bolt v.Lite or Bolt 18F2550 system, interacting with the associated VC++ PC Windows software.

STEP 4. If you want to make a new program, make a copy of the whole folder in your PC, and open this same project in MPLAB IDE. You may change the name of project from MPLAB with options: >project>save project as. Now you have a new folder, and a new project with another name.

Open the main ( ) function. Now you may identify the USB-UART functions that you will use in your own projects. These functions -which are very similar to the ones used with the serial port- are shown in the table below. Examples on how to use these functions are detailed in the document:

 MIGRATING FROM SERIAL PORT TO USB.pdf

COMPLETE DOCUMENTATION:

BOLT-18F2550-USB-PROJECT.zip

Project-Bolt-v.Lite-USB-Port-18F2550-Guide.pdf

MIGRATING FROM SERIAL PORT TO USB.pdf

 >>Click here for more information on the handling of the USB STACK