How do I detect a polarity change on an input?


Closed Thread
Results 1 to 22 of 22

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    The <> just means the two values are not equal.

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Right, it's not equal to.
    By means of being either Less Than or Greater Than, just like >= would be greater than or Equal to.

    It's initialized to 255 to make sure it always triggers on the first pass.
    If it were left at 0 (assuming there's a CLEAR statement), and the first Request was also a 0, then the code wouldn't execute and the output state would be left Undefined.

    hth,
    DT

  3. #3
    jessey's Avatar
    jessey Guest


    Did you find this post helpful? Yes | No

    Default Your The Man!

    Very Clever Darrel,

    Thanks for the explanation and the code, I totally understand it now. It took me a few minutes to fully get it and once I did I could see with-out a doubt that it's fool proof.

    Thanks Again
    jessey

  4. #4
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Jessey, although your original query has been answered, I thought I would add my opinion as well.

    When you speak of the X10 transmitter I assume you are referring to an X10 RF transmitter, right?

    In which case, why not get rid of the X10 remote altogether, and drive an RF transmitter module directly with your 877? The RF protocol used by X10 is well documented (its actually the NEC IR protocol) and I could send you the URL(s). Besides the hardware being much simpler, you could send as many different commands and addresses as you wish without having to add more transistors.

    Regards,

    Anand

  5. #5
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Forgot to add, there are readymade basic snippets on the web that directly let a stamp drive an X10 firecracker as well; would achieve the same objective you seek.

    Regards,

    Anand

  6. #6
    jessey's Avatar
    jessey Guest


    Did you find this post helpful? Yes | No

    Default Interesting idea

    Thanks Anand,

    I've been away visiting with a friend without a computer (hard to believe now a days). Now that's something that I'd definitely be interested in investigating. I surely would appericate receiving the URL's if you could please send them to me.

    Thanks Again
    jessey

  7. #7
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Hi Jessey,

    To begin with, here's Dave excellent page on the X10 RF protocol http://www.arkis.net/rf_protocol.htm.

    This would give you a pretty good starting point.

    The other approach would be to use a CM17A (Firecracker) module; this would eliminate the need for a separate RF transmitter. Theres loads of basic software available to drive it; one such page is at http://www.awce.com/firecracker.htm

    Hope this helps!

    Regards,

    Anand

Similar Threads

  1. Sony LanC Program
    By l_gaminde in forum Code Examples
    Replies: 2
    Last Post: - 25th September 2009, 18:51
  2. Replies: 1
    Last Post: - 7th November 2007, 20:36
  3. Timing input pulses and re-outputting them
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th February 2007, 01:50
  4. Using LEDs as light sensors
    By skimask in forum Code Examples
    Replies: 3
    Last Post: - 30th December 2006, 22:19
  5. detect oscillating input
    By fester addams in forum General
    Replies: 1
    Last Post: - 22nd November 2004, 18:08

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts