Jump to content
Sign in to follow this  
tkilloren

PIC programming question (PanCam Project)

Recommended Posts

I am trying to program my PIC with the PanCam hex file.

I am getting a warning message that reads as follows:

No oscillator calibration value found, do you want to use value from file (OFFFh) instead?

I have programmed the first chip by pressing "yes" to this query. The chip does not function. I have checked and re-checked my wiring, and all the pins are at the correct logic. The servo twitches upon connection, but does not respond to the stick.

I am currently programming a second chip after pressing "No" in response to the warning message.

My settings read as follows:

Checksum: 45F8

ID value: 1E00

config. word: 0006h

It takes approx. 15 minutes to complete the programming, is this normal?

The fuses were correctly set upon loading the hex file.

Sorry, I'm new at this, but I am determined as well.

Share this post


Link to post
Share on other sites
No oscillator calibration value found, do you want to use value from file (OFFFh) instead?

I believe your programmer thinks the factory placed OSCAL byte is missing from the PIC12C508. Whatever you do, don't choose to use the value from the file!

I have programmed the first chip by pressing "yes" to this query.

Oops, too late. That chip is probably of no use to you now.

I am currently programming a second chip after pressing "No" in response to the warning message.

That is a good idea.

It takes approx. 15 minutes to complete the programming, is this normal?

Something must be wrong. It should take less than a minute. I think your programmer is bad or is setup wrong. Are you sure you selected the correct chip in the programmer's menu?

If you have more problems, use your programmer to read a programmed PanCam PIC and then post the saved hex file for me to look at.

Share this post


Link to post
Share on other sites

I AM GOING DAFT!!!

I bought a new programmer and a sleeve of 25 fresh chips from Mouser.

I managed to program two chips that work as advertised........BUT,

They only work on channel 2 of my Laser 6 system. No response at all on any other channel.

Get this, I have two transmitters sitting in front of me on the workbench, one is a Hitec Laser 6 and the other is a Hitec Eclipse 7. Both set for channel 62. My receiver, obviously, has a channel 62 xtal installed. They both work normally without the PanCam in the loop. Insert PanCam, and Laser 6 works properly but only on Ch. 2, as I said.

Shut down the Laser 6 and power up the Eclipse 7.....nothing...the servo doesn't even twitch. I am shutting down the receiver first before I make the switch between Tx's.

Now I go back to the Laser 6 and the servo behaves erratically.....actually moving in the OPPOSITE direction to the stick, and not responding at all in the other direction!

I does this even if I just switch it off and turn it back on again....not switching to the E7 at all.

So, I shut it all down and insert the second chip into the chip socket.

The results are EXACTLY the same. It works once, but not a second time when power is removed and reconnected.

I noticed that pin #3 is logic high on power up....does this tell you anything?

Voltage read off pin #1 is 5.2V

Pins 6 and 7 read .280V, pins 2, 4,5, and 8 are at 0vdc.

I'm real close to needing professional stress counseling on this project. I know, I know, you warned us.....don't try this at home if you are a novice! But I'm close,

I know I'm close. I've made it work....I just can't make it work twice in a row.

