18M2 chip "hardware not found" after downloading program.

CarlRay

New Member
Hello all. I seem to be experiencing a bit of a problem with my new 18M2 chips. I have downloaded a small program using Logicator and after doing this, the chip is no longer found by the software when I try to download again. I am getting a message that says "Error - Hardware not found on COM9!" The chip was clearly there when I downloaded to it the first time!!

I tried a second chip with the same program and I have acheived the same result. I now have two 18M2 chips that are not found by either the Logicator or the Programming Editor software! I only have two chips left and I fear that the downloaded program is somehow making the chips forget that they are picaxe chips.

I have tried a third chip and used the "Check PICAXE Type" and it does indeed see the new chip.

Any ideas on what is going on here?

Everything worked fine with the program until I added:
serrxd varA
if varA = 11 then label_18 'Compare command

and everthing at label_18.

Any help would be appreciated. I am afraid to do any more in case I am wrecking the chips!

The following is the code that the logicator converted to basic. I do not know how to send the flowchart.

'BASIC converted from Logicator for PICAXE flowsheet:
'Q:\Carl\PICAXE Stuff\Logicator Projects\Serial Comm Test.plf
'Converted on 29/12/2010 at 19:30:40

symbol varA = b0
symbol varB = b1
symbol varC = b2
symbol varD = b3
symbol varE = b4
symbol varF = b5
symbol varG = b6
symbol varH = b7
symbol varI = b14
symbol varJ = b15
symbol varK = b16
symbol varL = b17
symbol varM = b18
symbol varN = b19
symbol varO = b20
symbol varP = b21
symbol varQ = b22
symbol varR = b23
symbol varS = b24
symbol varT = b25
symbol timer = time


let dirsB = %11111111


main:
label_1:
sertxd ("hello","hello"," ")
pause 2000 'Wait command
sertxd ("goodbye","goodbye"," ")
pause 2000 'Wait command
serrxd varA
if varA = 11 then label_18 'Compare command
goto label_1

label_18: sertxd ("hello again","hello again"," ")
pause 2000 'Wait command
sertxd ("goodbye again.","goodbye again."," ")
pause 2000 'Wait command
goto label_1


#no_data 'reduce download time
 

hippy

Ex-Staff (retired)
Welcome to the PICAXE forum.

It's the "SERRXD varA" - When the PICAXE executes this it will wait for data to be received and will not respond to download initiations.

What you need is a Hard Reset. Disconnect the power, initiate the download, wait a short while, then reconnect power. You might have to experiment to get a feel for the right timing to get it working.
 

CarlRay

New Member
Thanks for the swift replay and the information. I did as you said and both chips are back in operation.
I guess the serrxd command is not the right command to use to get serial data?
 

hippy

Ex-Staff (retired)
SERRXD is the right command to get serial data but does (usually) have the consequences of needing Hard Reset.

The alternative is to use SERIN on an additional pin and with an additional serial interface, but while waiting for input, that too will (usually) require a Hard Reset if attempting to download while waiting for data to turn up.

It's like having a personal secretary. You can give them a new task to do ( download a new program ), but if you send them off to wait for the post to arrive they won't come back until the post has arrived.
 
Top