Switch & Port High Circuit

Anobium

Senior Member
Can anyone point me towards the circuit diagram that someone recently posted. It showed how to create a simple circuit that pulsed the PICAXE IN port high?

I did search but I was not able to find the posting.

Most grateful.

Anobium
 
Last edited:

westaust55

Moderator
@Abobium,
"how to create a simple circuit that pulsed the PICAXE IN port high" is still very vague.
It would help greatly if you were able to expand upon the context in which the circuit as previously posted was originally used.

What is the project requirement that you are seeking this form. Maybe someone can help if they understand clearly what you are trying to achieve.
 
Last edited:

westaust55

Moderator
I want a pulse to ensure the PIN is registered high.

Any improvement on this approach?
Okay, so you found the thread you were looking for.

The solution developed in that thread was primarily to debounce a contact for a reed switch used as an input signal. The concept can apply equally to other type of switch contacts as well.

Is input contact debounce what you are trying to achieve or are you trying to also stretch a short pulse to give the PICAXE time to register that the input state did/has changed.

When you state:
“I want a pulse to ensure the PIN is registered high.”

Does this mean that you want a pulse of a pre determined and fixed length irrespective of the duration that the switch contact is closed for?

Or does it not matter if the PICAXE input stays high for as along as the switch contact is closed?
 

Anobium

Senior Member
I am trying to stretch a short pulse to ensure the PICAXE has time to register (I do not want to use an interrupt), and therefore, I want to know if the state changed. So, I am looking for pre determined and fixed length irrespective of the duration that the switch contact.

I this does this help with the requirement.

Anobium
 

Dippy

Moderator
Yes, it helps. In fact, if you'd said it in your first post then we could have possibly saved many posts.
:rolleyes:

The simple capacitor circuit that evaded Maestro Searcher Eclectic won't provide that for you. However, it may be good enough. Especially as you haven't indicated the 'pre-determined' length - so we're back to guessing.
If you want accuracy and reproducibility you need to look at something like an edge triggered monostable. There are numerous ways to achieve this so get Googling. You can do it with discretes or chip plus bits.
But, that simple cap input may be good enough. Do you understand how it works?
Incidentally, that circuit plus a 555 can do it.

And, it really helps to have a 'scope when experimenting so you can see what's going on.
And then Nick can see what the diode does :)
 

Goeytex

Senior Member
Please describe the pulse you want to stretch. You need to be specific.

How is the pulse generated ?
Is it a positive pulse or a negative pulse ?
What voltage is the pulse ?
What duration is the pulse ?
How long do you want the new pulse to be ?
Is there more than 1 pulse that you need to "stretch" ?

The more specific you can be the better the help will be.
 

hippy

Technical Support
Staff member
I am trying to stretch a short pulse to ensure the PICAXE has time to register (I do not want to use an interrupt)
Which PICAXE are you using ?

If it's an X2 then you can simply take the input to one of the HINTx pins and the PICAXE will register and remember the pulse has been seen regardless of what it is doing or how sort the input pulse is.

If not using an X2 then consider changing design to use an X2 or using the SRLATCH with the input to SRI as this will avoid adding extra hardware.
 
Top