Tom :(

Share this post


Link to post
Share on other sites

There is an explanation for everything. So, we will get to the bottom of this.

The one thing of interest is that you find that pins 6 and 7 have have .28VDC on them. Although it would be MUCH more meaningful if you had a o-scope, the fact that you see .28V on Pin 6 is an idication that a servo pulse is being sent. Otherwise, the voltage would be 0V or 5V.

So, let's assume that the PIC is working. Just for fun, ignore the servo. Install your voltmeter on Pin 3. Verify it toggles when you use the channel that works (channel 2 of the Laser 6 system). Then, try it on the other channels. Can you control Pin-3 when installed on the other channels and the corresponding stick is moved end to end?

If not, what are the voltages when the bad channels are used?

Baby steps first.

Share this post


Link to post
Share on other sites

On some channels (1 thru 4) pin 3 is logic low on power up, on others, it's logic high.

On this latest test, channel four was the only channel that caused the servo to move,

albeit incorrectly. But on channel 4, at center stick, power up logic is high, when the stick (and servo) moves full right, logic goes to low.

Bizzaro.

Share this post


Link to post
Share on other sites

Ok. But ignore the servo. What I need to know is what does pin 3 do as the stick is moved end to end. Does it change state (0V / 5V)? Check and measure while using each channel.

If pin 3 does not change state with stick travel, what are the voltages at the PIC's pins?

Also, please post clear photos of your board, top and bottom. I want to see your wiring.

Lastly, do you have just one board that you are using to test the PIC's, or is there several boards that all have the same problem?

Share this post


Link to post
Share on other sites

Okay. I have included a link to a photo hosting site that shows my wiring board.

Don't laugh!

On the topside image, the wires coming in from the left are from the Rx. That side is self explanatory.

In the bottom view, pin #1 is at the upper left.

I know, the solder looks very close, but I have probed the board and there are no shorts. I have not defluxed, however, and I'm wondering if the flux could be conductive under power, especially where the gap between some pins is very close.?

Power comes in to #1 and then goes directly out to the servo.

Pin #8 is on the lower left. Ground comes in from the Rx to #8 and is then jumpered to pins,2,4,and 5

Pin #3 has no connection.

Pins 7 and 6 are signal in and signal out, respectively.

http://www.pbase.com/tkilloren/pancam_wiring_board

Thanks,

Tom

Edited by tkilloren

Share this post


Link to post
Share on other sites

Some things to do before you perform the tests I asked for:

- Resolder Pin 8 (Vcc).

- Use you X-Acto Knife and pass it between the pads of 5-6-7-8.

- Clean off the Flux. Thoroughly.

- Use you ohmmeter and confirm that each pin of the PIC is making contact to the soldered pad on the bottom of the board (tin leaf sockets sometimes fail).

After thinking about it, the voltages on pins 6 and 7 should not be identical. That would be unusual. For sure the voltages would not be the same over all stick travel. Might be an intermittant short between them. Another thing to check.

Share this post


Link to post
Share on other sites

I am working under conditions unto which I am not accustomed....that being, having two unknown entities, the PIC and the wiring board. As you have seen, my soldering skills are amateurish. That's something that I can fix. I have gained my livelihood for 35 years making microwave circuits on alumina ceramic. I have laid out a circuit design that I hope you might confirm is correct for the PanCam. I own the company, and this will be a welcomed diversion from my otherwise, day to day tasks.

This circuit board will be built on alumina. It will be metalized with a MIL-STD type thin film metal sequence that will be solderable.

I will make approx. 100 of these devices, as it is as easy for me to make 100 as is it is to make one. I will make these available to anyone on the forum that wishes one (or two), at no cost, as long as the initial supply lasts. I look at this as a way to give something back to all the folks that have helped me along the way. In addition, after having read all of the posts on PIC programming, I know that there are novices out there who have found this task too daunting, and have given up. This wiring board will be a boon to those, like myself, who have found this project beyond their skillset.

I will also purchase 100 chip capacitors, as you cannot buy these in "onsey twosey" quantities, and supply a capacitior with each PWB. It is a very campact design, and I would highly recommend (to the novices) to mount a chip carrier to the PWB and not the PIC directly.

The backside of the PWB is completely metalized (titanium/platinum gold) as a ground plane. The "notches" in the edge of the board are also metalized the same and connected to the GP. Thus, no jumpers are required. Just solder in the chip capacitor, and solder on your leads, to, and from the Rx and servo.

Or, which I like much better, solder on three Ni/Au plated pins on each end, so that now you can plug in directly, without "hard wiring" to your Rx and servo.

This metalization sequence (Ti/Pt/Au) has excellent solderability characteristics and is extremely robust. Once those pins are soldered on....that's where they will stay.

Take a look......http://www.pbase.com/image/38837203

If you see anything wrong, please comment. Making these will be no easy task, so I want to be sure it's correct before I start. I am a one man operation, and have been in business for 15 years. Much of the stuff I do is pretty routine, this will be challenging, and a lot of fun!

I was hoping that it might be "universal" to some of the other projects, but the only pins in common are VCC and GRD..... I dunno.

Tom

Share this post


Link to post
Share on other sites

The layout looks fine to me. Not that it is necessary, but it would be convenient to set up some 0603 sized SMD resistor pads for pins 2, 4, & 5 so that they can be easily shorted to ground with a blob of solder or a low ohm 0603 resistors.

Let me know when you have some extra ceramic carriers. I'll take one to play with. If you are still having problems with the project then plan on sending a programmed PIC to me to check out too. We can work out the details after you try out the new gadgetry.

Share this post


Link to post
Share on other sites

This will take a few weeks to complete. In the meantime, if you could help me select an appropriate chip capacitor from Mouser? Their selection is a bit overwhelming.....I want to make sure to buy the right one.

Also, I will incorporate the pads on the ceramic to accomodate the addition of chip resistors, if desired.

Thanks!

Tom

Share this post


Link to post
Share on other sites

After looking at most (not all) of the pin diagrams for the various projects, I have come up with this layout that might qualify as a "universal" project PWB.

It would allow the addition of chip type passive devices (resistor, capacitors, transistors), and give anyone, novice or pro, a big headstart, with mininal jumpers required.

The ceramic substrate will be .06" thick. ALL pinouts will be shorted to the ground plane on the backside of the carrier, including pin #1. Using a small file, or even a Dremmel tool, the user can "open" the connection to any individual pin, by removing the metal connection on the backside of the ceramic.

The end result will be a very compact, and esthetically pleasing assembly.

For example, the PanCam project would require just two jumpers, on pin #6 and 7, plus the capacitor.

Take a look, and feel free to comment. Changes are easy to make at this stage. Once it becomes "etched in gold" it's final.

www.pbase.com/image/39057908

Tom

Share this post


Link to post
Share on other sites

tkilloren, your assembled PanCam and the custom ceramic carrier boards arrived today. I found that the PIC was programmed wrong. The config fuses were incorrect and the OSCAL value had been over-written with zeros. My gut feeling is that you just need to look into the default settings of your programmer.

I ended up building a new carrier for you. I started with the one you assembled, but it did not work. I found that pins 6 and 7 were not hooked up. I was not sure if anything was under the socket that I needed to know about. In the end, it was easier for me to start from scratch.

A correctly programmed PIC and a fully assembled carrier board was the final solution. Works great for me. I will send it to you in the morning.

Here is the ceramic carrier after assembly:

post-7-1109389730_thumb.jpg

Share this post


Link to post
Share on other sites

It works great! Thank You so much!

And with the Airtronics retract servo, I'm getting just over 200 degrees of pan angle.....silky smooth.

I suspected it was my fuse settings. I am using a "Genius NSP" (Chinese) programmer, and the instructions are in pigeon English! I will focus on the fuse settings and see if I can make it work.

Tom

Share this post


Link to post
Share on other sites

That is good to hear.

Besides the fuse settings, the OSCAL byte needs to be protected. It is at the end of the unprogrammed PIC's address space. If it gets over-written during programming, the PIC may still work, but will be goofy. That is probably worse than the PIC not working at all!

Every programming system is different. The provided software used with the low end offerings is often very casual about protecting the OSCAL byte. So, you will need to ensure that the programmer is setup to leave this data area alone.

Share this post


Link to post
Share on other sites

tkilloren, did you ever resolve the PIC programming problems you were having?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×