cant reprogram o8m2!!!!! help

yamato96

New Member
fired up PE and 08m2.

Surfed picaxe forums and copied a code snipet to PE.

Checked the code and by mistake instead of push simulate button , pushed the program buttom.

Cant reprogram 08m2 no more! Tried the power off gizmo till exaustion.

Here the code and problem! the code was to 14m2 and changes the serout baud rate at C.0 - Im a dumbass :-(


Picaxe 14M2

hsersetup B9600_4, %00'Configure hardware serial port to 9600-baud
output B.2 : low B.2
wait 2 'Allow GSM module to fire upstart:
hserout 0,("AT",CR) 'Poll module for responce
gosub wfm 'Wait for module to say it's ready
hserout 0,("AT&F",CR)
gosub wfm
hserout 0,("AT&D",CR)
gosub wfm
hserout 0,("AT&K",CR)
gosub wfm
hserout 0,("ATE0",CR)
gosub wfm
hserout 0,("AT+CSMP=17,167,0,0",CR)
gosub wfm
hserout 0,("AT+CMEE=0",CR)
gosub wfm
hserout 0,("AT+CREG?",CR)
gosub wfm
hserout 0,("AT+CMGF=1",CR)
gosub wfm
hserout 0,("AT+CNMI=1,0,0,0,1",CR)
gosub wfm
hserout 0,("AT+CPMS?",CR)
gosub wfm
hserout 0,("AT+CPMS=",0x22,"SM",0x22,",",0x22,"SM",0x22,CR)
gosub wfm
hserout 0,("AT+CSQ",CR)
gosub wfm
hserout 0,("AT+COPS?",CR)
gosub wfm
hserout 0,("AT&W",CR)
gosub wfm
high B.2 'Turn on LED - ready
end

wfm:
serin B.1,T9600_4,b1,b2
return


Any CPR advice to my 08m2????
 
Last edited:

Goeytex

Senior Member
Please explain what "Cant reprogram 08m2 no more!" really means.

Do you get an error message? IF so what does is say ?
What other symptoms?

What is a "power off gizmo" ?

The top of the program says 14M2, but your chip is an 08M2 . Check in options and make sure you have the correct Picaxe selected.
If that program loaded, then the serrin (with no timeout) in the wfm subroutine is blocking the download. The solution is to do a hard reset.

So create a new blank program then do a "hard reset".

To perform a hard reset using the power supply (all sizes):
1) Disconnect the power supply.
2) Wait until all power supply decoupling capacitors have discharged (can take
up to 30 seconds or more depending on circuit design).
3) Click the PICAXE>Program menu to start a download.
4) Wait until the progress-bar appears on screen.... and you see "Connecting to Hardware"
5) Reconnect the power supply​
 
Last edited:

SAborn

Senior Member
Try replacing the line..... picaxe 14m2 .... at the very top of the code with .... #picaxe 08m2
This will set PE in the correct mode for the 08m2 chip.
Follow the hard reset as listed above.
 

yamato96

New Member
The "picaxe 14m2" was already edited cause i wanted to simulate in the 08m2.

By the power off gizmo, i mean do the hard reset procedure countless times until exaustion.

Thanck' for ur advices and time, but the chip is going to garbage bin.


Maybe i just program another picaxe to serout b1 and b2 to input pin "serin b.1" till the program reaches the end??? but the 08m2 hasn´t the B.1 port but the C.1. :-(
 
Last edited:

russbow

Senior Member
yamato96, how do you know "It's not programming".

Maybe it is, but when running does not give you the results you expect.

Maybe it wont program because your circuit is wrong. We have the code you are using, but if you give a circuit diagram or a hi res photo, forum members will find it much easier to help you.
 

SAborn

Senior Member
I have never known a picaxe to be damaged from a download yet, so dont throw it away just yet.

How can the above listed program even pass the syntax check to allow a program download in the first place for a 08m2.

The code uses pin numbers that the 08m2 dont have, so it can never be loaded to a 08m2, (output B.2 : low B.2) the 08m2 dont have "B" pins only "C" pins.

I suspect you have a fault in the download circuit preventing a download to the chip, and no download has actually ever been made to the chip at all, just you think it has, because the above code simply cannot download to a 08m2 end of story.
 

hippy

Ex-Staff (retired)
By the power off gizmo, i mean do the hard reset procedure countless times until exaustion.
Though exhausted it's worth trying again; the program executes a blocking SERIN which could well stop it appearing to work and should be fixable with a Hard Reset.

1) Turn the power off, and wait a while.
2) Initiate a download.
3) Wait for "Connecting to hardware..." to appear
4) Then power on.

Step 3 is important. There's a reasonable window of opportunity but if you don't get the timing right you might not get a download.
 

hippy

Ex-Staff (retired)
The code uses pin numbers that the 08m2 dont have, so it can never be loaded to a 08m2, (output B.2 : low B.2) the 08m2 dont have "B" pins only "C" pins.
Actually 'B.x' pins do work on the 08M2, they're the same as 'C.x' pins, and simply 'x' pins, but the T9600_4 will fail 08M2 syntax check - won't work for a 14M2 for that matter either.

I suspect there's not a "Hardware not found error", but a "Syntax Error" or "Wrong type of hardware attached" error.
 

yamato96

New Member
the actual code that was loaded:



hsersetup B9600_4, %00'Configure hardware serial port to 9600-baud
output B.2 : low B.2


wait 2 'Allow GSM module to fire up


start:
hserout 0,("AT",CR) 'Poll module for responce
gosub wfm 'Wait for module to say it's ready
hserout 0,("AT&F",CR)
gosub wfm
hserout 0,("AT&D",CR)
gosub wfm
hserout 0,("AT&K",CR)
gosub wfm
hserout 0,("ATE0",CR)
gosub wfm
hserout 0,("AT+CSMP=17,167,0,0",CR)
gosub wfm
hserout 0,("AT+CMEE=0",CR)
gosub wfm
hserout 0,("AT+CREG?",CR)
gosub wfm
hserout 0,("AT+CMGF=1",CR)
gosub wfm
hserout 0,("AT+CNMI=1,0,0,0,1",CR)
gosub wfm
hserout 0,("AT+CPMS?",CR)
gosub wfm
hserout 0,("AT+CPMS=",0x22,"SM",0x22,",",0x22,"SM",0x22,CR)
gosub wfm
hserout 0,("AT+CSQ",CR)
gosub wfm
hserout 0,("AT+COPS?",CR)
gosub wfm
hserout 0,("AT&W",CR)
gosub wfm
high B.2 'Turn on LED - ready
end


wfm:
serin B.1,b1,b2
sertxd (b1,b2)
return


And the error is the "hardware not found"

And the 08m2 is on a Rev-Ed picaxe 08 proto board
 

yamato96

New Member
Sshiiaaaattte. I just unplugged the proto board from the rs232 port and hoocked up a usb serial converter, updated port in options/refresh/apply and voila, just uploaded a blanck program!!!


I just dont understand why could link to my picaxe 18 protoboard with no problemo, and the 08m2 just wouldn´t load. F««««ck , i just dont care. Its ALIVE!!!!!
 
Top