Electrical Issue: PIC input false triggering, Signal Noise suspected.


Results 1 to 36 of 36

Threaded View

  1. #15
    Join Date
    May 2013
    Location
    australia
    Posts
    2,644


    Did you find this post helpful? Yes | No

    Default Re: Electrical Issue: PIC input false triggering, Signal Noise suspected.

    another way is to filter the input with a software routine

    Code:
    reeds var byte
    reeds_flg var byte
    reed_1_active var reeds_flg.0            
    reed_2_active var reeds_flg.1
    reed_3_active var reeds_flg.2
    reed_cnt var byte[3]
    reed var byte
    define reed_threshold 64
    
    chk_reeds:
    reeds=portc & $70  ;c4 c5 c6  active low
    if reeds < 112 then
    reeds=reeds >> 4
    for reed = 0 to 2
    if ! reeds.0 then
            reed_cnt[reed]=reed_cnt[reed]+1 
            if reed_cnt[reed]> reed_threshold then reeds_flg.0[reed]=1
    else
            reed_cnt[reed]=0
    endif
    
    reeds=reeds>>1
    next
    endif
    return
    if you call the chk_reeds subroutine regularly (must be regular) say in this case 100 times per second, then if a reed input is consistently low for 64 (counts in a row the reed_threshold) then the reed_x_active flag will be set.
    Last edited by richard; - 12th February 2016 at 11:26. Reason: correction

Similar Threads

  1. Intermittent reset of 16C6440 - possible noise issue
    By Christopher4187 in forum General
    Replies: 4
    Last Post: - 16th May 2012, 12:43
  2. Noise on input signal
    By fanman in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 28th February 2012, 02:55
  3. Electrical noise problem with PIC 16f84
    By Snap in forum General
    Replies: 11
    Last Post: - 26th September 2007, 09:36
  4. Input Noise
    By PJALM in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 28th February 2006, 19:26
  5. False Triggering I/O
    By pdegior in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th July 2005, 09:02

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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