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

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

Someone Please Help

Postby Sparkoids » Sat Mar 23, 2019 10:20 am

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 :-}

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8323
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2380 times
Been thanked: 3391 times
Contact:

Re: Someone Please Help

Postby medelec35 » Sat Mar 23, 2019 11:48 am

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

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

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

Re: Someone Please Help

Postby Sparkoids » Sat Mar 23, 2019 3:23 pm

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.