Shop OBEX P1 Docs P2 Docs Learn Events
does this jive? — Parallax Forums

does this jive?

stbrnrdstbrnrd Posts: 35
edited 2006-05-29 22:14 in BASIC Stamp
on a bs2sx would the comand :
IF Pin1 = 1 THEN Pin2 = 1
ELSEIF Pin1 = 0 THEN
FREQOUT Pin3, 1, 20
ENDIF

would this translate to if pin 1 is on, then pin 2 also on; and if pin 1 is not on, send 20KHz out of pin 3 ??

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-26 03:11
    It would if you had the proper PIN declarations for those names (Pin1, Pin2, etc.)


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • stbrnrdstbrnrd Posts: 35
    edited 2006-05-26 05:12
    do you mean like :

    Pin1 pin 1 'monitor
    Pin2 pin 2 'out if valid
    Pin3 pin 3 'out if invalid

    the problem is this... I need some guidance...hope you could help

    a small portion of my dilemma is this...
    on a bs2sx would the comand :
    IF Pin1 = 1 THEN Pin2 = 1
    ELSEIF Pin1 = 0 THEN
    FREQOUT Pin3, 1, 20
    ENDIF

    would this translate to if pin 1 is on, then pin 2 also on; and if pin 1 is not on, send 20KHz out of pin 3 ??

    i need to monitor pin 1 for a 20 - 80 KHz constant signal... if it is present then pin 2 will signal an optocoupler to allow same signal to go on, and if the signal is not within range, to then send a 20KHz (constant) signal out of pin 3.

    but i don't know how to do this...
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-26 06:39
    Actually I answered your question the first time...I said it would work if the pins were defined to those aliases...However you've since then brought a different signal into the mix...Now you're talking about a high-speed frequency...And that would not be the way to go about this.· But since you didn't have all the details in the first post I should make sure you have them all now.· What exactly is the signal?· You won't get a constant 20 KHz signal out of P3 either way so...I thought you were trying to play a tone.· That will play a very short duration tone.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • stbrnrdstbrnrd Posts: 35
    edited 2006-05-28 04:04
    wow...i now see that being surgically precise helps in getting questions answered... LOL smile.gif makes sense though .

    how would i be able to make the stamp put out an uninterrupted 20KHz signal (for 3-6 hours or more preffered, or a loop)?
    in the same token...how could i have it monitor a 20KHz signal so that if it is within range...one action happens...and if it isn't...another action happens?
    what kind of hardware conditioning would i have to provide the stamp with ...555 timer ciecuit, crystal, resonator, oscillator, etc. (wikepedia has been good smile.gif ) help would be apreciated.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-28 05:44
    I'm not sure what your signal is, but you might want to simply implement the proper circuit to detect it.· That circuit will output a high or low to the BASIC Stamp which could easily be read.· You could build a missing pulse detector I guess...But again, I don't know what your signal is...Square wave, audio signal?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • stbrnrdstbrnrd Posts: 35
    edited 2006-05-28 06:02
    Ohhh I'm very sory, i know see the erros in my questioning...
    ...thanks Chris -

    it is 20-80KHz TTL square-wave signal used in a communication identifier. and Austrian made Ir hub that allows up to 4 different comm stations to share and send data signals (hence the 20-80KHz) but the tasking in the project was to build an interface that would allow my station (20KHz) to not fall bellow range, so that info sent by me could not get mistakingly logged as another or ignored due to false identifier. i hope this didn't make it worse, but it's as technical as the manual is translated. thanks again for your help.
    did you mean like a transistor connected to the signal that would be detected by the stamp as a "missing pulse" in pwm? - or a 555 timer that could be set to the propper signal and driven by the stamp at a much safer modulation?
    your input is appreciated.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-28 20:22
    I would Google missing pulse detector.· Is it just a constant signal or is it a serial data stream?· If it's missing what sort of signal would be seen?· If it's riding on a carrier like a radio signal it seems like you'd need to strip that information from the signal.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-05-28 20:42
    Let me get this straight...

    You have an incoming signal of 20 to 80KHz, which IF detected is to be shunted straight through using an optocoupler, and if it isn't detected, you want your circuit to send its own 20KHz signal?
    (No other parameters, like a specified delay time before switching over?)

    Unless the signal carries some sort of DATA that the BS2 is to decode, what exactly do you need the BS2 for?

    The detection-circuit for the 20KHz signal already gives you a logic signal, right?
    Can't that logic output be used to control the optocoupler?
    And if so can't it also be used to control another optocoupler to connect the locally generated 20KHz to the output?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • stbrnrdstbrnrd Posts: 35
    edited 2006-05-28 23:20
    well gadgetman i was already using the bs2 for other functions within the same system, and the frequency signal is one that i could not get right, so that's why i was wondering if the stamp could do it. the signal itself allows a port to be 'opened' where the transmission of serial data happens from another source not dealing with the stamp...it's sort of a key that allows one station to be different from the other. i don't know why they used such a high and specific frequency, and why it is used to diferentiate between others, but that's just what i have to go on.
    as far as the signal being shunted to an optocoupler, i thought that would be the best way to isolate it from the receiving end. i do not have the circuitry to monitor or generate the signal, that was the point of asking for help...because i sure need it. smile.gif
  • AmaralAmaral Posts: 176
    edited 2006-05-29 01:36
    Try using an LM 567 Tone DETECTOR , seems pretty apropriate for your need.
    Just another thing , if you·· - FREQOUT Pin,Period,20·-··· · at the BS2sx you will be sending a 50 Hz false sine wave out, if you want to send an 20KHz out I think you shoud use·· - FREQOUT Pin,Period,8000 -· ( this is just a guess I'm not familiar to the BS2sx , just BS2 ).

    Hope it Helps

    Amaral


    (PS . I tryed to Attach the datasheet but it's giving me an error (runtime ) , look for it at www.alldatasheet.com )

    ·
  • AmaralAmaral Posts: 176
    edited 2006-05-29 01:39
    Just a fast question What does jive means ? (for me its jazz but makes no sense )

    for the record ... I'm Brazilian


    Amaral.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-29 01:52
    Gadgetman said...(trimmed)
    Let me get this straight...
    You have an incoming signal of 20 to 80KHz, which IF detected is to be shunted straight through using an optocoupler, and if it isn't detected, you want your circuit to send its own 20KHz signal?
    Something you said here got my attention...You're suggesting he is trying to replace the missing data in the signal...I didn't think of that.· Again, not enough information.· I thought he was trying to sound some sort of alarm signal if the other one was missing...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • FranklinFranklin Posts: 4,747
    edited 2006-05-29 05:50
    Amaral, the term "does this jive" means "does this match up with" as in "I like working with parallax products because they are easy, how does this jive with your experience?"

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-05-29 06:01
    Amaral -

    As is often the case with the crazy English language, jive has more than one connotative meaning, and numerous denotative meanings. Indeed it can mean "jazz" as you said. Jive can also implyL 1) equivalence with, equality to, or 2) making sense with something else, as in thes example sentences:

    Do these instructions jive with the procedures you actaully used to assemble this toy wagom, or do we need to correct them?

    or

    If the new information proposed for the updated instruction manual jives with the old instruction manual, then there is really no sense in re-writing, and re-printing it.

    - - -

    In speech, jive is sometimes confused with gibe, which has an entirely different meaning.

    Denotatively, jive is actually described as "the language of hipsters" although that is a slightly dated meaning, and not used very often. This is really a good example of a word whose connotative (common use) meaning is often more popular and current, than its rather outdated, denotative (dictionary) meaning.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • stbrnrdstbrnrd Posts: 35
    edited 2006-05-29 08:08
    Gadgetman

    "You have an incoming signal of 20 to 80KHz, which IF detected is to be shunted straight through using an optocoupler, and if it isn't detected, you want your circuit to send its own 20KHz signal?
    (No other parameters, like a specified delay time before switching over?)

    Unless the signal carries some sort of DATA that the BS2 is to decode, what exactly do you need the BS2 for?----to calculate the signal to ensure that it is a 20000Hz signal----

    The detection-circuit for the 20KHz signal already gives you a logic signal, right?----I have no 'detection ckt' asides from the BS2SX----
    Can't that logic output be used to control the optocoupler?
    Once the stamp calculated the signal to be within range, another pin would control the optocoupler----
    And if so can't it also be used to control another optocoupler to connect the locally generated 20KHz to the output?----there wouln'dt be a need for a secondary optocoupler, the stamp would be the generator of this signal----



    Amaral

    Try using an LM 567 Tone DETECTOR , seems pretty apropriate for your need.----i'm looking at them now thanks----
    Just another thing , if you - FREQOUT Pin,Period,20 - at the BS2sx you will be sending a 50 Hz false sine wave out, if you want to send an 20KHz out I think you shoud use - FREQOUT Pin,Period,8000 - ( this is just a guess I'm not familiar to the BS2sx , just BS2 ).----I was under the impression that it would be out of (pin#), for 1 milisecond (.001), the freq of 20Hz, i thought this would equate a 20000Hz constant signal out of the pin...bu it obviously doesn't---

    and yes, 'jive'... make sense


    Chris...if you wouldn't mind telling me what kind of information do you need, you keep reffering to 'not enough information' but it actually has been offered.

    apreciate the help fellas, even yours Chris.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-29 17:29
    I am still trying to figure out whether you're trying to replace the missing signal or just generate an alert if it's missing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-05-29 17:42
    OK, "lookit", the word is jibe and not jive.

    attachment.php?attachmentid=73618

    Post Edited (PJ Allen) : 5/29/2006 5:51:19 PM GMT
    406 x 280 - 9K
  • PARPAR Posts: 285
    edited 2006-05-29 18:14
    PJ Allen said...
    OK, "lookit", the word is jibe and not jive.

    attachment.php?attachmentid=73619
    Off Topic

    It's even more complicated (confusing?) than that...

    http://www.randomhouse.com/wotd/index.pperl?date=20000711

    PAR
    406 x 51 - 210B
  • stbrnrdstbrnrd Posts: 35
    edited 2006-05-29 19:10
    Chris...I'm looking to Monitor the signal...if it is within range, then signal an optocoupler and allow the signal to continue to it's destination; if it is not wthin range....to then replace the signal with a constant 20KHz signal (not a tone specifically because it would not 'play' through a speaker...)
    i looked at the 555 for freq generation, but how do i make the stamp generate the signal the 555 needs?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-05-29 19:29
    Let this (schematic attached) melt into your mind --
    490 x 418 - 43K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-29 20:07
    That's what I suspected...So something else needs to generate the signal, which I see PJ has already provided.· With your FREQOUT command earlier I suspected you were trying to do this from the BASIC Stamp, which wasn't going to happen like you wanted.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • stbrnrdstbrnrd Posts: 35
    edited 2006-05-29 21:57
    thanks JP, this is what i had in mind up until chris said it couldn't be done by the stamp alone, so the quest to find an oscillator to do the generating of the frequency begins, but al least i was able to see the way it would need to be connected...thanks a lot fellas for your input and patience.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-05-29 22:14
    I'd suggest a·7555, configured as a free-running, or astable, oscillator.· The relationship of RA·and RB·determines the mark-space ratio (duty cycle.)· As you may know, the output of a 7555 (555) can be tailored for pulses, square-waves, and anything in between.
Sign In or Register to comment.