Trouble getting Aiptek Mini Pencam 1.3 to work

Recommended Posts

Hello all (and Mr. RC-Cam), I am hoping that someone here has had the same experience and can hopefully steer me in the right direction. Here is what is going on when I connect the cam up and try to arm it for snapping photos.

The cam powers up fine when I plug it into a spare channel, or share it with the throttle via a Y-cable. However, I am unable to get the cam to arm, and therefore, it will not take any pics. I double-checked my wiring to be certain that I did not solder anything backwards - everything looked fine, although some of the joints appeared as though they could use some resoldering. I resoldered all of the PIC chip connections at the PIC end of the circuit, but did not resolder the five wires (USB pwr, USB gnd, Shutter switch [SW1], PIC pwr - reference pic D [wire soldered to top of chip near bottom of camera board], PIC gnd - reference pic E [wire soldered to bottom of chip near bottom of camera board]) soldered to the camera end of the circuit.

I know that there is nothing wrong with the USB pwr and USB gnd wires because the cam powers up fine, it just will not arm and shoot photos (PIC functionality). I just got a digital multimeter for testing yesterday, but did not have time to test anything before I left for work (I work 3rd shift). I hope to find some time to test the connections today, and will post the results later on.

On a separate note, I had to do some extensive bending of the PIC pins (I have the 12C508A chip) to get it to fit properly in my programmer (even though I followed the instructions for my programmer to the letter), because the pins were too far apart to be inserted properly in the socket. Is this normal? I am using an Olimex PG2C programmer which connects to a PC via the serial port.

Share this post

Link to post

Share on other sites

Everything is suspect. Photos of your wiring (PIC and camera connections) will be needed to see if there is anything wrong in that area.

Are you sure the PIC is programmed? If you haven't successfully programmed a PIC on your new Olimex programmer, then there is a good chance it is involved in the problem. Be sure to read the rc-cam FAQ concerning PIC programming. BTW, I do not own the programmer you are using so I cannot offer any help on it.

Furthermoe, the cam stored pics when I jumped PIN3 and PIN4 together (usual shutter activation).

On the Camera board:

Cam PWR (top pin on USB can (reference pic B) = 5.01V+

For now, I will have to rely on this information only, since I do not yet have a way of taking close-ups of my work. I'll try to borrow a family member's digital cam tomorrow so I can take some close-ups and post them for reference/t-shooting.

Share this post

Link to post

Share on other sites

I think now we're starting to get somewhere. I thought I had programmed the PIC correctly (every indication in the software and with the programmer's blinking LED made it appear so) even though it gave the Verify error at the end (as indicated in the FAQ as being a normal occurrence). I even saw the status bar pop up and move from left to right (taking longer than 1 minute to finish) as it supposedly programmed the PIC. Is there any way I can read/reprogram the PIC without ruining it, or do I need to buy a new PIC and start over from the beginning?

Share this post

Link to post

Share on other sites

Sorry, I meant to include a brief explanation of the picture I attached in the previous post. In the picture, the small black square is a representation of the 8-pin PIC chip, and the tiny dark gray square (on the right side of the small black square) is the dimple to indicate PIN 1 of the PIC. Go to this page for the instructions and a clearer picture of the programmer.

- Ebayrcer -

Share this post

Link to post

Share on other sites

In regards to the four rows of the socket, the PIC goes across the two rows in the center, not the two rows to one side. On the link you gave, go down to the photo that is labeled "16F628 in the 18Pin PIC Position on the PG2C" for a look at what I mean.

From what I see that you did, your PIC was never programmed. Assuming it is not damaged, you should be able program it. During the verify, it should fail at about address 0040h, which indirectly means it is programmed.

Share this post

Link to post

Share on other sites

I further verified this by doing a Blank Check, which returned a message saying "Device is blank".

A device that is programmed will not be reported as blank.

I tried programming the PIC again, only this time, clicking Yes when asked if I wanted to use the Oscillator Calibration Value from file 0FFFh.

Doing that will only ensure the project will not work. NEVER choose that option when programming an rc-cam.com PIC hex file. Please see the FAQ.

