Electronics > Projects, Designs, and Technical Stuff
Frequency counter
<< < (4/5) > >>
Ian.M:
Certainly the Arduino libraries are fairly bloated, and many third party ones are of dubious quality,  but there's nothing to stop you using the Arduino hardware and its easy to install GCC toolchain as a dirt cheap and readily available way of getting your toes wet with bare-metal AVR development.  You can even mix & match - use Arduino libraries for stuff that's not time critical and hit the bare-metal ATmega registers for the critical stuff, dropping into inline assembler if you really need it.  However, if your frequency counter design is fairly sane with hardware gateing, there should be absolutely no need to resort to assembler.   

The Arduino hardware does have a few design issues - a clone with a real crystal is vastly preferable, and that idiotic Reset via a coupling cap concept requires you to cut  a track link if you want to debug with a debugWIRE compatible AVR ISP programmer.

When you get to that level, getting a ATmega328P Xplained Mini board from MicrochipDirect (or major distributers) would probably be the cheapest/easiest option.  Its Arduino header footprint compatible with the same MCU and an on-board debugger so is an easy path to real AVR development and debugging.

Kleinstein:
LED display with multiplexing is a beginner project on it's own, though not that difficult.  Ready made LCD modules with 8 or 16 digits are usually a little easier to use.

Building a counter with just 74HC... takes quite some effort. So from the HW side the µC is definitely easier.
Besides the PIC and AVR one could also consider an ARM based µC - these often don't need an extra programmer. relatively cheap test board can often directly be programmed via USB.
HB9EVI:
never bothered using that kind of hardware; there was no arduino yet when I started using AVRs, however I like the nucleo boards since it spares you from designing a pcb for every purpose; but they have similar limitations for example with clock sources like arduino boards.
for many projects no big thing, but a counter without proper reference clock is quite useless

I wrote some minor fractions of code inline asm, didn't even try if it makes a point compared to plain C; just seemed to be convenient.

lcds are indeed easy to set up; personally for a counter a 16x2 seems to me a bit too tiny
when I mentioned 74HC I didn't want to say to build the whole counter from it; just e.g. use some binary counter as a prescaler; the 74HC393 still triggers on 80MHz signals, so I can be quite useful.
cleanworkbench:
Thanks again for the replies , lots of food for thought there , going to look at each suggestion .
mino-fm:
I can give you some examples of reciprocal counters but with german description only. They offer full resolution at any input frequency from mHz to MHz.
Designed 20 years ago the oldest one used an AT90S2313 up to ATtiny4313 today. Up to 7 digits/s and serial transmission: http://mino-elektronik.de/fmeter/fmeter.htm.
There are .hex-files for using 20 MHz crystal or cheap 16,3676 MHz TCXO: http://mino-elektronik.de/download/fmeter20.zip
Later on I used ATmega48 and ATmega88/168/328: http://mino-elektronik.de/fmeter/neue_versionen.htm#c2
Another solution uses 6 digits of 13 mm 7-segment displays incl. sourcecode and layout: http://mino-elektronik.de/7-Segment-Variationen/LCD.htm#led2

Further examples are shown here: http://mino-elektronik.de/fmeter/fm_software.htm. All are based an AVR-controllers. One simple version, one of them uses GPS 1pps signal for high stability, there is code for Arduino Uno R3, code for using BASCOM and so on. Please look and try to understand, why reciprocal counting is the best ;-)

If anybody likes to reactivate an older STM32F429-Discovery board, here is an example for a 7 digit counter from 0,05 Hz to 80 MHz: http://mino-elektronik.de/FM_407/fmeter_407.htm#c1
Following this link there are further examples for STM32F4xx controllers even using 4,3" displays.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod