Problems with 18M2 download

Pat13

Senior Member
Hi folks hope you can help out. Have been working on a Halloween project. Have circuit built, have checked solders and continuity through out circuit and all is as it should be. However, when I go to download program, i recieve "Error: Hardware not found". I followed the instructions from page 8 of the first manual, carefully ensuring that a, b and c on the download cable match up with the appropriate parts of the female jack. I have checked continuity from jack to pins and all checks out. The resistors are showing the correct values and i am getting 5v to the 18M2. i have a 0.1uf cap soldered directly across the 5V and 0V pins. When the chip is in a CHI030 board, it accepts the download. I have put the chip on a breadboard and get the same error message. I have tried 3 different female jacks, all with the same result. Not sure what to do.
I recently downloaded a newer version of the programming editor, as I purchased a 14M2 and the version I had did not support it.
 

Goeytex

Senior Member
In the Program Editor > Options > Serial Port. Make sure the correct port is highlighted. Then put a
check in "Show Port Help Tools" . Then click on Test Serial Port. You will see a green LED Graphic.
When you click on that graphic it will light up. At the same time with your meter read the voltage
from Leg 3 ( C.4) to ground. What is the voltage when the light is on ? When it is off ?

Many times on a breadboard the resistors are connected as a voltage divider instead of as a current limit.
Make sure that the only connection to Leg 3 of the 18M2 is one end of the 22K resistor. The 10K connect to the other
leg of the 22K on one side and to ground on the other. If the 10K is connected from Leg 3 to ground then it is incorrect.

Post a clear closeup photo so folks can look at it. This helps tremendously.
 
Last edited:

Haku

Senior Member
If you can supply us with a schematic and/or detailed photos of the final circuit you're having trouble with we can start to assist you with your download problems.
 

Goeytex

Senior Member
In the Program Editor > Options > Serial Port. Make sure the correct port is highlighted. Then put a
check in "Show Port Help Tools" . Then click on Test Serial Port. You will see a green LED Graphic.
When you click on that graphic it will light up. At the same time with your meter read the voltage
from Leg 3 ( C.4P) to ground. What is the voltage when the light is on ? When it is off ?

Many times on a breadboard the resistor are connected as a voltage divider instead or as a current limit.
Make sure that the only connection to Leg 3 is one end of the 22K resistor. The 10K connect to the other
leg on one side and to ground on the other. If the 10K is connected from Leg 3 to ground then it is incorrect.
 

Pat13

Senior Member
Goeytex, will try that when I get home. The correct port is selected as I can download to chip on CHI030 board, but not on breadboard or circuit. Here are pics of the download circuit on circuit I built and of the stereo jack. This is the 3rd jack I used as it was working on the breadboard. Will also try a reset tonite.

 

hippy

Ex-Staff (retired)
@ pat13 : Your pics don't appear to have shown up.

From the description of the fault - works with CHI030, not on your own board - this does sound like a wiring or connection fault.
 

Pat13

Senior Member
@ pat13 : Your pics don't appear to have shown up.

From the description of the fault - works with CHI030, not on your own board - this does sound like a wiring or connection fault.
here is a link to them on photobucket.
I thought it would be wiring or connection as well, yet I am getting continuity from each connection of jack to the corresponding pins. Each resistor is also showing the correct value on the meter, however, when checking the ohms on the serial in circuit, I get a different resistance value. Am attributing that to two resistors connected one after the other.
here are the links to photobucket
<a href="http://s905.photobucket.com/albums/ac255/DeadThings1/?action=view&amp;current=IMG-20111015-00044.jpg" target="_blank"><img src="http://i905.photobucket.com/albums/ac255/DeadThings1/IMG-20111015-00044.jpg" border="0" alt="Photobucket"></a>

<a href="http://s905.photobucket.com/albums/ac255/DeadThings1/?action=view&amp;current=IMG-20111015-00043.jpg" target="_blank"><img src="http://i905.photobucket.com/albums/ac255/DeadThings1/IMG-20111015-00043.jpg" border="0" alt="Photobucket"></a>
i tried attaching them but file is too big. if this doesn't work will take another pic
 

eclectic

Moderator
@Pat13

Re post #5,
is it possible for you to attach some more photographs?

It's very difficult to see what's happening.

Do you have a flatbed scanner or a combined Printer/Scanner?
They are excellent for circuit-board photographs.

e
 

Paix

Senior Member
Photos required, in focus please:
Underside wiring of jack socket (check both pins are soldered together at each side of the socket - they will otherwise be open circuit when the jack is inserted)
topside of board, as vertical as possible.
Underside of board, also as vertical as possible so that a check can be made for shorts (blobs of solder, incorrect wires or whiskers)and missing breaks in strips etc.
 

Pat13

Senior Member
I swear, gentlemen, this project has aged me and made me question my very sanity. I spent all day Saturday trying to get this to accept a download, checking and re-checking and re-checking to the umpteenth power every solder and connection, putting the meter on every connection, solder, jack and resistor. I tried Goeytex suggestions of Port Help Tools and the damn thing is working! I guess i should be happy, except I will never get that Saturday back. I am a newb at this but am not the type of guy to cry wolf or go asking for help whenever there is a little bump in the road. So I thank you for your patience with me as I stumble and bumble around this china shop :eek:
 

Goeytex

Senior Member
The serial test only tests the serial input to the Picaxe. If that is working then maybe focus on the serial output signal.

Do you have a scope?

Also , make double sure there is clean and correct power to the Picaxe by measuring the voltage across Pins 5 and 14.
Are you using a battery pack or some other power source?. If not a battery pack then put your meter on AC volts and
measure the ripple voltage. What is it ? Consider putting a 10 - 100uf input capacitor on your board where the power
first come in. ( not needed with a battery pack).
 

saunj

Senior Member
It could also be a bad chip. I have bought 3 14M2s and two stopped programming after a few re-programs. Nothing wrong with my setup and circuit - it continues to program repeatedly my 3 08M2s and a 14M. I finally programmed the 3rd and have avoided re-programming it, although the program needs tweaking. I need it to use my hot tub.
 

westaust55

Moderator
@saunj,

Does your program have long delays as generated say byPAUSE commands, or using SERIN with no time out, etc?
These programming commands prevent the PICAXE seeing the change in voltage level (to the HIGH state) on the SERIN pin and therefore the PIACXE firmware may be unaware that a new program is to be downloaded.

Have you used a command such as DISCONNECT or SERRXD which prevents the PICAXE downloading a new program until a RECONENCT or ahrd reset has been performed?

Have you tried a “Hard Reset”?
For the M2 parts, to greate a hard reset situation, start the download process from the PE and when the download window appears, then and only then apply power to the PICAXE.
 

Pat13

Senior Member
My 18M2 is now downloading, I have no idea why. I did what Goeytex suggested, using "Test Serial Port" and it started working. However there does seem to be quirks to it and I am not sure if it is the chip, my code or the Program Editor. I ran a simulation on this code and for some reason C.3 is part of the sequence.
Code:
let dirsc=%11000001
let pinsc=%00000000
let w0 = time
symbol sequence =w0
random w1
pause w2


		
	Show: do
		random sequence
		let pinsc =sequence
		random w1
		w2=w1//1000 + 4000
		pause w2
		random sequence
		let pinsc =sequence
		random w1
		w2=w1//1000 + 4000
		pause w2
		pinsc=0
		pause 1000
		loop
 

hippy

Ex-Staff (retired)
It could also be a bad chip. I have bought 3 14M2s and two stopped programming after a few re-programs.
It is unlikely to be a "bad chip" and especially if it is possible to program the chip at least once. The chip could however be turned bad if it were subject to incorrect use such as running over voltage, reversing power connections or through over current damage and similar.

The most likely reason for lack of ability to reprogram is that the chip is not detecting or acknowledging downloads as a result of the program code previously downloaded; long pauses, sleeps or something which causes the chip to wait for data that doesn't appear and while doing so it will not accept further downloads. A Hard Reset will resolve this and allow downloads and reprogramming.
 

saunj

Senior Member
Yes, I tried hard reset many times. The third chip programs OK, same program & setup, but I do not dare to re-program it until I can buy more chips from a different source. It does not even see these 2 chips in Option > Check firmware. The last time it started to download one of them it aborted half way through with a memory error. I'm sure some bad chips get sold, since these work OK the first few times, enough to pass QC.
 

saunj

Senior Member
No damage, I assure you, the same hardware does not damage other Picaxe I have. I'll try again later, maybe there is a buried charge in the flash - the chips do run the last program loaded, except the one whose download stopped half way through. I am a retired engineer with lots of lab experience.
 

MartinM57

Moderator
Still most likely to be a wiring error I'm afraid - it's very hard to kill a PICAXE.

What programming cable are you using?

Do you have any in focus photos, including the underside of the board?

Does the Serial Port test work absolutely reliably when the voltages are measured directly at the PICAXE pins?
 
Top