RadioLocman.com Electronics ru
Advanced Search +
  
Go Back   RadioLocman Forum > Electronics and ... > Microcontrollers (MCU)

Microcontrollers (MCU) Application and programming of MCUs, Evaluation Kits and Demonstration Boards, Programmers.

Reply
 
Thread Tools Search this Thread
Old 05-01-2012, 04:55 AM   #1
Radiolocman Robot
Member
 
Join Date: Jan 2011
Posts: 217
Radiolocman Robot is on a distinguished road
Default Discussion: 40 MHz Frequency meter on ATmega16

Quote:
This article shows how to build a small, cheap and simple frequency meter, without any fancy, out of reach components. The simple proposed design can measure frequencies up to 40 Mhz with errors below 1%! This degree of precision will be more than enough to debug most of your analog and digital circuits, and will give you the ability to analyze many aspects that you were unable to see before.
More: 40 MHz Frequency meter on ATmega16
Radiolocman Robot is offline   Reply With Quote
Old 05-01-2012, 04:55 AM   #2
thuybk
Junior Member
 
Join Date: May 2012
Posts: 1
thuybk is on a distinguished road
Default

hi. i'm very interested in this topic
I found your article so useful
And i need your c code for this project. but i can not download the c code file here
Please send it to me to email thuybk.tnt@gmail.com
Thanks so much!
thuybk is offline   Reply With Quote
Old 05-01-2012, 02:37 PM   #3
Vadzz
Member
 
Join Date: Jan 2011
Posts: 65
Vadzz is on a distinguished road
Default

Source code is available for download on author website.
Attached Files
File Type: zip code.zip (2.3 KB, 17 views)
Vadzz is offline   Reply With Quote
Old 05-11-2012, 12:00 PM   #4
winnoncd
Junior Member
 
Join Date: May 2012
Posts: 1
winnoncd is on a distinguished road
Default

Quote:
SIGNAL(SIG_OVERFLOW2) { //timer 2 overflow: measure frequency
counter_0 = TCNT1; //temporarly stock TCNT1 into counter_0

if ((10+TCNT0+(256*T0_ovc)) < (counter_0*16)) // detect if the
{ // frequency is too high to be
if (source < 10){ // sampled
source++;
}
}else{
if (source > 0){
source--;
}
}
Can you explain to me about the algorithm to select the source of the frquency, especially the variable source. Cause in the code, after initalizing source, it is not modified, so how can we compare the its value with 10. What is the meaning of this comparison?
winnoncd is offline   Reply With Quote
Old 05-15-2012, 03:01 PM   #5
san1985
Junior Member
 
Join Date: May 2012
Posts: 1
san1985 is on a distinguished road
Default

Dear readers,
i am working on a capacitive liquid level sensor.i am provided with a co-axial cylinder copper probe of length 30 cm.this acts as a sensor.This probe is immersed in a cylindrical beaker where the water is kept. The probe(stationery) is attached to a clinging handle .the beaker is placed in a lift.The beaker is filled with water upto 500 ml. when the lift is raised or lowered the capacitance in the probe increases due to water as a di-electric between the two probes.the hardware part has been successfully achieved however i am stuck with the software part. The received frequency variation range are below. I have connected this probe to a frequency oscillator. i have designed the frequency oscillator using a 555 timer in astable mode.
at air= 870khz
at 0 cm= 858 khz
at 1 cm= 829 khz
at 2 cm= 798 khz
.
.
.
.
at 30 cm =435 khz. As the capacitance increases, the frequency decreases. For the 555 timer in astable mode f= 1.44/( R1+2R2)C. now i am findin it difficult to feed this variation of frequency range into the ATmega16 AVR microcontroller. i need to feed this frequency range to the microcontroller and display the level of the water in the LCD. e.g. when the capacitor sensor is in 1cm ,it gives 829kh,when at 2 cm it gives 798khz.what is the thing i must do that will take in all the frequency ranges and display in the LCD. should i use counters or interrupts ?? could anyone please enlighten me for the further approach. I would be most grateful if anyone couls provide me sample codes. any help is deeply accepted.
Thank you.
reply me soon
san1985 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Discussion: Very Accurate LC Meter based on PIC16F84A IC Radiolocman Robot Microcontrollers (MCU) 43 06-02-2017 06:06 PM

All times are GMT. The time now is 10:10 AM.




Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Slices ↓
Radiolocman facebook Radiolocman twitter Radiolocman google plus