USB-GPIO12 General Purpose PIC18F14K50 Module USB-GPIO12 General Purpose PIC18 Processor Module Technical Specification Overview The USB-GPIO12 is a general purpose processor module using the PIC18F14K50. This chip has a USB module built in which we have used to implement Microchip's HID Boot-loader. This boot-loader is already programmed into USB-GPIO12 and ready for use. The USB-GPIO12 is powered from the USB bus and the 5v supply is available for your own circuits. Maximum current required by the module is 20mA with both LED's on, leaving 80mA available to your circuits from a standard 100mA USB port. Schematic The schematic of the GPIO12 is here Connections The diagram below shows the connections for the various modes.
Pull low at power-up for boot-loader mode, RA3 - 1 Red Led, CCP1/RC5 - 2 Green Led, RC4 - 3 RC3/AN7 - 4 RC6/AN8 - 5 RC7/AN9/SDO - 6 RB7/Tx - 7 0v Ground - 8 16 - 5v Power from USB Cable 15 - RC0/AN4 14 - RC1/AN5 13 - RC2/AN6 12 - RB4/AN10/SDI/SDA 11 - RB5/AN11/Rx 10 - RB6/SCK/SCL 9 - 0v Ground I/O pins The USB-GPIO12 has 12 I/O pins, 13 if you count the input only RA3 pin. You should consult the Microchip data sheet for the PIC18F14K50 for full details and programming information. We have included 4k7 pull-up resistors on pins 10 & 12 (SCL and SDA) to make I2C interfacing easier. Software Requirements To use USB-GPIO12 you will need at least the following: MPLAB Microchips IDE, MCC18 compiler, Microchip Application Libraries. If you don't have them, you should go to and download and install them now. Boot Loader The built in boot loader is the one provided by Microchip as part of the Application Libraries.
You will need to download the Libraries as they contain 'HIDBootLoader.exe'. This is the PC side driver program which downloads your software to the USB-GPIO12. If you installed the libraries in the default position it will be here: C: Microchip Solutions USB Device - Bootloaders HID - Bootloader HIDBootLoader.exe When you first power up the the Green LED will be flashing and all other pins will be high impedance. This is a very simple application program we load after testing the module in our workshop. To download you own program you must first put the USB-GPIO12 into boot-loader mode. Do this by connecting pin 1 to 0v Ground, then connect the USB cable to power the module. The Red LED will light and the Green LED will be off.
Now run HIDBootLoader.exe and you should see: Open the hex file for your project and press Program/Verify. This will down load your program into the module. Now remove the link between pin1 and 0v ground and press 'Reset Device'.
This will reset the module and run your application. You can always get back to the boot-loader by by connecting pin 1 to 0v ground and cycling the power, but there is a better way. It relies on you placing code in your program to perform a software reset when pin RA3 goes low.
To do this effectively you need to check the pin at least every few mS. As an example load up the 'shipping' project (See examples below) and look at line 122: while(!PIR2bits.TMR3IF; // wait 1mS This is part of the 1mS delay routine and is a good place to add our check. Change the line to: while(!PIR2bits.TMR3IF) if(!PORTAbits.RA3) Reset; // wait 1mS, going to the boot loader if RA3 is pulled low If you wire a small push button switch between pin1 and 0v ground you can now get back to the boot loader with a button press. If you still have HIDBootLoader.exe running it will automatically reconnect ready to download a new program. Examples We have some for you to try.
Pointers in c ebook by yashwant kanetkar. Shipping is the simple Green LED flashing program that was in the module when you received it. PinTest is a program which sets one pin low at a time and cycles through all 12 pins every 2 seconds. Wiring an LED via a 390 ohm resistor to 5v will make a nice test for the I/O lines.
ComPortEcho is a USB com port example (from the Microchip Application Library). It sets the module as a com port and echoes back each character you send it incremented by 1. 'A' comes back as 'B'. Compiling programs to run with the boot-loader The boot loader occupies program memory from 0x0000 to 0x0FFF. Your programs must therefore be linked to run at 0x1000.
The reset and interrupt vectors which are normally at 0x0000, 0x0008 and 0x0018 are re-mapped to 0x1000, 0x1008 and 0x1018. The example programs above show how to do this. You should study those for the details, or just copy them as a starting point for your own projects. You must also include the rm18F14K50.lkr linker script in your project. This tells the linker how to re-locate your program to the correct place.
Microchip PIC18F4550 USB Board » Quick Find Enter keywords to find the product you are looking for in the Quick Find field above or use Categories Information Microchip PIC18F4550 USB Board US$51.45 SBC44UC The SBC44UC is an embedded (PIC based) Single Board Computer (SBC) with a full-speed USB interface and is assembled with the Microchip PIC18F4550 microcontroller. It has been designed to work with the free Microchip USB Software. This includes software for developing:. Human Interface Device (HID) class firmware. Communication Device Class (CDC) firmware. Mass Storage Class Firmware. Microchip Bootloader.
• • • • • Learn through self-study, instructor-led, and on-demand classes with the SolarWinds Academy. • • • Submit a ticket for technical and product assistance, or get customer service help. Mysql administrator tutorial.
Microchip Custom Driver The SBC44UC can be powered by the USB bus or by an external power supply. A unique relay circuit is used to select between USB or external power which ensures that full USB voltage is available to the SBC board and possible user applications. Since the voltage supplied by the USB bus is specified between 4.75V to 5.25V, it is very important that the full voltage is obtained, considering that many electronic components require a minimum of 4.75V.
. Functions. Embedded Software Integration. C Programming. Articles.
Microchip Custom Usb Driver
MPLAB® Harmony. What is the MPLAB Harmony Framework?
Microchip’s MPLAB ® Harmony USB software includes royalty-free source code and example projects. It provides support for USB device mode, embedded host and On-The-Go for PIC32 microcontrollers.
USB Device Library The MPLAB ® Harmony USB Device Library (referred to as the USB Device Library) provides embedded application developers with a framework to design and develop a wide variety of USB Devices. A choice of Full Speed only or Full Speed and Hi-Speed USB operations are available, depending on the selected PIC32 microcontroller. The USB Device Library facilitates development of standard USB devices through function drivers that implement standard USB Device class specification. Vendor USB devices can also be implemented via USB Device Layer Endpoint functions. The USB Device Library is modular, thus allowing application developers to readily design composite USB devices. The USB Device Library is a part of the MPLAB Harmony installation and is accompanied by demonstration applications that highlight library usage.
These demonstrations can also be modified or updated to build custom applications. Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries. Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE.
Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.
No, the source is not available. Microchip actually recommends to switch to WinUSB. You can also use libusb-win32 device driver which is open source. C: Microchip Solutions v2010-10-19 USB Tools MCHPUSB Custom Driver Mpusbapi README for MPUSBAPI 6.0.0.0.htm Operating system vendors, such as Microsoft, typically provide several built in USB drivers that get distributed with their operating systems. These drivers are useful for common types of USB devices, such as HID class keyboards and mice, MSD class USB memory drives, etc.
Back in November of 2004, Windows based operating systems did not provide any drivers suitable for general purpose read/write interfacing with a vendor/custom class USB device. Therefore, Microchip developed and released the mchpusb.sys custom USB driver to help satisfy this industry need. Since then, Microsoft has also recognized the usefulness of a general purpose USB device driver, necessary for supporting custom/vendor class USB devices. Therefore, Microsoft has created and released the “WinUSB” device driver (winusb.sys) along with a DLL file (winusb.dll) for providing high level API access to the USB device.
The WinUSB driver and API were originally released in the Windows Driver Kit (WDK) version 6001, approximately coinciding with the release of Windows Vista operating system. The WinUSB driver (winusb.sys) and API DLL (winusb.dll) may be used on Windows XP SP2 and later operating systems, and are very similar in functionality and purpose as the Microchip general purpose USB driver (mchpusb.sys/mchpusb64.sys) and API DLL (MPUSBAPI.DLL).
However, the WinUSB driver and API is newer and support more advanced functionality than the Microchip general purpose driver and API. The API functions available when using WinUSB are powerful, and come with complete documentation.
If developing a new USB application, which will be based on the custom/vendor device class, it is suggested by the present author to consider using the WinUSB driver and API. Example firmware and PC application software projects showing how to implement a complete USB device based on the WinUSB driver and API are provided in the MCHPFSUSB Framework.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |