Simple IO help please
SeaRay
Posts: 4
I am starting a little late in life with the propeller and BS2 infatuation and I desperately need some help if anyone would be so kind.
·
I am trying to take a +5v pused·signal in and trigger an output that is -5v (see theoretic diagram -i hope it posts right).
·
This is something that I would normally do with a NPN transistor but it would be fun to do with Parallax products due to some advanced features I can add later...
·
(DIAGRAM)
Common +5v
····································································|······················································· |
Simple +5v pulsed signal 1
à| BS2 |
à---- (-5v )
Device input 1
Simple +5v pulsed signal 2
à |BS2 |
à
(-5v )
Device input 2
Simple +5v pulsed signal 3
à |BS2 |
à
(-5v )
Device input 3
Simple +5v pulsed signal 4
à |BS2 |
à
(-5v )
Device input 4
Simple +5v pulsed signal 5
à |BS2 |
à
(-5v )
Device input 5
Simple +5v pulsed signal 6
à |BS2 |
à----(-5v )
Device input 6
···································································· |···················· ································· |
···································································· |································· ···················· |
Common Ground
·
·
Can someone please offer a sample of code for the BS2, Javelin or Propeller?
·
·
Thank you
·
I am trying to take a +5v pused·signal in and trigger an output that is -5v (see theoretic diagram -i hope it posts right).
·
This is something that I would normally do with a NPN transistor but it would be fun to do with Parallax products due to some advanced features I can add later...
·
(DIAGRAM)
Common +5v
····································································|······················································· |
Simple +5v pulsed signal 1
à| BS2 |
à---- (-5v )
Device input 1
Simple +5v pulsed signal 2
à |BS2 |
à
(-5v )
Device input 2
Simple +5v pulsed signal 3
à |BS2 |
à
(-5v )
Device input 3
Simple +5v pulsed signal 4
à |BS2 |
à
(-5v )
Device input 4
Simple +5v pulsed signal 5
à |BS2 |
à
(-5v )
Device input 5
Simple +5v pulsed signal 6
à |BS2 |
à----(-5v )
Device input 6
···································································· |···················· ································· |
···································································· |································· ···················· |
Common Ground
·
·
Can someone please offer a sample of code for the BS2, Javelin or Propeller?
·
·
Thank you
Comments
Are the 6 input pulses required to be simultaneous and do you want to fire the outputs on the rising or falling edge or is timing not critical.
What frequency will the pulses be delivered at.
Did you intentionally mean to write -5v or did you mean 0v. The Stamp logic is 0v·- 5v
I think your project is doable the answers to the above will help decide which way would be the best way
regards
Jeff T.
The output must mimic the input signal without alteration and there will be simultaneous i/o.
Think of it like what is typical for a CNC machine – you have pulsing engine or pulse generator of sorts and a driver. Some drivers are common positive and some are common negative. The device I am trying to drive needs a source that is negative instead of the positive pulsing signal I currently have available.
(Please note – this is not CNC related – I only used the analogy to illustrate some parallels)
I typically use an array of NPN transistors in that application but this of course this is not CNC related and due to the features of the BS2 I could in theory “see” what ‘s going on with some monitoring routines and possibly display data about the signals to an LCD, which would be handy in this particular application.
As far as timing is concerned, the driven device has a user selectable setting allowing for high/low trigger.
I am afraid that I am going to have to implement the typical NPN array and the BS2 as well for the added functionality I am seeking. I was hoping that this would not be the case as I figured one could program the BS2 to operate much like a small transistor array.
I hope that this gives you a little better idea.
Thank you for your response…
i am modifying for my project a plc output module, and what you describe is done on that module with
a·· "4049" chip,, i believe they call it an inverting hex buffer or something like that, which i have no idea
what all that means, inverting takes high logic and turns it to low logic, so that an input pulse allows the output to sink
5vdc.,,, hex means each package or chip has 6 identical circuits, which these have.,,, and buffer?· i dunno
but it does what you illustrate and what i understand you are asking for.
now i realize that this is not a bs2, or a micro, but it is cleaner than 6 seperate npn transistors
and i suppose you could drive it with a bs2 so that you can do as you like with codeing to drive it?
or not?
just saw the similarity of your question and the application of the 4049 on the board i am working with.
bob g
If timing is not an issue it is possible to simultaneously monitor the states of all 6 inputs and latch the inputs throught to the outputs inverted. If you want -5v you will have to use external components.
Although I have never used a Propellor ( I need to buy one ) it may be the option to go for. You could post a follow up to this thread on the prop forum and I am sure you will get the answer.
Jeff T.