Debug window - open set to frequency specified in code?

Jeff Haas

Senior Member
The title says it all. Can the debug window open to the same frequency set in the code?

For example, I have a program on the 08M running at 8mhz. When the debug window opens, it's at 4mhz and I have to click the drop-down and change it...every single time.

Is there something I'm missing here?
 

westaust55

Moderator
The DEBUG window will open and operate correctly when SETFREQ m8 is used.

Using an 40X1 (did not have an 08M ready to connect at short notice) and the code:
Code:
#PICAXE 40X1

SETFREQ m8
FOR b0 = 1 TO 255
  DEBUG
  PAUSE 1000
NEXT b0
The DEBUG window opens and operate correctly at program download.

If I close the DEBUG window or even the entire PE and reopen the DEBUG window, I see the variable b0 incrementing correctly.

If you are having difficultings you need to post your program and describe in more detail the exact circumstances that give you problems
 
Last edited:

Jeff Haas

Senior Member
I just pasted your code into the Picaxe editor, with the only change being "#picaxe 08M" instead of the 40X1, and downloaded it to an 08M. It doesn't open the debug window to the right setting, instead it's 4mhz. If I change it to 8mhz, I see b0 incrementing.

So it seems to be related to the 08M.
 

Technical

Technical Support
Staff member
The computer debug window has no idea what speed is being currently used by the PICAXE-08M chip (via setfreq adjustments, as the user could have multiple setfreq commands at any point within a program, both before and after debug commands are processed). Therefore it simply has to default to a single value, in this case is the default 4MHz that most people use.
 
Top