1. PF Contest - Win "Conquering the Physics GRE" book! Click Here to Enter
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Digital Capacitance meter using microcontrollers

  1. Jan 14, 2010 #1
    Hey friends, I am trying to make a digital capacitance meter by using a HSC08 microcontroller chip (MC9S08QG8). Unfortunately this is one of those courses where one doesn't know anything because of lack of pre-requisites. Anyhow (enough complaining) what I have been trying to do is the following:
    Connect the 555 timer to the IRQ pin of the chip. The 555 timer circuit has the unknown Capacitor attached to it. Now I am trying to measure the number of signals over a 7.5s period. I understand that I need an interrupt service subroutine to count the number of signals for this duration. However I am not sure how to control the count timing. I have been trying to use a delay subroutine such that the IRQSC register is set for counting in cycle of that delay.
    Last edited: Jan 15, 2010
  2. jcsd
  3. Jan 15, 2010 #2


    User Avatar

    Staff: Mentor

    You can use one interrupt to just bump a counter variable (the pulse count) and return. Use a second interrupt to trigger on the expiration of the 7.5 second timer. That ISR disables the IO counter ISR, calculates the capacitance for display or whatever, zeroes out the IO counter variable, and re-enables the IO ISR.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook