Detect Signal


Closed Thread
Results 1 to 15 of 15

Thread: Detect Signal

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Which pin do you plan on using to trip the interrupt?

    Assuming the pulse goes high (maybe PortB.0?), let the ON INTERRUPT kick you into the interrupt subroutine and stay there until the pin goes low so you don't kick the counter more than once.
    Check and reset the pulse counter (if counter > 4000 then = 0 etc.etc.) and increment the mileage counter, and do the displaying and button checking in your main loop. No sense doing that in your interrupt subroutine.
    First off though, don't worry about counting mileage...put the whole thing together and whip up a 555 timer or something (maybe even a pushbutton, the switch bounce will give you more than one pulse if the button is old enough!) to simulate the VSS pulse and get the display and everything working without having to go out to the car every 2 minutes to test it out. Just get the thing counting up as you need it (heck you can get both an odometer and speedometer and average speedometer and gas mileage and oil change intervals and all sorts of crap into this), then worry about all the neat stuff for later since you've already got basics down.

  2. #2
    Join Date
    Jan 2005
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    I was trying the same thing as you, but I was wanting to have a Point of Sale printer record my daily millage. and use a Real time clock to Give it a daily time stamp!
    But my problem was to writing the milliage to the eprom and keeping the pulse count while moving.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    I dont intend to store to the eprom until the car stops and is shut off, but that is later once i get it all built and tested

Similar Threads

  1. Replies: 24
    Last Post: - 1st December 2009, 09:01
  2. Detect fast movement using photodiode
    By Pic2008 in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 22nd November 2008, 15:07
  3. Decoding an incoming infrared signal: need advice
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 9th May 2008, 17:28
  4. PIC16F684 + LCD to use the 256bytes of EEPROM - HELP
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th March 2008, 15:19
  5. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 21:36

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