here i am trying to make frequency counter using arduino uno.
i want to replace PIC16F168(as shown in attached image) with atmega 328p.
please help me with programming for atmega 328p.
here i attatched program and hex file of (PIC16F168) too.Well there are some bugs in program though.
thanking you.
I don't know how many people here will be able to help you translate this across, I certainly can't. But if the original one is buggy anyway why not start over from the ground up for Arduino? If this is just working out the frequency of a square wave and outputting the digits to a 7 segment LED display those are the two bits you need to get functional on the Arduino - is my summary correct?
If so, there are lots of resources for helping you get to those two goals. Since there's no other hardware in your circuit, you'll likely get to do all this without running out of Arduino pins, therefore you won't need any additional supporting hardware to drive the display which means you can use a software library (like this one in the playground, link here to run your display.
For the frequency counter, googling Arduino Frequency Counter comes up with a lot of suggestions, and several pre-written libraries you'd be able to choose from. One example, here measures up to 20kHz from an Arduino.
Hope this helps get you started on your way,
Geoff
well yes sir,i got your point!
PIC16F628 is capable of measuring frequency only in 16Hz to 100Hz range.What about atmega 328p?
Is there any way to increase this range sir?
thank you for your valuable suggestion.
Earlier you said 100Hz (100 cycles per second) and now you're asking for 100MHz (100 Million cycles per second) so that M makes a significant difference. There is nothing in that circuit you posted that indicates it could get up to megahertz ranges either so did it work at all?
What is it you're measuring? If you can provide a link to the datasheet for it that would be useful also.
Geoff