Am I doing something wrong? More importantly, is this PIC chip fried?

I do not have any experience with your programmer. My hunch is that it is not set up correctly and is therefore not working.

Looking at your photo of how you installed the PIC, I also believe you have it installed backwards (notch wrong way). This is shown in the PIC16F628 example photo shown on the sparkfun site. You should consult them on how to operate the programmer.

Share this post

Link to post

Share on other sites

I see both points, I don't know how I could have overlooked that important detail (the notch being backward). I reoriented it correctly and reprogrammed, and here are the results. BTW it says "Verified successfully", not "Verify failed". When I do a Blank Check, it says, "Device NOT blank at address 0040h".

Here is what I get when I click "Read All" on the PIC (can be seen behind the small "Device NOT blank" dialog box):

Share this post

Link to post

Share on other sites

I guess it means it is programmed with something (hard to say if it is valid data). Are you sure you loaded the hex file before programming the PIC?

Again, I really don't have any experience with your programmer, so I am not the official guy to ask. However, from what I can tell, the chip appears "blank" but has had the security fuse set. If it does not work then it is toast (reprogramming not possible).

Share this post

Link to post

Share on other sites

I'm pretty sure it is toast, though I can't understand why, because, according to the settings you posted on the CamMan Aiptek page, I did everything correctly. In direct answer to your question, I opened up the hex file, "cm_Av12.hex", and the WDT and MCLR options were UNCHECKED. The CP option had a checkmark, and the Oscillator value was IntRC. I hit the Program All button, it asked me to confirm Yes or No if I was sure I wanted to program it. I clicked Yes and it went through the programming process (status bar seen as before, although this time it did not take as much time to program the PIC).

I'm pretty sure it is toast. When I do a Read All, it should show the same HEX as what I see when I first load your HEX file, correct? For instance, at address 0000, I should see:

0025 0A17 0A03 0219 0643 0A16 0C01 0028 %...C..

Is that correct?

Also, would you happen to have any spare PICs you would be willing to sell to me (via PayPal) and ship USPS First Class Mail to me? If not, is there a section in the forum where I can post this request to other members? On another completely different note, do you still sell pre-programmed PICs (I hate to go this route though, considering that I have already invested in my own programmer, but if I don't have a choice, then I don't have a choice)?

Share this post

Link to post

Share on other sites

That is correct. I don't have any spare PICs. I just figured that as long as I followed the directions correctly, I wouldn't have any problems (plus, I am on a pretty tight hobby budget). Unfortunately, the cheapest I can find (2) 12C508As is through Mouser for about $8 (only $2.02 accounts for the actual cost of the 2 PICs), the rest covers the charges for shipping via UPS. Needless to say, I am regretting not having ordered a couple extra PICs when I placed my first order. When a PIC is completely blank (new out of the package), should it read all zeroes for the hex values when you do a Read All on it? Also, is this the best place on the forum (RC-Cam Projects) for posting difficulties in programming the PIC with the Olimex PG2C programmer? If not, can you recommend a more specific area in the forum that would be more likely to attract some attention?

Thanks again for all your help, it is most appreciated.

Share this post

Link to post

Share on other sites

I think you will need several spare PICs to troubleshoot the programmer. I say that because I get more than my fair share of emails from users of the low cost hobby programmers. Most of the problems are related to the lack of clear instructions from the supplier and user inexperience with chip burning in general.

I understand you bought the programmer from Sparkfun. They appear to have a forum that has a section dedicated to their PIC programmers. I suggest you read all the relevant discussion on their forum, and if nothing useful is found, ask your questions about it there. No doubt you will find all the answers you seek from a knowledgeable PG2C user.

When a PIC is completely blank (new out of the package), should it read all zeroes for the hex values when you do a Read All on it?

It will have a lot of FFF's in it. But that means nothing, since you'll get the same thing from a programmer that is not working correctly. However, if the programmer is working, the very last address in the PIC12F509 will have data other than FFF's in it if you "read" it when it is blank. That data is the OSCAL value stored by the factory. The value is assigned by the factory based on their test parametrics and it should not be altered (something that is easily done with low cost hobby programmers).