PIC Programming with Linux
I am using a programmer from HOPCO that has been re-wired to use the same parallel port connections as a David Tait-style PIC programmer. The connections for my programmer are as follows:
Vpp control pin 5 inverted logic Vdd control pin 4 inverted logic Clock pin 3 normal logic Data to PIC pin 2 normal logic Data from PIC pin 10 normal logic
The connections for your programmer will most likely be different, depending on the pins it uses to connect to the parallel port and the transistor logic used to implement the on/off control. The configuration menu (see Figure 2) allows you to easily specify which pins are being used and the on/off logic used to control them. Press + and - to switch the logic used for control of each pin.
After you have entered the correct pin number for each function, test it to ensure that the PIC being programmed is seeing the correct logic level. The configuration menu is used for this, too. When one of the control lines is selected using the arrow keys, the O and F keys can be used to turn that control line On and Off. This on and off state is defined from the perspective of picprg, taking into account the polarity you specified when setting up the pins.
Now, get out your trusty voltmeter or whatever you are going to use for detecting power (it should be able to handle at least 13V). Connect the meter's GND to pin 5 on the programming socket. Then select Vpp in the configuration menu and hit O and F to turn it on and off. You should see pin 4 going from 0V to 13V or so (depends on the programmer). Repeat this for each of the pins listed below:
Vpp pin 4 0 and approximately 12 volts Vdd pin 14 0 and 5 volts Clock pin 12 0 and 5 volts Data Out pin 13 0 and 5 volts
The state of the Data In pin on the configuration display should be the same as the state of the Data Out pin. When Data Out is 1, the Data In line should be 1 as well.
Once you have all the voltages swinging the right direction, press S to save the configuration to ~/.picprgrc; type picprg. You are now ready to start using your PIC programmer.
When reading the object file, the ID and FUSE data are taken from the memory locations specified in the configuration menu. Microchip defines this to be 0x2000, but some assemblers place this data in different locations. The configuration menu allows you to specify where in the loaded file the ID and FUSE data will be found. If you are using the picasm assembler, the default values for ID, FUSE and EEPROM location do not need to be changed. They will work correctly right out of the box.
The PIC16C84 has 64 bytes of internal EEPROM data that can be programmed with data like a unique serial number or configuration parameters. This data can be included in the loaded file at the memory location specified by the configuration menu. This address is usually set to 0x2100.
picprg uses the Intel HEX 16 format, which is supported by most assemblers. (I recommend picasm by Timo Rossi.) The FUSE and EEPROM locations can be defined in the configuration menu if your assembler does not put them in the standard locations. picasm also supports the Intel HEX 8 format, and picprg detects this file format automatically. Just type in the file name, and the program will figure out in which format the file was saved.
When an object file is loaded, it is stored in the internal memory buffer. The clock type and fuse states are displayed on the second line of the display while the file is in memory. The clock type and fuse states are determined by looking at the data stored in the FUSE memory location as defined in the configuration menu.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- Linux Systems Administrator
- New Products
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Web & UI Developer (JavaScript & j Query)
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Using Salt Stack and Vagrant for Drupal Development
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Favorite (and easily brute-forced) pw's
41 min 56 sec ago - Have you tried Boxen? It's a
6 hours 33 min ago - seo services in india
11 hours 5 min ago - For KDE install kio-mtp
11 hours 6 min ago - Evernote is much more...
13 hours 6 min ago - Reply to comment | Linux Journal
21 hours 51 min ago - Dynamic DNS
22 hours 25 min ago - Reply to comment | Linux Journal
23 hours 24 min ago - Reply to comment | Linux Journal
1 day 14 min ago - Not free anymore
1 day 4 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?





Comments
Using a Pickit2
Here is a guide but is in spanish for programming a pic in C:
http://jorge.saad.com.mx/?p=106
New Version - v2.3.0 Available Now
I have just relesed v2.3.0, which works with the v2.2.x and v2.4.x kernels. You can download it from the picprg homepage
Also, my homepage has changed to http://www.brianlane.com
Brian Lane
Re: New Version - v2.3.0 Available Now
Many thanks for developing this IMMENSELY useful programming tool! With any luck, my university will be using this in the years to come.
Re: New Version - v2.3.0 Available Now
Thanks! If you guys come up with any improvements please feel free to pass them on to me. I plan to revise the program sometime this year to add support for more of the PIC processors.
Brian
VPP40 ?
Prorammers like the PIC16PRO40, which allows programming different sized chips depending on their placement in sockets, has an extra control line labelled VPP40 (prog enable for 40 pin chips versus the other sizes).
Is it possible picprg could be extened to support the extra (optional) control line? If you like I could work it out, but I haven't looked at the code yet so don't know what I'd be biting off... and experience tells me its usually better to ask the source (no pun).