cannot download to 18m2

unigamer

Member
I set up my board last night at it was all working fine, downloading correctly. However, today when I try and and download anything it doesn't work. The strange thing is that the debug command is working, I am getting the pulsin commands from my RC receiver. I would do a reset... but 18m2 apparently don't have that feature. Any ideas?

PS. This is the code that is currently on the chip

Code:
symbol white = w1
symbol red = w2
symbol black = w3


main:

pulsin B.1,1, white;
pulsin B.2,1, red;
pulsin B.3,1, black;
debug
pause 10
goto main
 
Last edited:

nick12ab

Senior Member
Have you made any changes to the project board since you last downloaded?

Make sure the download cable still works by performing the LED test and the Loopback test.
 

unigamer

Member
Just checked the cable on an old Picaxe project and it's working fine along with the loopback test which also worked. I've added header pins to B.4-B.8 but nothing is plugged into them. I have used a multimeter to checker the connections to the 3.5mm socket and it all seems OK but I'll redo the solder just to check.

The best test of course would be to substitute in a new 18m2 but I don't have one spare and I'd prefer not to have to buy a new one.
 

nick12ab

Senior Member
Is there a decoupling capacitor? What is the power supply?

No decoupling capacitors plus a noisy power supply can prevent the program from downloading.
 

unigamer

Member
I've tried it with both 3xAA (Nimh) and the 3v Lipo battery I used yesterday. The +ve and -ve pins are receiving the correct voltage, I've checked that.

I've not used decoupling capacitors because it should need it since the circuit has nothing creating noise.

I do appreciate you trying to help, like everyone I've become stuck with electronics before but normally I know I've gone and done something stupid. In this case I've not made any changes (that I'm aware of!).
 

bfgstew

Senior Member
Listen to Nick, he has helped me out on no end of occasions and de coupling capacitors are essential for the chip to work correctly,trust me.........:p
 

unigamer

Member
I found a 0.1uF ceramic capacitor and fitted that but couldn't find a 100uF ceramic capacitor (that seems awfully big, am I understanding correctly?). Unfortunately it didn't fix the problem. Debug is still working correctly though.

Apparently the m2 chips have been needing decoupling when the previous versions didn't now that I've read up a bit. I will try and find a 100uF capacitor at university tomorrow to try and if that doesn't work I guess I'll have to just buy a new 18m2 :(
 

MartinM57

Moderator
The 2 standard capacitors you are looking for are:

- protecting the PICAXE from high frequencies generated elsewhere and protecting elsewhere from high frequencies generated but the PICAXE ... 0.1uF (=100nF) ceramic

- power supply reservoir to help protect the PICAXE from drops in supply voltage ... 100uF electrolytic
 

unigamer

Member
I do have a 100uF electrolytic capacitor so I added that... still isn't working! 0.1uf ceramic capacitor is right next to the leg 5, so I can't bring it any closer.
 

nick12ab

Senior Member
Have you got another board on which to test the 18M2?

Have you got a different PICAXE you can test on your current board using wires connecting the PCB socket to a breadboard?
 

hippy

Ex-Staff (retired)
Given the original program spends it time either waiting for input or reporting debug data it is likely it is ignoring downloads while doing that and the solution is a Hard Reset.

It may be worth trying again; disconnect connections to the board/PICAXE, turn power off, leave for a few seconds, initiate download, wait for the pop-up to show "Connecting to hardware...", and only then turn power back on.
 

unigamer

Member
Hello

Well I bought another 18m2 because I decided the problem was with the microcontroller and couldn't be bothered making a new download circuit. Turns out I was wrong, and making a new board was the only solution. I'm willing to bet that there was a dodge solder connection because I had been too lazy to change my tip and the joins were pretty bad. Anyway, it's working fine now. Thanks for your assistance (especially nick12ab), it's nice to know there is a very good community to turn to when things aren't working.

PS. Thanks, to tech-supplies for quickly dealing with a problem with my order. Mistakes happen but when they are rectified efficiently, that's what gives me confidence with a company.

PPS. Hippy, I did try that (it's one of the picaxe tricks I've used a lot). For anyone reading this who is having similar problems then that is probably the first thing you should try.
 

Grogster

Senior Member
I'm willing to bet that there was a dodge solder connection because I had been too lazy to change my tip and the joins were pretty bad.
Naughty, naughty. ;)
Soldering must be done correctly if you expect the project to work.

The caps mentioned by others notwithstanding, that would have been your problem then.

Just as a matter of course, I always put the caps on all my designs, and separate caps on every chip, if there are multiple PICAXE chips on the one design. Basically, you put them on your design regardless of if you think you might need them or not. For a few cents, it is cheap insurance against brain-strain!!! :D I can't say I have ever had ANY problems with operation and/or downloading since adopting that policy - which was also suggested to ME in the early days of my membership here... :p
 
Top