top of page
Search
nombtyhighdamnens

Picdem Fs Usb Driver Download: Get Started with the PIC18F4550 Flash Microcontrollers with USB Suppo



YES! no need of official or third-party programmer, which must be used only once to download the bootloader into micro-controllers devoid of it.That's why we provide them already bootloaded too, so that you can start to be productive on the fly.


Both Driver and PICDEM are included in the MLA (Microchip Libraries for Applications) package: you can download it from here.Microchip MPLABX IDE from here and XC-8 compiler (8-bits) here.




Picdem Fs Usb Driver Download



Once you have installed MLA package then proceed with USB driver, whose local path on Windows machines is (current version v2013-06-15):microchip_solutions_v2013-06-15\USB\Tools\MCHPUSB Custom Driver\MCHPUSB Driver\ReleaseFirst of all plug PIC4Boot with PIC to the PC, execute (first time) boot sequence as shown in following video and picture:


Windows will pop-up a message for the unknown device, then it will open the dialog window requiring driver you can now install.[To check operations open the Device Manager: Start -> Control Panel -> System -> Hardware tab -> Device Manager button]Screenshots below may help you (left to right):


In addition to not being ENTTEC Pro plug compatible, there are other compromises that must be made to achieve the USB2DMX's low cost: the device only works (as of its initial release) with the Vixen software; a special USB driver must be installed in the PC; the user is required to take a two-step process to burn the firmware into the microprocessor, and the user needs to make certain that three files are included in the Vixen plug-ins folder.


