PDA

View Full Version : PICAXE 18 (X) download problem



Mycroft2152
27-01-2006, 06:12
I've just run across a strange problem. I have been using my antique IBM Thinkpad notebook to download into 08M's without any problems using the standard download circuit.

I moved up to a PICAXE 18X and set up the standard download circuit on a breadboard and tried to download a simple "hello world" program. No luck. the Thinkpad did not see the PICAXE 18X. I rechecked everything about six times, circuit, cable, settings. Changed from batteries to 5 volt power supply, did a soft reset and a hard reset. I even tried two other regular 18's. Still no luck.

I went back and tried an 08M, everything worked fine. Fianlly, I scoped out the Serial In signals. Very strange, on the 18's it only toggled to 2 volts, while on the 08M it toggled to 5 volts and downloaded.

It seemed to me the voltage divider needed tweaking. So at the risk of an 18, i swapped the resistors, from 22K-10K to 10K-22K in the download circuit and it worked!

In the morning, I'll try it on a desktop to see if the 18 will download there using the normal resistor set up

Any ideas on why the problem with the 18's?

Myc

BeanieBots
27-01-2006, 08:21
It is NOT a potential divider.
The 10k should be directly across the PC and then 22k in series to the PICAXE.
Thus, when no PC is connected, there will be 32k to 0v.

Technical
27-01-2006, 10:39
As BeanieBots suggests, it implies you didn't have the resistor setup quite right to start with. Check the manual diagram carefully - its not a potential divider.

Mycroft2152
27-01-2006, 18:03
That was a poor choice of words - voltage divider. Based on the scope results, it seemed as if the Serial In line was being pulled down too far, By reversing the resistors the voltage was much higher.

I had thought that I have connnected something wrong, too. This morning, I rebuilt the standard download circuit on another part of the breadboard. So i had 2 download circuits built. Still no luck in downloading. Still could only see 2 volts on the scope when the serial in toggled. To be thorough, i checked it with 2 18's and 2-18X's, both with batteries and a bench power supply. I even went as far as reloading the latest software.

I then moved the 18X breadboard over to my desktop pc. It all worked fine!

It is just strange that the 08M is Ok, but the 18 series will not download on my antique IBM Thinkpad. i'm going to chalk it up to an old laptop serial port.

I'm up and running with the 18's, the desktop is not as convenient as my workbench laptop, though.

Thanks for the help and comments.

Myc

evanh
28-01-2006, 00:16
Last I looked it was indeed a voltage divider. And I never liked the setup at all as it is not tolerant of anything other than 12v signals and even then still affects the ADC on the Picaxe.


Evan

hippy
28-01-2006, 01:00
I don't believe it's ever been a voltage divider, although when I first encountered it, I too thought it should be and at first thought it was wrong ...<code><pre><font size=2> .----------.
| |
___ | |
From PC &gt;-----.----|___|----&gt;| Sin |
| 22K | |
.|. | |
| | 10K `----------'
|_|
|
0V &gt;-----^------------------------- </font></pre></code> The 22K is the most important part. It's a current limiter which allows a greater voltage than the PICAXE power rails, or a negative voltage, to be applied to the PICAXE without damage.

Although I really don't recommend that anyone goes and tries it, with a suitable resistor value the PICAXE can be connected directly to 110V or 240V AC mains using this technique.

The only purpose of the 10K is to stop the 22K 'floating in the wind' when the PC cable is unplugged. It forces the input pin down to 0V, and keeps the PICAXE from unexpectedly entering its program download mode. If you don't mind unreliable operation when the PC is unplugged or keep the PC permanently connected, the 10K can be left out of the circuit entirely.

evanh
28-01-2006, 12:26
It sucks either way.

Technical
28-01-2006, 13:51
evanh is mistaken, it is not a potential divider. Because it is *not* a potential divider it also works on a range of voltages from 5 to 12V, including the output from USB adapters and laptops.

To overcome any ADC issues simply add a schottky diode - see the enhanced circuit in the PICAXE manual.

Edited by - Technical on 1/28/2006 12:53:00 PM

hippy
28-01-2006, 15:38
evanh : <i>It sucks either way </i>

I think you should perhaps clarify how you mean.

It is a Microchip approved technique and documented in at least one of their Application Notes (AN521), which also explains the theory of operation. For the great majority of people using RS232C compliant serial ports, and many using others, it appears to performs its task and works as required.

The ADC issue has been identified and resolved ( in two ways ) and it is for the end-user to decide if they wish to include the modifications to resolve that issue or not.

The simplified download circuit is just one of three options, the enhanced download circuit, and the use of a proper RS232 level convertor being the other, and it's for the end-user to decide upon which suits their puropose and to choose the best interface to use. The simplified download circuit is recommended because it is suitable for most cases.

If there are arguments against using the simple download interface I, and I'm sure others, would like to hear them. I'm not saying you are wrong, but you haven't provided any argument or evidence to support your claim.

Edited by - hippy on 1/28/2006 2:52:12 PM

evanh
28-01-2006, 16:00
Ok, I just went back over my old work and it doesn't use a divider like I thought. However, that is not my complaint. My concern is four fold:
- Low voltage RS232 (+5v is legal RS232) incoming data will be borderline at best.
- Without clamping diode or filter capacitor or buffer transistor, static damage is far more likely.
- ADC issues should not be &quot;acceptable&quot;!
- Polarity also would have been correct if a transistor was used.

Evan

evanh
28-01-2006, 16:06
Btw: I'm refering to the rev-ed kits here, not boards I have or can build myself.

premelec
28-01-2006, 16:13
Personally I love the fact that it WORKs with such a simple setup! No MAX232s etc.. excellent for the purpose intendended - congrats to Rev-Ed... I have other things to be angry with - like a hard drive that just died :-( !

hippy
28-01-2006, 18:10
<i>Btw: I'm refering to the rev-ed kits here, not boards I have or can build myself. </i>

Aha! There you do have valid points in a number of respects.

wilf_nv
29-01-2006, 01:47
Hi Myc,

Got it!

All Picaxe black boxes are not the same when it comes to input logic levels:

For the serial programming input pin, the 08M uses a 2V (0.15Vdd) logic high threshold TTL type input while the 18X uses a 4V (0.8Vdd) logic high threshold Schmitt Trigger input.

Since you scoped the signals of your laptop serial output and measured just 2V (TTL output??) logic high levels, it makes sense that this might still be ok for the 08M serial input but not for the 18X.


wilf

wilf_nv
29-01-2006, 01:49
typo! Ofcourse 2V corresponds to 0.4Vdd

MurrayJ
29-01-2006, 03:46
Could someone please tell me where to connect my multimeter to test voltages and what the voltages should be etc.

I still cannot get my 5 x picaxe8's, 1 x Picaxe 18A and 2 x Picaxe18X to work at all on breadboard, but I have a Picaxe 8 protoboard that Picaxe 8's work perfectly.

After 4 months of this it is getting to the hair-pulling and yelling stage. Please, please, please someone help me before I am sent to a mental hospital.

Murray

Stan. SWAN
29-01-2006, 04:44
Have just come in on this &amp; feel the most pragmatic solution to mycroft2152's woes is to CHANGE HIS LAPTOP.

My own late 90s workhorse was also a W98 IBM Thinkpad (486/100), but it gave very wobbly Basic Stamp programming- especially when battery operated. Later laptops, especially a Y2K era Win98 Toshiba Satellite that I still use for Picaxe work, have been BULLET PROOF. In fact it's superior keyboard often wins out for other work still.

Since used laptops are thick on the ground (often being discarded when their batteries die) &amp; given they halve in value each year, 3-5 yo. ones can picked up for almost nothing. Check the likes of EBay - you'll probably get swamped for US$50.

PS Get one with inbuilt serial D9 of course!

Mycroft2152
29-01-2006, 13:43
Wilf, I think you hit the nail on the head. The scoped signals showed just that.

Stan, thanks for the comment. As much as I'd like to spend $100US, the going rate around here, for a new laptop. It seems like an overkill for this problem, like using a sledgehammer on a tack. I'd rather spend the money on more PICAXE stuff.

I'm thinking of putting together a little &quot;black box&quot; between the pc and the PICAXE, using a CMOS jelly bean chip. Any suggestions?

TANSTAAFL!

Myc

hippy
29-01-2006, 16:49
You could try the simple mechanism of reducing the 22K resistor downwards, which will allow more current through. Going as low as 10K ought to still give the same current limiting at +/-5V as 22K at +/-12V, but I'd work downwards slowly.

You can do this by paralleling the 22K with another resistor to save having to unsolder the 22K. A 100K will drop the 22K to 18K, 47K will drop it to 15K, a 22K drops it to 11K.

The only problem then is if you ever connect that to a PC which does use +/-12V rather then 5V, the current limiting won't be good enough.

As to the &quot;interface box&quot;, you could use a genuine RS232 level convertor, transistors or maybe other chips. I am actually about to embark upon trying to use 74HC's to do that for another project so I'll report back on how I get on.

29-01-2006, 17:11
Hi Murray,

You wrote:

Could someone please tell me where to connect my multimeter to test voltages and what the voltages should be etc.

Having a working circuit is a big help.

When troubleshooting logic circuits keep in mind that the real world is a messy compared to the textbook world. Let's just say that looking for Logic 1 and 0 levels is just the start. Interpreting the actual voltage readings you will measure can tell you a lot more about the circuit and will help find problems.

As a beginner you need to be systematic and learn what the range of normal readings is. With experience you can often home in on a hardware problem in seconds.

In order of preference, the best equipment to make measurements are

1) oscilloscope
2) logic probe
3) meter

I did not list logic analysers which are useful for high speed logic circuits but are more complex to use and few people have access to one. They are like an array of logic probes connected to a multichannel scope and, like the picaxe interrupt, can be triggered on specific logic conditions to take a snapshot of multiple logic signals whose timing need to be compared.

Most readers have a digital multimeter but you may not be aware of how a meter responds to various circuit conditions.

A digital multimeter on the DC volt range can be thought of as two meter leads with a 10M resistor in parallel with a small capacitor connected bwteen them.

This is important to know when measuring parts of a circuit that use large value resistors or small capacitors or cmos inputs that are floating, as the meter may disturb the electrical conditions of the circuit you are trying to measure.

I mention this to explain what you need to do to measure your non-working breadboard circuits.

With a working 08 protoboard available for comparison, test the 08 protoboard
first, measuring and recording the voltages on each pin of the 08 you have on the 08 protoboard.

Record one set of readings with the black meter lead connected to the (-) rail of your power supply as reference, and touching the red meter probe to each pin of the 08 chip.

Then record another set of readings with the red lead connected to (+) rail of the power supply as reference and the black probe touching each 08 pin in turn. Compare these two sets of recorded readings which should give exact opposite results ie 4.5V with respect to (-) should give 0V with respect to (+).

If two readings of the same pin with respect to (-) and (+) are both 0V, then this indicates you are measuring an open circuit connection or a floating CMOS input pin.

You will need to consult the schematic if this result is expected or if there is a loose connection. In the case of a known working circuit, you can assume that this is a normal voltage condition but with rare exceptions, cmos inputs should be referenced to (+) or (-), through large value resistors if necesary, and not be left to float.

If this is indeed an floating cmos input then, while measuring, you will be changing the logic level on that input between 0 and 1, connecting the input to each supply rail through the internal 10M meter input resistance as you measure the pin with repect to (-) and (+).

This may or may not have a result on the operation but keep an eye out for changes in the way the circuit behaves.

Carefully duplicate the components on your breadboard except for the 08. Now measure measure the breadboarded 08 circuit and compare the voltage readings.

Any differences in the readings of the 08 on the protoboard and the breadboard should raise a flag that there is a difference in the way that pin is connected. Consult the schematic on what it should be and make the necesary correction. Finding a solution for the 08 circuit may also shed light on the problems you have with the other chips.

Even if you can't solve the problem (yet), systematic recorded observations will make it much easier for others to analyse the circuit and find less obvious causes of misbehaviour.

Sorry for the longish reply but believe me that this is just the tip of the measurement iceberg and one could write a book about test equipment and test methods.

cheers

wilf

wilf_nv
29-01-2006, 17:19
To expand on this critical paragraph

Carefully duplicate the components on your breadboard except for the 08 chip. THEN MEASURE THE POWER SUPPLY PINS AND CONFIRM CORRECT VOLTAGE AND POLARITY BEFORE YOU PLUG IN THE CHIP. Now measure the breadboarded 08 circuit and compare the voltage readings.

wilf

hippy
29-01-2006, 17:21
<i>I still cannot get my 5 x picaxe8's, 1 x Picaxe 18A and 2 x Picaxe18X to work at all on breadboard, but I have a Picaxe 8 protoboard that Picaxe 8's work perfectly. After 4 months of this it is getting to the hair-pulling and yelling stage. </i>

Sometime ago I provided a detailed list of potential problems and areas to check in such cases, but I'll be $&#163;%&amp;ed if I can find it using the Forum Search function.

The basic circuit is, to say the least, minimalistic, and shouldn't be too hard to debug. As you can program the 08's in the protoboard it means your serial and cable are working. The next things to check are ...

* You've got power to the chip.
* +V power goes to the right pin.
* 0V goes to the right pins.
* 4K7 Reset pull-up to +V in place for 18-range.
* 10K/12K wired correctly.
* Jack socket / molex wired correctly.

The easiest mistakes to make, which stops everything working, is not supplying power, having the Tx and Rx lines of the serial swapped over, or one or both not connected.

You can check serial is getting to and from the breadboard by removing the PICAXE, connecting the TX and RX pins of the jack socket / molex and using the PICAXE Terminal window to send characters; these should be echoed back to the screen.

Remove that link, and put a 1K8 and LED between the serial in on the bread board to the 0V pin of the jack socket / molex. The LED should flash when you send characters. You can check the LED works and which way round it should go by putting it and the 1K8 across a 4.5V or 9V battery.

Check the pin goes to the 22K and 10K, that the other end of the 10K goes to 0V, and the other end of the 22K goes to the Serial In pin of the PICAXE. Finally check the 0V pin of the jack socket / molex goes to the 0V end of the 10K, 0V on the PICAXE, and 0V of the battery / power supply.

Continuity check every component point to every other point, checking the connections expected are there, and that there are no unexpected connections. Then reverse engineer what you have, drawing a diagram from your bread board continuity checking and compare it then with what it should be.

If all that's there and it's still not working, then your breadboard itself could be broken.

Edited by - hippy on 1/29/2006 4:31:30 PM

andypro
29-01-2006, 17:42
As hippy said with the breadboard not working right...I had a similar problem when I first started with picaxing, and I know how horribly frustrating it was. After moving the chip down a few rows on my breadboard, everyhitng worked fine. Could give it a shot...they DO wear out, as sad as it is. I hate tossing breadboards....

--Andy P

29-01-2006, 17:55
Hi Myc,

you wrote:

I'm thinking of putting together a little &quot;black box&quot; between the pc and the PICAXE, using a CMOS jelly bean chip. Any suggestions?

Your laptop non-standard RS232 output may not be compatible with 18X serial input logic high threshold of 4V but it is compatible with the RS232 input logic high threshold of 1.7V!

The simplest solution is to use the industry standard MAX232 chip or any of its variants

( http://focus.ti.com/lit/ds/symlink/max232.pdf )

as an interface. The RS232 side of that chip are connected to the world (e.g. your laptop). The single Vcc power supply and ground pin and the TTL inputs and outputs of the chip are connected to the Picaxe circuit.

I believe that this solution would also be a recommended for operating with long RS232 lines.

wilf

Mycroft2152
29-01-2006, 18:20
I had though about the MAX232 chip as a possible solution. But I thought it inverted the signals and rsulted in TTL levels signals.

I can almost visualize a RS-232 interface circuit using a 74LS240 or 74LS245 for use if there were problems downloading to another microprocessor. I can remember seeing the schematic in a book.I think it waS from the early days of the ooPic (?), or it was a Don Lancaster or Forrest Mims book.

Myc

hippy
29-01-2006, 19:27
Yes, MAX232 inverts the PC serial to what's needed for the PICAXE download and so additional inverters are necessary.

Additional hardware inversion isn't necessary for SERIN/SEROUT because the 'baud rate' specification can force the inversion in software, but that's not the case for the download interface.

Most MAX232-type chips I've looked at contain two input drivers and two output drivers, so it may be possible to daisy chain those to do the inversion as well. One +/-12V input buffer giving 5V/0V into another +/-12V input buffer might just work, with the final output going to the PICAXE.

Also, it may only be necessary to provide this buffering on the serial in to the PICAXE with the output being passed through unaltered and unbuffered.

When using a level converter, I'm presuming the 22K would not be required or should be a lower value resistor, or doesn't the same problem of not being able to get a 5V signal into the PICAXE still occur ? That could present a potential problem if you have PICAXE circuits designed to be programmed through your external interface which could also be accidentally connected to a PC bypassing the interface.

hippy
29-01-2006, 20:29
A thought ... If not using a proper MAX232-type solution, but using simple logic buffers, isn't that just moving the problem from the PICAXE download pin to the logic gate pin ?

Anyway, regardless of that, I did some playing with a 74HC00 ( quad NAND gate ) and this lash-up worked okay for me on a desktop PC ....<code><pre><font size=2> --.-- --.--
| | __
| __ `--| \
`---| \ | &amp; )o---.
___ | &amp; )o----|__/ |
RX &gt;---|___|---|__/ |
10K |
|
TX &lt;------------------------------' </font></pre></code> Ok at up to 38400 baud and down to 2.0V.

A probably better version from info culled via Google ...<code><pre><font size=2> --.-- --.-- --.--
| | | __
_|_ 1N4148 | __ `--| \
/_\ `---| \ | &amp; )o---.
___ | ___ | &amp; )o----|__/ |
RX &gt;---|___|---^---.---|___|---|__/ |
4K7 _|_ 1K0 |
/_\ |
| 1N4148 |
--^-- |
___ |
TX &lt;---|___|--------------------------------------'
180R </font></pre></code>

wilf_nv
29-01-2006, 22:56
Yes, but in retrospect I would forget about trying to interface at TTL lelels.

Just daisy chain the output of each MAX232 receiver through a 22K resistor to the input of a MAX232 transmitter. The double inversion makes the circuit a pure RS232 signal repeater and level booster.

With RS232 levels on both side of this repeater box the signals be compatible with both the laptop output and the Picaxe input network.

One reason for avoiding interfacing at TTL levels is that even then MAX232 receiver output is not guaranteed to provide the 4V logic high needed by the 18X serial input.

As mentioned hippy a couple of HC chips can be used to isolate and protect the Picaxe inputs and outputs from the real world.

The recommended chip for that is the non- inverting 74HCT244 octal buffer as its outputs can drive a heavier load than normal 74HC00 output as its TTL input thresholds are closer to RS232 levels than the 74HC version, making it it also compatible, in this special case, with Myc's laptop 2V RS232 output levels.

The conventional Picaxe 10K/22K and 180 ohm resistor network should be used at the 244 input and output. The 244 input buffer also replaces the Schottky diode normally needed to prevent overdriving the Picaxe chip internal input protection diodes and injecting negative current into the chip substrate that upsets the accuracy of 10 bit ADC measurements.

The 244 has a tristate enable that can be used as a serial bus enable in some applications. The 6 spare 244 buffers can be used as picax input buffers and output drivers to further protect the picaxe chip.

wilf

Stan. SWAN
29-01-2006, 23:42
Guys - this is shaping up as an overkill &amp; I can't believe another PC hasn't been tried! Although very familiar with MAX232, I've never had a single Picaxe driving hassle - desktops &amp; laptops (mostly Toshiba/Acer). My only RS232 woes were PRE Picaxe(as mentioned earlier)with just the same IBM Thinkpad family as yours.

Mycroft2152
30-01-2006, 00:03
Stan, another pc was tried, and the standard interface worked fine! as I said in one of my previous posts. My old Thinkpad japparently has a non-standard serial port. something that, by your posts, you discovered the hard way also.

I disagree with your comment that this has gone too far.
This is a worthwhile project to create a booster box for those of us who do happen to have pc's or laptops with non-standard serial ports and want to use them with the PICAXE.

The appropriate solution to this problem is not &quot;Throw out the pc and buy another&quot;.


It's also a great learning experience. Not only about the PICAXE serial interface, but also the diffeences between the various PICAXEs.

Myc

MurrayJ
30-01-2006, 01:13
Thanks for all your sugestions, but the problem doesnt have a simple solution. ie -

* The dowload cable works with the Rev Ed Board so that cant be it.

* Have tried regulated power(5V), 3 x 1.5v batteries and 4 x 1.2v rechargables so thats not it.

* have tried three different breadboards so thats not it.

* have tried 6 different picaxe chips so thats not it.

* have wired up the download circuit many times and checked the resistors so thats not it.

* I have the correct setting in the program editor or the Rev ed board would not work, but it does.

As you can see, Im not left with many options to go from here, the only other thing I can think of is that the chip is not getting the correct voltages when downloading. Actually Hippy isnt it 10k/22k? I see you have written 10k/12k Is this a typo?

hippy
30-01-2006, 01:53
Sorry, 10K/12K was a typo.

If you can't get anything working it has to be something fundamentally wrong. It would be unlikely that you've blown all the chips up, and if the 08's all work in the protoboard but not on the breadboard then it does point to a circuit or hardware error. If continuity checks from IC legs to resitor legs etc are okay that would show the breadboard connections are okay. Are you sure the 22K is 22K and not 220K or some other mistake which can take ages to spot ? Is there anyone you know who you can get to take a look at what you have ? That often helps.

Stan. SWAN
30-01-2006, 03:28
I'm not advocating dumping your older working Thinkpad ( I still have mine in fact!), but by working with a &quot;known good&quot; PC you'd eliminate a known weak point.

How about you upload a layout pix AND also carefully read &amp; relate the tiny IC code- amazingly I once found &quot;Duh- that's actually a 555 !&quot; Stan

Mycroft2152
30-01-2006, 11:49
There are 2 threads being interleaved here. Mycroft's (my) problem with an old IBM Laptop and PICAXE 18's, and MurrayJ's problem with all his PICAXE 8's, 08M, and 18.

Mycroft's problem was identified as due to a non-standard serial port on the laptop and the difference in the clamping voltages on the 18 and 08M.

The solution was to change computers, which worked, or build a RS-232 booster circuit. I thank all that suggested circuits.

MurrayJ's problem is a tough one. My suggestion is to replace the PICAXE in the known Rev-ED board and try it there. This will let him know if the PICAXE, itself, is good or bad.

TANSTAAFL!

Myc

Robert_5111
18-02-2006, 06:43
I have made one interface to insulate
the PICAXE circuit from serial port of
portable computer.I have tested my circuit with a PICAXE 18X and it works well.
The circuit is very simple to made(2 opto-isolators,5 resistors,1 zener diode), I could provid the diagram by e-mail.

GregBHarper
27-02-2006, 09:36
18X download problems

GregBHarper
27-02-2006, 09:58
18X download problems
I have a AXE110 Datalogger
When it first arrived I could not download to it. I tryed an 18A that I had with no problems from my PC but no good from Laptop.
Supplier replaced 18x and I was able to download OK from PC. I then used datalogging wizard to set time on ds1307 clock. this works Ok. My problem is now that I have done this and written my own software and downloaded it several times is that it eventually locks up and I am unable to program it. Intermittenly it will program. I also need to remove programing cable for programs to run. Hardware resets have no effect. Tried another brand new 18x and it programs ok untill I use wizard to program clock. Then I end up with same prolems again. It appears that when the I2C bus is used the problems start. I have not tried to solve laptop programing but have read forum notes. Can anyone help me with these issues?

hippy
27-02-2006, 15:37
Downloading can become more problematic and sometimes fail if the PICAXE is running some already downoaded code which is stopping it seeing the download attempt.

One thing to try is a &quot;Hard Reset&quot; - Hold the Reset Button until a download is initiated and the pop-up window shows &quot;Connecting to hardware&quot;. If the Reset Button is released then, the PICAXE should always accept a new download.

For an 08/08M, disconnect the power for a few seconds to minutes, then connect the power after staryting the download when the &quot;Connecting&quot; pop-up appears.

Andrew Bright Sparks NZ
27-02-2006, 20:59
As a side topic...

If the 10k/22k is too expensive messy looking; for simplicity leg 2 of the 08/M can be just strapped down to ground once you have the project programmed, loaded and commissioned.

Also, a momentary PB switch between +ve and leg 2 of the 08/M works as a handy Reset switch / PB if you have the 10/22k or any sort of a pulldown resistor fitted on leg 2.

For that matter leg 2 makes a handy external low level hardware interrupt.

- Andrew

GregBHarper
02-03-2006, 04:36
Hi all

I have resolved all issues I had with the programming of the 18X data logger (AXE110).
My findings may be of interest and resolve some of the issues discussed in the forum.

I believe the 10k resistor is part of a voltage divider. The output impedance of the PC or laptop serial port being the other part. I therefore made some measurements to determine the output impedance value. Here are the results:-

Max 232 chip
o/c 7.62volts
10k 6.98volts
Load required for half output voltage (3.81volts) 820 ohms. (Chip output Z)

Laptop
o/c 9.12volts
10k 8.95volts
Load required for half output voltage (4.56volts) 490 ohms. (Laptop output Z)

PC
o/c 10.13volts
10k 9.59volts
Load required for half output voltage (5.065volts) 548 ohms. (PC output Z)

I therefore concluded that port output voltages on my equipment are not a problem and that the output impedance is around 500 ohms for both PC and laptop. The 10k resistor therefore has very little effect as it is about 20 times larger than 500 ohms.

Using the laptop &amp; breadboard with 10k, 22k I could not program an 18A or 18X.
Some time ago intermittent download problems with 08’s were solved by making sure input 3 was always terminated. Thinking that the inputs on 18’s may be similar I connected all to 0V (ground) and with the laptop running on battery supply I was able to program 18’s reliably. With laptop batteries on charge programming stopped. I found by experiment that a 3.3nF capacitor connected between pin 3 and pin 5 solved this problem. This capacitor and the 22k programming resistor form a low pass filter attenuating frequency above about 2,000Hz. This stops high frequency noise generated by the switch mode power supply charging the laptop battery from entering the serial in port on the 18’s. With out this capacitor HF noise enters the serial input and corrupts the 18’s programming data. When program runs they therefore lock up running some confusing program. I found they needed to be powered up with the reset pin at 0V to unlock them.

When I tried this setup on my PC I had another problem. The 18’s would program but would not run the program until the programming cord was unplugged. This issue was resolved by winding 30 turns of the programming cable onto a 200 x 9mm ferrite rod at the 18 end. A large ferrite ring 30mm inside diameter also worked.
With the above measures in place 18’s still programmed reliably with reduce programming voltages (+/- 4 volts).

Recommendations

PC / Laptop Serial Port
Output Voltage +/-5 volts or greater
Output Impedance 1000 ohms or lower

18’s inputs
Must be terminated (if circuit has pull up or pull down resistor these are fine.)
O/c inputs connect to 0 volts

18’s Serial In
Connect a 3.3nF capacitor between pin3 (serial in) and pin5 (0 volts).
I believe this should be standard on all new Picaxe designs.

Programming cable
Wind 30 turns on ferrite rod or ring at 18 end

Happy programming
Greg

BarryP
02-03-2006, 05:07
Wow Thats a Lot of diagnostic work !
All I'm Putting on all my boards is a 4148
In 'Series' with the pc Txd.
Figured no -Ve Voltage was better than just Limiting it with a Schottky.
Also put a 150 ohm R &amp; 4148 in series with the Pc Rxd.
The Other little advantage is that When I unplug the programming cable , The Picaxe doesn't get any glitches and restart.