Someone Please Help

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
Sparkoids
Posts: 267
Joined: Mon Sep 14, 2009 10:34 am
Has thanked: 30 times
Been thanked: 19 times
Contact:

Someone Please Help

Post by Sparkoids »

Hi guys,

OK if I send a ZERO to a Port pin then want to clear that ZERO after a delay, I have been sending a ONE to the Port pin.

How can I clear the Port without sending the ONE?

I have tried to INPUT the Port to a VARIABLE (that I then reset to ZERO next instruction) to clear it but it has gone weird.

So without sending the ONE after the ZERO how do I clear the Port to wait for my next ZERO.

Thanks in advance...


James :-}

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Someone Please Help

Post by medelec35 »

Hi James,
So you're sending 0 to set the port at 0V (logic 0)
When you say clear do you mean you want the port to go back to 5V (logic 1) after a set time, or to an input?

Can you post a flowchart that clears with sending a 1 so I can work out what you want to do.
Martin

Sparkoids
Posts: 267
Joined: Mon Sep 14, 2009 10:34 am
Has thanked: 30 times
Been thanked: 19 times
Contact:

Re: Someone Please Help

Post by Sparkoids »

Sorted it out. Just needed to send a 2 microsecond pulse of a 1 and that worked - not exactly what I needed to do but it worked.

What I was trying to do was sort of stop the 0V so it acted as a pulse to mimic a pushbutton switch then went back to where ever it had been voltage wise as it had been before the button was pressed if you get me.

Post Reply