Tarjeta Usb Desarrollo 18F2552
Electronicfr in english
· Linux on Fujitsu stylistic 1200 · How-to build a webserver for 30Euros with
ENC28J60
USB and PIC tutorial
- Part 1 - How to build a USB device with a PIC 18F4550 or 18F2550 - Part 2 - Application: How to build a USB thermometer
· A little autonomous robot · A new autonomousrobot project (V2) · How-to build a usb device a with 18F4550
or 18F2550
. New: Discussion forum
Part 1: How to build a USB device with a PIC 18F4550 or 18F2550
Electronicfr en francais
· Fabriquer un serveur web avec un circuit
ENC28J60
Overview
PIC 18F4550 and 18F2550 are powerful microcontrollers including a full-speed USB V2.0 compliant interface. With these MCU it's very easyfor the hobbyist to design USB devices with very few components. In this page, I will describe how to use the CDC firmware from Microchip. It permits to emulate a serial port with a PC running Windows or Linux. It's also very easy to build HID devices.
· Un petit robot autonome picbasic 3B · Un nouveau robot autonome à PIC · Construire un périphérique USB avec un PIC
18F4550 ou 18F2550
.Nouveau: Forum de discussion
Search:
The 18F4550 experimentation board
Here is a picture of the experimentation board:
www.electronicfr. Web com
Search
www.policefr.com
www.cadfamily.com The document is for study only,if tort to your rights,please inform us,we will delete
The following schematic is very simple, only few components are needed. It's a self powered USB device. Pleasenote I'm using the Olimex tiny-ICSD programmer, if you want to use another PIC ICSP programmer, EMail:cadserv21@hotmail.comand change the connector you should remove D1 and D2
(You can click on the picture to get an high resolution picture) This device is compatible with the microchip USB bootloader Please note C5 is 470nF (the datasheet recommend 220nF but more is better) and should be low ESR(for example a multi-layer ceramic). Don't forget the 100nF decoupling caps. Here is a possible implementation
Click on the picture to get a 300dpi PCB You can look at the wire's colour of your USB cable: Black=GND, Red=+5V, Green=Data+, White=Data-
www.cadfamily.com EMail:cadserv21@hotmail.com The document is for study only,if The to your rights,please inform us,we will delete tortsoftware
You can download MCHPFSUSB_Setup on the Microchip website. It's a windows .exe :(. The firmware we will use is written in C (for the C18 Microchip compiler). This code is (royaltyes) free, but it's not a free software, so it's not possible to redistribute modified source code In this archive, you will find:
q q q
q q
The USB bootloader and its source code in C18 A windows utilityfor the bootloader The CDC firmware source code (serial emulation) in C18. It can be used with the USB bootloader without modification Another firmware for the HID device A windows driver for CDC (under linux CDC-ACM is natively supported)
Some tips for your prototypes: Source code is in the fw/cdc/MCHPUSB.mcw directory You should comment the following lines in usbcfg.h for a self powered usbdevice:
#define USE_SELF_POWER_SENSE_IO #define USE_USB_BUS_SENSE_IO
On my schematic, LED's are connected on port B. So you should modify io_cfg.h
#define #define #define #define
mLED_1 mLED_2 mLED_3 mLED_4
LATBbits.LATB0 LATBbits.LATB1 LATBbits.LATB2 LATBbits.LATB3
You can put your own code on user.c. For example, look at Exercise_Example() in user.c. Useful functions aregetsUSBUSART() (get data) and putrsUSBUSART() (put data other the serial port) Don't forget to check mUSBUSARTIsTxTrfReady() before to send data. They are some examples in the exercise directory. For example, the following program (to put in user.c) toggle the LED number 4 when you press the key "1" in the terminal They are some examples in the exercice directory. For example, the following program (to...
Regístrate para leer el documento completo.