| 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
- Jon Chandler
- MrDEB
Forum Activity
LCD / 18F1320 - mrdeb Friday, 19 March 2010 07:19 - [0 replies]
A 'throw-away" PIC board - mrdeb Thursday, 18 March 2010 06:19 - [32 replies]
Credit Where Credit's Due - jon chandler Tuesday, 16 March 2010 12:01 - [9 replies]
Marching LEDs - mrdeb Saturday, 13 March 2010 22:54 - [7 replies]
USB 8 Channel Servo Controller - andyo Saturday, 13 March 2010 01:19 - [2 replies]
Dedicated Servo Controller - graham Friday, 12 March 2010 17:58 - [0 replies]
Must have....delta temperature glowies! - graham Friday, 12 March 2010 17:31 - [3 replies]
Recent Comments
- 2010-03-17 22:58:18 Jon C...
Graham, Thanks for fixing the spacing on the array. This is how i...
- 2010-03-17 21:14:34 ASDne...
Thanks Graham, It is a problem with Flowcode because the demo wa...
- 2010-03-17 19:50:32 Graha...
Looks like you've pretty much solved every minor issue that was enc...
- 2010-03-17 11:42:03 Jon C...
The low-cost servo does have one other feature. The origina...
- 2010-03-17 10:56:44 Graha...
I am not familiar with flowcode, though did you try powering the bo...
- 2010-03-15 21:47:55 ASDne...
Hello there, I am still trying to get the LCD to work but I am pro...
- 2010-03-15 13:16:38 Graha...
Hi Hop, I've finally got some time this weekend to delve into the ...
- 2010-03-13 16:36:21 andyo
Very nice - 900,000 packets and 0 errors - can't ask for better tha...




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!