| Microchip's Code Module Library - A Handy Freebie |
|
|
| Wednesday, 11 November 2009 08:09 | |
|
As you develop program code, you probably find that there are snippets you use again and again. Re-using code probably involves opening a program where it was used, find the section you want, copying and pasting and then finally editing as needed in the new application. It can be a hassle to find exactly what you're looking for.
Microchip has a nice piece of software for helping with this task - the Code Module Library, which can be downloaded free from their website.
The left side of the screen has a tree with all the saved files. Clicking on one of the saved files opens it on the right side of the screen. The top right-hand section has a description and comments about the file. It will scroll, so can be quite lengthy if a lot of explanation is needed.
The bottom section of the screen shows the saved file. Any text file can be copied and pasted here, such as a file from the Swordfish editor.
The center section is where the power of this library manager comes in. When a file is saved, some of the items can be designated as variable. In this case, the device, port pin, clock speed and LED name are variable. When I want to re-use this code, I can change the variable items in the "Replace With" field. For example, maybe I'm testing a board with a PIC 18F1320 with an LED tied to PORTD.3. I make the changes in the "Replace With" field but it doesn't change the original file. When I click the copy button, the file with my changes is copied to the clipboard. From there, I can paste it into the Swordfish or any other editor. Pretty slick.
|
|
| Last Updated ( Thursday, 12 November 2009 03:46 ) |
Whos Online
- MrDEB
Forum Activity
simulation program - mrdeb Thursday, 11 March 2010 22:52 - [0 replies]
MARCHING ledS - mrdeb Thursday, 11 March 2010 19:13 - [3 replies]
REALISTIC LED candle flicker - mrdeb Wednesday, 10 March 2010 05:48 - [0 replies]
the LCD demo hello world - mrdeb Wednesday, 10 March 2010 05:41 - [29 replies]
USB problem - jon chandler Tuesday, 09 March 2010 11:31 - [3 replies]
Servo Module - andyo Tuesday, 09 March 2010 03:39 - [3 replies]
pic to ps2 communication - roshan Friday, 05 March 2010 01:30 - [7 replies]
Recent Comments
- 2010-03-11 21:03:32 Jon C...
If this wasn't a class project that had to be done on a PIC16F690 u...
- 2010-03-11 15:30:06 uuu
I am going to send two data from ADC to USART(async mode) to serial...
- 2010-03-05 13:24:23 mrpse...
I was thinking of battery with powered routers or powered for every...
- 2010-03-05 12:17:40 andyo
50 rooms - wow. The XBee modules are very easy to use but I'm not ...
- 2010-03-05 11:46:37 mrpse...
Thanks AndyO. What I have to do is design a device to monitor temp...
- 2010-03-05 03:08:58 andyo
The circuit used for the remote sensor can be found here: [url]http...
- 2010-03-04 07:19:06 renno
plz i need help do u know from where i could download it or how cou...
- 2010-03-04 07:16:05 renno
hello everyone i'm trying to finish my final project and i want to ...




I could definitely use this, thanks for sharing Jon!
For easy reference, here is the download page with additional instructions; http://www.microchip.com/stell ent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en52994 9
Thanks for sharing Jon!