On Sat, Nov 14, 2020 at 01:33 PM, Gareth Evans wrote:
To do this, up to what frequency will the counters of an Arduino work!
The Arduino (ATMega328) can count external clocks up to 1/2 the clock used to run the chip. With a 16mhz clock for the ATMega328 that would be external frequencies up to just shy of 8mhz can be counted. You could use an external pre-scalar if desired.
There are a few AVR chips that have PLL clock multipliers for the I/O circuits clock. One of those chips is the ATTiny85, another the ATTiny861. Those may be able to count external frequencies to 32mhz, as the PLL pushes the internal I/O clock to 64mhz.
I'm sure there are other possible chips. My MFJ auto antenna tuner uses a PIC processor, and if I recall the PIC chip is counting the transmit frequency from my radio without a pre-scalar needed.
Here is a library to support the above chips and a number of other ATTiny chips for the Arduino IDE. At the moment I'm using this board library to program a project using the ATTiny481 chip and it is working great at programming bare chips (no boot loader needed) using an inexpensive eBay USBAsp programmer. I bought one (USBasp) that included a 10pin to 6pin adaptor board and I wired a 6pin ISP programming header on my project's circuit board that works like the 6pin ISP header on the Arduino Nano board.?
The library will let you burn boot loaders if you wish. Interestingly, on many chips the library included a bit banged USB boot loader that allows a direct USB connection to the chips, even though the chips do not normally support USB.
I have an Atmel ICE and development IDE, but now that I found this board library, I'm using the Arduino IDE with USBasp for my project.?
Tom, wb6b