Strange download issue

rob53

New Member
I'm having a download problem that I can't quite figure out. I have quite a few Picaxe chips, 08M2s, 14M2s and 20M2s of both Through Hole and Surface Mount varieties, and I have the same problem with all of them. I can get them to program, but only after I disconnect, then reconnect the Serial Out pin. I am self taught with only a couple of years experience in hobby electronics and Basic programming, but the circuits and programs I deal with are rudimentary compared to you guys. In trying to apply logic to this situation, I'm thinking the problem may be with my computer's serial port, but I don't have another PC to test that theory. Somehow the serial port and the Picaxe are not able to get a handshake when I click "Program". I use a serial download cable, as I have an older model Dell Dimension 4700 that has a Serial Port. I've tried disconnecting the serial cable and testing continuity, but all three circuits are fine. I always use the standard picaxe download circuit as shown on page 8 of Picaxe Manual 1, whether I'm programming the chip "in-circuit" on the PCB, either with photo-etched homemade boards or professionally made PCBs from the fab house, or programming on a breadboard, for which I made a 3.5mm audio jack breakout using a piece of veroboard and a 5 pin piece of breakaway male header.

So far, my programs only involve blinking, flashing or fading in and out LEDs, and edge triggering a sound module. This is all for lighting and sound fx for Star Trek model ships. It doesn't matter whether it's a new program or a slight alteration to an existing program, when the program is written and ready to download, I plug in the 3.5mm download plug, then turn on power to the board, then click "program" and I get an error message stating "error- Hardware not found on COM1" (COM1 IS the correct number of the serial port). I can click on "Options"--->Serial Port and it says COM1 "Ready for use". There are no issues in Device Manager, so I'm like WTF? I can then disconnect the Serial Out port, either by unplugging and replugging the breadboard jumper at Serial Out, or if it's "in-circuit", by removing then replacing a jumper that I've built into the serout circuit just for this eventuality, then click download again and the lovely little progress bar starts doing it's thing and the download is successful. OR I can click download again without doing any of the above, and before the error message pops up, I can slightly unplug the 3.5mm plug from the jack (about 1/4"), then plug it back in and the download will begin (if I didn't pull it out too far and also disconnect Serial IN or GND). Has anyone ever heard of this before and if so, is there a fix? I mean, I guess I can go on unplugging-replugging and just live with it, but I really would like to fix it if possible. Any help would be greatly appreciated.
 

premelec

Senior Member
Considering the fiddling with the plug working it sounds like a hardware problem - also what is your power supply?
 

AllyCat

Senior Member
Hi,

Is your supply rail (Vdd) ~4.5 volts, or (much) lower?

The two possible issues that I would investigate are:
1) That the Serial Output voltage (obviously it's no more than the Vdd) is too low for the Dell's "RS232" serial interface (if so, part of this finished project may help,

OR, 2) "Phantom Powering": If the Dell's serial output is (say) 10 volts then the "high" level voltage can feed current through the 22k and the internal "protection" diode into Vdd. The PICaxe thus may be powered when it's not supposed to be. Try putting (say) 1k across Vdd to ground.

Cheers, Alan.
 

rob53

New Member
Hi premelec and Alan :) Thank you both for your replies and suggestions.

Is your supply rail (Vdd) ~4.5 volts, or (much) lower?
When using a breadboard for programming I have a desktop power supply that I set to 5.0V, with a 10uF polarized capacitor from the positive rail to ground. I use a 12V wall wart with the finished lighting designs, as I utilize LED adhesive strip lighting for static window lights and it really needs 12 volts to be bright enough to suit me. All of my circuit designs will either have an LM7805 with two 10uF caps, one on the input and one on the output, or for SMD circuits I use an LM or AMS1117 LDO fixed 5.0V regulator, with 10uF Tantalum caps on input and output sides. My PCBs rarely draw more than 250mA of current if it matters

"Phantom Powering": If the Dell's serial output is (say) 10 volts then the "high" level voltage can feed current through the 22k and the internal "protection" diode into Vdd. The PICaxe thus may be powered when it's not supposed to be. Try putting (say) 1k across Vdd to ground.
I tested the TRS plug with my multi-meter, touching the black probe to the tip (which should be ground) and the red probe to the ring and I get -11.39 volts (I guess it's no wonder it needs a 22K series resistor). Couple of questions, Is the ring connected to "serial out" (i.e. TX) on the computer side, going to "serial in" (RX) on the picaxe side? Also, is the RS232 phase inverted, the reason I'm getting the minus voltages? On the sleeve I'm getting -3.80 volts.

I will look into the link and try the 1K resistor across VDD to ground. I'll let you know how it works out.
 

AllyCat

Senior Member
Hi,

PICaxe uses "real" RS232 polarity, not to be confused with "TTL RS232" levels/polarity that are used on many ic interfaces (which assume the use of a MAX232 or similar chip to amplify and invert the signals to the higher specified voltage levels). Thus PICaxe SerIn and SerOut can be connected "directly" to TXD (via a resistor) and RXD (maybe via a level shifter). But then PICaxe rather spoils the standardisation by connecting earth (0v) to the tip of the 3.5mm jack (IMHO the sleeve should be earth).

I prefer to call the "normal" RS232 level "Idle Low" (e.g. -10 volts), although this is actually the logic "1" level (the Start pulse is a "0" and Stop a "1"). Therefore phantom powering shouldn't be an issue, but then the programming should work properly, so I'm rather clutching at straws. However, I have experienced phantom powering issues in similar circumstances, due to the PIC's low current drain.

Cheers, Alan.
 

Hemi345

Senior Member
The ring is connected to Serial In on the PICAXE side. Sleeve is to Serial Out. I believe the issue might be that while you're connecting the programming cable to the jack, the -11.39V serial IN is being briefly sent to the serial OUT until the cable is completely inserted. Try unplugging your serial cable from the PC side BEFORE plugging the other end into your project. Once you've connected it to your project, plug it back into the PC and attempt to program it.

I prefer using the 3 pin polarized header for the programming circuit as shown on page 44 of PICAXE manual 1. Other than the potential of plugging the header backwards (which isn't an issue if I use a polarized header), I believe it is superior to the audio jack style - the jack on my AXE091 for the 08/14/20M2 is already spotty and I've only plugged the cable into it MAYBE a dozen times.

Below is my programming cable with an adapter I made to use with the AXE091.
 

Attachments

rob53

New Member
I prefer using the 3 pin polarized header for the programming circuit as shown on page 44 of PICAXE manual 1. Below is my programming cable with an adapter I made to use with the AXE091.
Yep, I made one of those as well, except I put female crimps on the end of the wires (with shrink tubing around the crimps to avoid shorts), and I used a three pin piece of regular breakaway male header on my PCB. That setup makes it alot easier to perform my little trick, but I would like to be able to use a panel mount audio jack, then just plug it in and program it, instead of having to lay the model on it's side so I can open up the base to get at that three pin header. I suppose I could have soldered three wires to the board and the other ends to a three pin male header, then mount it somewhere on the model base.


I wasn't always using the audio jack when having this problem. I also tried using that altered serial programming cable that I mentioned above, but I still had to plug and unplug the serial out connection to get it to start programming. I'll try your suggestion anyway, though. It certainly can't hurt to try, but I have a question. Wouldn't it be the same if I just keep the power supply turned off until after I've plugged the TRS serial programming plug into the 3.5mm audio jack? I have to pull my PC out of it's compartment in this desk to get to the back of it, but I'll do it that way if you really think it's necessary.

EDIT: Crap, never mind about that last question. I wasn't thinking about the power coming from the PC. brain fart
 
Last edited:
Top