In this article I'll describe howto modify the CDC – Basic Demo firmware from microchip for the PIC18F47J53 to support the PIC18F27J53.

The changes are very simple, regard only the leds present into the PIM board.

First of all what you need : 

  1. A board with the pic18f27j53 as mine. You can build one or…   I have some of this and if you want one please contact me
  2. MPLAB v 8.83             from Microchip
  3. Microchip Solutions v2011-12-05 from Microchip

Install the Microchip Solutions v2011-12-05 in a proper directory, I assume that it is installed in :

C:\Microchip Solutions v2011-12-05


First of all do a backup of the directory 

C:\Microchip Solutions v2011-12-05\USB\Device – CDC – Basic Demo\

Move to the directory 


C:\Microchip Solutions v2011-12-05\USB\Device – CDC – Basic Demo\Firmware

rename the file 

USB Device – CDC – Basic Demo -  C18 – PIC18F47J53 PIM.mcp

with 

USB Device – CDC – Basic Demo -  C18 – PIC18F27J53 PIM.mcp

rename the file 

rm18f47j53_g.lkr

with 

rm18f27j53_g.lkr

Double click on the project file :

USB Device – CDC – Basic Demo -  C18 – PIC18F27J53 PIM.mcp



Execute the folowing steps :

remove the file  rm18f47j53_g.lkr from the project window and add the rm18f27j53_g.lkr file

Open the file HardwareProfile.h  go to the line 111 and replace 

__18F47J53 with __18F27J53

Save the file and close it

Open the file main.c

Comment lines form 842 to 831

Comment lines 807, 811, 815, 819, and from 823 up to 827

Comment lines FROM 790 UP TO 801

comment line 681

Save the file and close it.

 

Open the file rm18f27j53_g.lkr

replace any occurence of 18F47J53 with 18F27J53

Save the file and close it

 

Select the device pic18f27j53 (Menu  Configure–>Select Device …)

set the proper path for the library include file and ….

    

build the project..


The file "USB Device – CDC – Basic Demo -  C18 – PIC18F27J53 PIM.hex" will be build.

Burn the pic and enjoy yourself

Insert the key into the PC and install the driver when asked

(The inf file is in the directory 

 C:\Microchip Solutions v2011-12-05\USB\Device – CDC – Basic Demo\inf)

Open a terminal an connect to the proper Virtual serial port.

that's all

We have some board already soldered at low cost on ebay goto http://www.ebay.it/sch/giovannitto/m.html?_nkw=&_armrs=1&_from=&_ipg=&_trksid=p3686

Copyright 2012 Stefan D'Andrea & Armando Volpe