inglewoodpete
Senior Member
I am developing software for an 08M2 (Firmware v4.A) to interwork with a Davis anemometer. The 08M2 is the real thing, not the simulator. PE Version 6.0.7.2 Beta
I wasn't getting the granularity at low wind speeds with the PulsIn command that I wanted, so I lowered the PICAXE's clock speed to 1MHz. This gives me good resolution at low wind speeds but I found that the PICAXE consistently reboots rather than returning the timeout value of 0. I imagine that some sort of watchdog timer is resetting the 08M2 due to the extended execution time of the PulsIn command.
Is there a solution to this, apart from not running the chip a 1MHz or slower?
I wasn't getting the granularity at low wind speeds with the PulsIn command that I wanted, so I lowered the PICAXE's clock speed to 1MHz. This gives me good resolution at low wind speeds but I found that the PICAXE consistently reboots rather than returning the timeout value of 0. I imagine that some sort of watchdog timer is resetting the 08M2 due to the extended execution time of the PulsIn command.
Is there a solution to this, apart from not running the chip a 1MHz or slower?
Code:
[color=Blue]Pause [/color][color=Navy]1000[/color]
[color=Blue]SerTxd ([/color][color=Red]"Booted"[/color][color=Black], [/color][color=Blue]CR[/color][color=Black], [/color][color=Blue]LF)
Do
SetFreq m1 [/color][color=Green]'Works with m2; Fails with m1
[/color][color=Blue]Pause [/color][color=Navy]1 [/color][color=Green]'Ensure clock is steady
[/color][color=Blue]PulsIn C.1[/color][color=Black], [/color][color=Navy]1[/color][color=Black], [/color][color=Purple]w4
[/color][color=Blue]SetFreq m4 [/color][color=Green]'Restore native clock speed for the SerTxd
[/color][color=Blue]Pause [/color][color=Navy]2 [/color][color=Green]'Ensure clock is steady
[/color][color=Blue]SerTxd([/color][color=Red]":"[/color][color=Black], #[/color][color=Purple]w4[/color][color=Black], [/color][color=Blue]CR[/color][color=Black], [/color][color=Blue]LF)
Loop [/color]