Error message when I load a program on an PICAXE 08m

The program loads without error when the code is as follows
Code:
#picaxe 08m 
#com 4
               'setfreq m8
'Ports
Symbol Thr=input3
Symbol Adj=input1
Symbol Glow=output4
.......
But when the setfreq command is added I get an error message
Code:
#picaxe 08m 
#com 4
setfreq m8
'Ports
Symbol Thr=input3
Symbol Adj=input1
Symbol Glow=output4
........
What am I doing wrong?
 

inglewoodpete

Senior Member
I don't know the answer. However, someone is going to ask "What Version of the Programming Editor?"

2nd thoughts: since the command is an executable instruction, try putting it after the Symbols. There may be benefit in putting it after a label like "Init:" - possibly not essential.
 
Last edited:

hippy

Ex-Staff (retired)
And more importantly ... exactly what does the error message say ?

Does doing a Syntax Check give an error, or is it only when you try and Run / download the program ?
 
I am running Version 5.1.5
No errors during the Syntax Check

The error message is the standard message you get if you don't power the hardware or is not connected to the computer. Starts by saying

"Hardware not found on com4
Possible causes:
1 Hardware not connected
2 Hardware not powered
3 Hardware needs reseting
.........
........"
 
Last edited:

hippy

Ex-Staff (retired)
It may be worth upgrading to the latest version 5.1.7

It could be that a previously downloaded program is running at 8MHz and therefore isn't responding to the new download. The easiest thing there is to do a "hard reset". Power the 08M off, start a download, wait until the Pop-Up shows "Connecting to hardware..." and not before, turn the 08M power back on.
 
I upgraded to 5.1.7 and run syntax check, no errors found. But the problem persists. It will load the program and run fine when I have the setfreq m8 command nullified by making it comment. But when I try to run at 8Mhz it still sends the error message.
 

Technical

Technical Support
Staff member
Have you selected 8MHz via the View>Options>Mode menu. If so this is wrong.

The first time you try to download the updated program, the old program currently in the chip is running at 4MHz, so you need to still download at 4MHz, even though the 'setfreq m8' command is in the program. Speed doesn't change to 8 until the first download is complete.

The hard reset procedure Hippy describes will always be at 4MHz regardless.
 
Last edited:
Top