8 port Signal Loss Detector, possible to use a pic?


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2005
    Posts
    44

    Default 8 port Signal Loss Detector, possible to use a pic?

    Im investigating some options for a next project.
    What im planning on doing is monitoring 8 signals (or more depending on which pic I use) which are 0 - 5 volt signals

    The signal would normally be high, and if it goes low, I want to wait for a predetermined timeout, and if it remains low for that timeout, then an output port is raised, until its manually reset / acknowledged.

    I can work out how to do it using a single input signal, but would like to have different timeout values for each signal (preset values stored in eeprom)

    Would a pic ie 16F628A be capable of a task like this, and what would be the best way to handle it?
    Im thinking maybe using PortB interrupt on all pins, and then when the interrupt is fired, check which pin is low. Would this be the best way to do it?

    The other thing I havent worked out is how to increment the counter for each port, so any advise will be helpful. Obviously I need 8 word variables, one for each port, which would increment according to an if / then statement depending on the port status, and if the port is high then it is reset?
    Timeout values would be anywhere from 10 seconds to 60 seconds.

    Any help / advice etc would be appreciated.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    This is very simple, and a 16F628 would be just fine. Interrupts would be total overkill... afterall, if you're waiting up to 60 seconds before you trip an alarm, why have 'instantaneous' notification of an alarm scenario?

    If you set up a program loop that polls each port, and the total loop time is say 100mS, you simply increment a variable (one variable for each port pin being monitored) if that monitored pin is not what you expect it to be. When the variable exceeds the EEPROM setting for that pin, you trip your alarm. Worst case is your program gets to know of an alarm situation within 100mS of it happening - no big deal.

Similar Threads

  1. Replies: 67
    Last Post: - 8th December 2009, 03:27
  2. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th March 2005, 00:14
  3. PIC PORT 'special' pins
    By barkerben in forum General
    Replies: 1
    Last Post: - 18th January 2005, 22:40
  4. Pic to Pic communication?
    By Rob Martin in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th April 2004, 20:41
  5. Shaping DTMF Signal out of PIC
    By charudatt in forum Schematics
    Replies: 1
    Last Post: - 8th October 2003, 11:09

Members who have read this thread : 1

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