Pulsout picaxe 20

Rickharris

Senior Member
This is associated with my radio control thread but a different issue as this seems to be Picaxe based.

The pulsout command "Seems" to give an output I don't expect from my understanding of what it is supposed to do:

The following code:
Code:
start:
pulsout 2,100
pause 5
goto start
should give a 1 milli second positive pulse spaced every 5 milli seconds

It appears on both of the PC scope progs I am using it gives a negative pulse.

On my logic probe the out put can be seen pulsing.

If I then change the code to:

Code:
high 2

start:

pulsout 2,100
pause 5
goto start
I get nothin out at all even on the logic probe the output just goes high and stays there.

Has anyone else experience with the axe20? and pulsout. This seem quite odd.
 

Rickharris

Senior Member
This picture is from an 08M - Here the long pulse (pause 5) appears to go low for the short pulse (pulsout 100) this seems the opposite of the manuals command description.

code the same but using output 1

Code:
start:
pulsout 1,100
pause 5
goto start

My expectation is that the pin is not configures os should start low


EVEN if I put low 1 at the start of the programme

Code:
low 1
start:
pulsout 1,100
pause 5
goto start
The picture is the same.
On the 08M setting the pin high at the start DOES have the expected effect - although the pulse appears to go high. Mmm wonder of both programmes are inverting the signal - will check.

BUT why doesn't the axe 20 respond to the initial high statement?
 

Rickharris

Senior Member
The pulsout command inverts the state of the pin for a certain time. So a high pin switches to low.
That's what I expect but not what I see - More worrying is that setting the picaxe 20 output initially (expecting to get a negative pulse out) I get nothing at all just a high state all the time.

I have checked the scope trace with a battery and it appears to show high pulses correctly.



pictures can be seen here http://picasaweb.google.com/rickharriss/Pulsout
 

Technical

Technical Support
Staff member
Check your ground rail of the scope is not inverted, we have just checked

Code:
start:
pulsout 2,100
pause 5
goto start
here on our scope and it works fine, high for 1ms, then low for 5-6ms (including extra time for goto to be processed) ie the inverse of your graphs.

However there is an issue if the pin is initially high, no low pulse is generated. We will look into this.
 

Rickharris

Senior Member
Check your ground rail of the scope is not inverted, we have just checked

Code:
start:
pulsout 2,100
pause 5
goto start
here on our scope and it works fine, high for 1ms, then low for 5-6ms (including extra time for goto to be processed) ie the inverse of your graphs.

However there is an issue if the pin is initially high, no low pulse is generated. We will look into this.
Thanks - At least the main issue wasn't me - I will check the connections -
 
Top