Digital Capacitance meter using microcontrollers

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 5K views
virdip
Messages
1
Reaction score
0
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:
Physics news on Phys.org
virdip said:
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.

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.