Pulsout waveforms without PAUSE

lamxe

Senior Member
Dear All.
Just curious I would like to see waveforms out at pin 2 (picaxe 08M) without pause control (Please see my code) but my oscilloscope has been damaged.So could you help me to know the waveforms of my code is right?? and point me if
is wrong please .Many thank you
sent picaxe11.JPG
Code:
#Picaxe 08M
Do
;pulsout 2,1000 oof sorry wrong code
pulsout 2,100 ; 1ms
loop
 
Last edited:

BESQUEUT

Senior Member
Dear All.
Just curious I would like to see waveforms out at pin 2 (picaxe 08M) without pause control (Please see my code) but my oscilloscope has been damaged.So could you help me to know the waveforms of my code is right?? and point me if
is wrong please .Many thank you
View attachment 18355
Code:
#Picaxe 08M
Do
pulsout 2,1000
loop
Pulses will be 1000x10µs= 10 ms
Low state will be very short.
Code:
DO
   toggle 2
   [S]pauseus 100[/S]
LOOP

To have exactly 1000 µs, you probably have to do a little less, maybe
pauseus 90
to be ajusted.
 
Last edited:

AllyCat

Senior Member
Hi,

I don't know about the 08M but my measurements on the 08M2 shouldn't be very different. The DO loop is basically a GOTO which executes in around 800us (with a 4 MHz clock). TOGGLE takes around 400us, so BQ's code will generate approximately 1.2ms high and low pulses without a PAUSEUS. IIRC a PAUSEUS 0 executes in around 600us.

I think a PULSOUT will extend the Off cycle somewhat (maybe to 1.4ms), but a PULSOUT 100 should give a pulse close to 1ms.

If you want an accurately timed waveform, use PWMOUT PWMDIV16, 2, 124, 250 !

Cheers, Alan.
 
Top