Usbpicprog is capable of opening .hex files from any compiler / toolchain. The PC application communicates to the usbpicprog hardware in order to burn the hex file into the target device. The application can be used within Linux, Windows and Mac. For these platforms, a binary build has been released on the download page.


  • IntroductionIn this article I will show how to use and/or modify Microchip's MCHPUSBBootloader Firmware in your own projects.The bootloader can be used for the all USB PIC devices (PIC18F4550, PIC18F4455,PIC18F2550, PIC18F2455, PIC18F4553, PIC18F4458, PIC18F2553, PIC18F2458).The information provided here is based on Microchip-USB-Framework version 2.7.USB-Bootloader from MicrochipMicrochip provides a free USB-Bootloader in their USB framework which is part ofMicrochip's Applications Library.You can get it here: =SS_GET_PAGE&nodeId=2680&dDocName=en547784.The bootloader firmware (incl. source code) can be found in the installationdirectory in the following subdirectory:USB Device - Bootloaders\Vendor Class - MCHPUSB Bootloader\Bootloader -Firmware for PIC18F4550 Family Devices.This bootloader was designed to be used with the PICDEM FS USB DEMONSTRATIONBOARD from Microchip (PIC18F4550).The bootloader starts after Power-On orReset. The bootloader checks if pin RB4 is low or high:RB4 = low (0V): PIC starts in bootloader mode

  • RB4 = high (5V): PIC starts user applicatiob

  • The current status of the bootloader is displayed via 4 LEDs which are connectedto RD0-RD3. How to compile the USB-Bootloader from MicrochipSince the bootloader is designed for the Microchip demo board, the configurationof the bootloader possibly will not fit for your project. E.g. you want to use anotherpin for bootloader mode entry or you do not want to spend 4 pins/LED's fordisplaying the current status.Fortunately, the source code of the bootloader firmware is available. It iswritten in C language. It can be compiled with Microchip's C18-Compiler, evenwith the free version of the compiler.In the directory USB Device - Bootloaders\Vendor Class - MCHPUSB Bootloader\Bootloader -Firmware for PIC18F4550 Family Devices you find the project fileMCHPUSB.mcp which has to be opened with MPLAB. In the project file thepath settings point to the default C18 compiler directory c:\mcc18. If you haveinstalled the compiler in a different directroy, you have to modify the pathsettings in MPLAB.To do this, select "Project - Build options - Project" from the MPLAB menu afteropening the project file MCHPUSB.mcp. In this dialog go into the "Directories"tab and change the modify theInclude Search Path

  • Library Search Path

  • Linker-Script Search Path

  • according to your C18 installation path.Now you can build the project via "Project - Build All".If you use the free version of the C18 compiler, the linker will fail since thegenerated code exceeds the boot block size.To fit the bootloader into the bootblock, we can stirp unnecessary functionsfrom the source code, like code for showing the status of the bootloader via4 different LEDs. Here the code parts which can be removed without loosingbootloader functionality:boot.c.../** P R I V A T E P R O T O T Y P E S ***************************************/---> remove prototype//void BlinkUSBStatus(void);.........void BootService(void){---> remove call to BlinkUSBStatus//BlinkUSBStatus();if((usb_device_state ---> remove the following block/*if(dataPacket.led_num == 3)mLED_3 = dataPacket.led_status;counter = 0x01;//end ifif(dataPacket.led_num == 4)mLED_4 = dataPacket.led_status;counter = 0x01;//end if*/---> add the following linecounter = 0x01;break;.........---> remove BlinkUSBStatus function/*void BlinkUSBStatus(void)//static word led_count=0; //declared globablly instead, to save code spaceif(led_count == 0)led_count = 20000U;led_count--;#define mLED_Both_Off() mLED_1_Off();mLED_2_Off();#define mLED_Both_On() mLED_1_On();mLED_2_On();#define mLED_Only_1_On() mLED_1_On();mLED_2_Off();#define mLED_Only_2_On() mLED_1_Off();mLED_2_On();if(UCONbits.SUSPND == 1)if(led_count==0)mLED_1_Toggle();mLED_2 = mLED_1; // Both blink at the same time//end ifelseswitch(usb_device_state)case DETACHED_STATE:mLED_Both_Off();break;case ATTACHED_STATE:mLED_Both_On();break;case ADDRESS_STATE:if(led_count == 0)mLED_1_Toggle();mLED_2_Off();//end ifbreak;case POWERED_STATE:mLED_Only_1_On();break;case DEFAULT_STATE:mLED_Only_2_On();break;case CONFIGURED_STATE:if(led_count==0)mLED_1_Toggle();mLED_2 = !mLED_1; // Alternate blink//end ifbreak;default://For POWERED_STATE and DEFAULT_STATEmLED_Both_On();break;//end else of if(UCONbits.SUSPND...)//end BlinkUSBStatus*/...main.c...// Note: Some of the below configuration bits are commented out// to prevent build errors with some of the above listed devices.// For example, on the PIC18F4458 CP3, WRT3, and EBTR3 don't exist.// adjust PLLDIV configuration to your oscillator frequency#pragma config PLLDIV = 5 // (20 MHz input).........// adjust pin to be checked for bootloader mode entry to your hardware//Check Bootload Mode Entry Condition---> adjust pin for bootloader entry if it is not RB4 pin for your hardwareif(PORTBbits.RB4 == 1) // If not pressed, User ModeADCON1 = temp; // Restore reset value_asm goto RM_RESET_VECTOR _endasm//end if//Bootload Mode---> remove LED init//mInitAllLEDs();...Now again try to build the project via "Project - Build All" as described earlier. Basic USB Bootloader CircuitHere the basic USB bootloader circuit. JP1 controls the bootloader entry. If JP1is closed, the PIC will start in bootloader mode. Please note that the status ofJP1 is only checked after the PIC has been reset. I.e. to enter the bootloadermode, first JP1 has to be closed. After that the PIC has to be reset. Flash the USB-Bootloader into the PICIf all the above steps were successful, you now have your bootloader HEX fileMCHPUSB.hex which can be flashed into the PIC. Make sure that the config bitsare set properly and match your hardware, e.g. PLLDIV fits to your oscillatorfrequency.Now, just load the HEX file into PICPgm and flash it. USB driver installation for the bootloaderAfter successfull programming, connect your device to the PC's USB port (if notalready connected). Please make sure that the bootloader entry condition(e.g. RB4 = 0 in our example) is fullfilled!Now Windows should detect a new USB device. If it askes for the driver, choosethe driver location manually and navigate to the driver directory which is locatedin the Microchip's Applications Library installation directory in the subdirectoryUSB Tools\MCHPUSB Custom Driver\MCHPUSB Driver\Release. Bootloader PC Software - PDFSUSB.exeThe bootloader PC software PDFSUSB.exe is located in the directoryUSB Tools\Pdfsusb. The tool itself is selfexplaining.Unfortunately, I had some problems with this tool when trying to load HEX filesgenerated with the CCS compiler. The start address of the firmware shown inPDFSUSB.exe was some ugly address like 0x2C44340 instead of 0x800 which is thefirmware start address.After some investigations I found that PDFSUSB.exe has a problemif the following line in the first line in the HEX file is missing (initializationof Upper Linear Base Address)::020000040000FAI.e. to solve the problem insert :020000040000FA before the first line inthe HEX file.Bootloader PC Software - USB BootloaderBut I also found an interesting alternative tool which is simply called USBBootloader. You can get it here: have also put a copy of the application onto my webspace, so if the above linkis not working, you can get the bootloader PC Softwarehere. Application Software for usage of the BootloaderPrograms which shall be flashed with the bootloader need to be adapted sincethe bootloader uses the memory area 0x000 to 0x7FF. This area is usually usedby the application software itself. So the following changes are required:reserve boot block area (0x000-0x7FF)

  • map reset vector from 0x000 to 0x800

  • map interrupt vector from 0x008/0x018 to 0x808/0x818

  • How this can be done is depending on the compiler which is used for generationof the HEX file.MPLAB C18 compilerFor the MPLAB C18 compiler the following changes need to be done:...extern void _startup (void); // See c018i.c in your C18 compiler dir #pragma code _RESET_INTERRUPT_VECTOR = 0x000800void _reset (void)_asm goto _startup _endasm#pragma code#pragma code _HIGH_INTERRUPT_VECTOR = 0x000808void _high_ISR (void);#pragma code _LOW_INTERRUPT_VECTOR = 0x000818void _low_ISR (void);/* This pragma forces the code below this line to be put into the code *//* section (memory address >= 0x82A). See linker script for details. */#pragma code...Further, a linker script is required to make the application software start at0x800. You can get the linker scripts here:usb_bootloader_linkerscripts.zip.I have written a LED blinking demo application which can be loaded into the PICwith the bootloader. You can download it here:18f4550_app4bootloader_mplab.zip.CCS compilerFor the CCS compiler it is a little bit simpler:.../* ------------------------------------------------------------------------- *//* map reset vector and interrupt vector *//* 0x000-0x7FF is used by the bootloader. The bootloader maps the original *//* reset vector (0x000) to 0x800 and the interrupt vector (0x008) to 0x808. *//* ------------------------------------------------------------------------- */#build (reset=0x800, interrupt=0x808)/* ------------------------------------------------------------------------- *//* reserve boot block area *//* This memory range is used by the bootloader, so the application must not *//* use this area. *//* ------------------------------------------------------------------------- */#org 0, 0x7FF ...LED blinking demo application:18f4550_app4bootloader_ccs.zip.HI-TECH C CompilerFor the HI-TECH C compiler the reset vector can be changed via the compiler option--CODEOFFSET. For the MCHPUSB bootloader we have to set the option to--CODEOFFSET=0x0800If you use the HI-TIDE IDE, the option can be specified in the project properties(Project => Properties => C/C++ Build => Settings => Advanced => Command Line Options):LED blinking demo application:18f4550_app4bootloader_hitech.zip. (adsbygoogle = window.adsbygoogle []).push();Search@import url(//www.google.com/cse/api/branding.css);Custom Search

  • PIC ProjectsRS232 Communication

  • DS1820 Temperature Sensor

  • DS2482 1-Wire bridge

  • RFM12 Module

  • DCF77 Time Signal Decoding

  • SD-Card and FAT16 Demo

  • RC5 Decoder

  • Hardware ProjectsPIC16F/18F Experiment Board

  • ENC28J60 Modul

  • RS232 Module

  • LCD Adapter

  • Development ToolsPIC C Compiler Overview

  • PIC Programmer

  • BootloaderSerial PIC Bootloader

  • USB PIC Bootloader


  • Raspberry Pi & CoProjects with Raspberry Pi and other devices running Linux.

picprojects.netHome ProjectsDevelopment ToolsBootloaderForumPIC ProgrammerRaspberry Pi Projects 2ff7e9595c


0 views0 comments

Recent Posts

See All

Comments


bottom of page