any raspberry pi people here?

The ARM chip almost surely has a high-resolution timer onboard, the stock Linux kernel in e.g. mainstream distros like Ubuntu isn't configured for hard realtime operation but Linux can be:

formatting link
formatting link

"Average latencies of a few uS are possible on single-CPU systems"

If you need to measure sub uS accurately Linux is probably the wrong tool.

Reply to
bitrex
Loading thread data ...

Sub 10s-of-uS, rather

Reply to
bitrex

The SoC has multiple CPU cores, there have been some experiments running Linux on some of the cores, and doing realtime stuff on another "bare metal":

formatting link
Reply to
bitrex

We use a Zynq for serious projects, dual ARM and a heap of FPGA, but they are hard to get so I'm conserving them for big stuff. This little tach thing will be dinky.

Reply to
jlarkin

The trick to (inexpensive) measuring times/intervals is to use the hardware event to trigger (or capture) something that the software can *later* get around to reading.

E.g., let it start a (hardware) timer and let the software (IRQ) read the "current time" as well as the time on the triggered timer and use the two to determine the system time at which the trigger event occurred.

(Of course, the two timers must be accessed in a single critical region but you can additionally fudge the math based on the work required to compute the difference)

There was an era when counter/timers were truly appreciated (e.g., the 9513) as nearly universal peripherals (timing, analog-digital-analog conversion, etc.).

Nowadays, timers are becoming less clever (less real estate).

Reply to
Don Y

On a sunny day (Mon, 18 Jul 2022 12:13:05 -0700) it happened John Larkin <jlarkin@highland_atwork_technology.com> wrote in snipped-for-privacy@4ax.com:

dunno, did not see any crystal..

In this project I use an old raspberry as signal generator.

formatting link
Look at freq_pi.c it contains part of BCM2835-ARM-Peripherals.pdf page 105 6.3 General Purpose GPIO Clocks

That is for an old Pi, have not looked up the Pi4 yet (have 2, one with 4 GB and one with 8 GB RAM) Somebody did an FM radio modulator with the old PI.

Raspberry Pies are also difficult to get these days. I use the 8 GB for web browsing,

Just been biking in the heatwave here, code orange well only 31 C, wintercoat and hat on.. its cooler on the bike (airflow) than standing still in the sun!

Reply to
Jan Panteltje

It's been cold and foggy here. Mo looks cute in a parka.

It's 52F here right now. The heater is running.

Reply to
jlarkin

Well, you probably have a lot of MC68332s still in stock. They're pretty nice for timing stuff, if you don't mind using external memory. ;)

Cheers

Phil Hobbs

(Whose first embedded design used a 68332, but never got built)

Reply to
Phil Hobbs

68332 has been around for decades and is still available. It's a wonderful chip. It has 16 TPU timer channels that could do what I want. But it's big and expensive, and doesn't have USB or ethernet.

The architecture and instruction set are beautiful. It was a joy to program. We've used about 16,000 of them so far.

Reply to
jlarkin

On a sunny day (Tue, 19 Jul 2022 04:48:52 -0700) it happened snipped-for-privacy@highlandsniptechnology.com wrote in snipped-for-privacy@4ax.com:

Now its 36 on my outside garden thermometer in the shadow, but sure some heat comes from the fence it is hanging from. Inside way above 30 this afternoon, no aircos here.

UK seems to be in alarm mode because highest temperature ever measured in London? Somebody here pointed me to that Arabian clothing like what those sheiks have :-) Not a bad idea perhaps if it stays this way.

Reply to
Jan Panteltje

It's been raining anchovies here.

Reply to
jlarkin

tirsdag den 19. juli 2022 kl. 17.04.13 UTC+2 skrev snipped-for-privacy@highlandsniptechnology.com:

if USB will do almost any MCU with USB will do

formatting link
plenty in stock

or if feeling lazy,

formatting link

Reply to
Lasse Langwadt Christensen

Yes, it really is worth looking closely at the RP2040 or the pico board. It is probably massive overkill for what you want to do, but at a cost of 1USD for the chip and 4USD for the assembled pico board it hardly matters. Digikey and Mouser between them have over 166000 chips in stock and around

33000 pico boards. In the UK Farnell and RS between them have about another 517000 RP2040 chips in stock. There is also a version of the pico with WiFi, but you probably don't need that. I am planning to use an RP2040 for a multi-phase switched mode isolated power supply.

John

Reply to
John Walliker

Pico doesn't have ethernet. I'd like that.

Reply to
John Larkin

You can add ethernet by using a LAN8720 chip, or using a cheap ready-made LAN8720 module. There is software support for this already available, although at the moment it only works properly at 10Mbit/s.

formatting link
John

Reply to
John Walliker

Well, we seem to have only two options, a RaspberryPi or an ARM, one being too small and the other being too large.

But there is actually a third option that falls between these two options in size, a Microchip AVR microcontroller. Programmed in a dialect of Ansi C, with code in a flash memory and loaded on startup.

.

formatting link

Joe Gwinn

Reply to
Joe Gwinn

tirsdag den 19. juli 2022 kl. 22.29.11 UTC+2 skrev John Larkin:

formatting link

Reply to
Lasse Langwadt Christensen

tirsdag den 19. juli 2022 kl. 23.22.28 UTC+2 skrev Joe Gwinn:

in what world does an ancient 8 bit AVR fall between RaspberryPi and ARM* ?

*raspberry pi is also ARM, it is just a Cortex-A CPU, the smaller MCUs are Cortex-M
Reply to
Lasse Langwadt Christensen

Far more I/O stuff, and timers et al.

Joe Gwinn

Reply to
Joe Gwinn

If you aren't a determined patriot, there are some impressively inexpensive ARMs readily available from Chinese vendors like GigaDevice and WCH now:

formatting link
formatting link
Reply to
Clifford Heath

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.