Hi,
I've been testing a new (?) method for detecting/stretching short pulses and rather than change my test hardware to generate shorter pulses (and possibly have issues with 'scope triggering), it seemed easier to just add a SETFREQ m1 to my code. However, the program then ran extremely slowly, so I stripped the code down to the following:
The command data sheet doesn't say anything about the effect of reduced clock speed, but m2 does give an increment every 2 seconds, as expected. However, m1 appears to take 16 seconds, k500 gives 32 seconds and k250 64 seconds between time increments! I couldn't be bothered to try anything slower.
I've tested this with an 08M2 and a 20M2. Is this a "feature" of PICaxe Basic, or have I overlooked something?
Cheers, Alan.
I've been testing a new (?) method for detecting/stretching short pulses and rather than change my test hardware to generate shorter pulses (and possibly have issues with 'scope triggering), it seemed easier to just add a SETFREQ m1 to my code. However, the program then ran extremely slowly, so I stripped the code down to the following:
Code:
#terminal 1200
#no_data
setfreq m1 ; 1 MHz clock
do
w1 = time
do
; .....
loop until w1 <> time ; Fall through when the time variable increments
sertxd(#time," ")
loop
I've tested this with an 08M2 and a 20M2. Is this a "feature" of PICaxe Basic, or have I overlooked something?
Cheers, Alan.