Electronics-Related.com
Forums

any raspberry pi people here?

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

> > >The pi doesn't seem to have any general counter/timer hardware, like >ARMs usually do. I've seen vague references to using the GPU to do >timings. > >I'd like to measure frequencies and timestamp some edges, in the 1 us >sort of domain, several channels. I guess we could hang a small FPGA >off to the side if pi can't do it. > >Do pi's have crystal oscillators?
dunno, did not see any crystal..
> I guess we could add one too.
In this project I use an old raspberry as signal generator. http://panteltje.com/panteltje/newsflex/download.html#freq_pi 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!
On Tue, 19 Jul 2022 10:51:13 GMT, Jan Panteltje
<pNaonStpealmtje@yahoo.com> wrote:

>On a sunny day (Mon, 18 Jul 2022 12:13:05 -0700) it happened John Larkin ><jlarkin@highland_atwork_technology.com> wrote in ><gobbdhpb39nfocgdnqd87vn8kkoc1vgtl6@4ax.com>: > >> >> >>The pi doesn't seem to have any general counter/timer hardware, like >>ARMs usually do. I've seen vague references to using the GPU to do >>timings. >> >>I'd like to measure frequencies and timestamp some edges, in the 1 us >>sort of domain, several channels. I guess we could hang a small FPGA >>off to the side if pi can't do it. >> >>Do pi's have crystal oscillators? > >dunno, did not see any crystal.. > >> I guess we could add one too. > >In this project I use an old raspberry as signal generator. > http://panteltje.com/panteltje/newsflex/download.html#freq_pi > >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! >
It's been cold and foggy here. Mo looks cute in a parka. It's 52F here right now. The heater is running.
jlarkin@highlandsniptechnology.com wrote:
> On Mon, 18 Jul 2022 14:05:27 -0700 (PDT), John Walliker > <jrwalliker@gmail.com> wrote: > >> On Monday, 18 July 2022 at 21:30:01 UTC+1, lang...@fonz.dk wrote: >>> mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don: >>>> Lasse Langwadt Christensen wrote: >>>>> John Larkin: >>>>>> The pi doesn't seem to have any general counter/timer hardware, like >>>>>> ARMs usually do. I've seen vague references to using the GPU to do >>>>>> timings. >>>>>> >>>>> >>>>> which version of pi? >>>>> >>>>>> I'd like to measure frequencies and timestamp some edges, in the 1 us >>>>>> sort of domain, several channels. I guess we could hang a small FPGA >>>>>> off to the side if pi can't do it. >>>>> >>>>> using a pi I assume you'll be running some kind of linux I don't see how you >>>>> could do 1us timing in linux >>>> My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns >>>> resolution for my iic interface. >>> sure as long as your code is running and not interrupted you can busy wait with >>> nanosec resolution up to few ms >>> >>> try reacting on a signal to measure it's frequency or timestamp it .... >> >> The RasPi 4 is a very nice machine. The CM4 even more so if only you could buy one >> at the moment. The CM4 has a PCI-e interface which gives lots of possibilities. >> The Beaglebone Black is also good, but it has less RAM than >> the Raspi 4 and only has a 100Mbit/s ethernet port whereas the PI 4 has 1Gbit/s. >> The extra processors do allow time critical software to be written though. >> >> There are add-on modules with real time clock chips for the Pi and the BBB. >> >> Alternatively, look at the RasPi pico board or the RP2040 microcontroller which it >> uses. Both of these have the big advantage that they can be bought in large quantities >> at the moment. The RP2040 has multiple programmable state machines which >> allow very complex i/o operations with precise timing. There are also multiple >> counter-timer modules. It is a two-core ARM M0+. >> Finally, don't forget the XMOS devices, many of which support USB and/or ethernet >> together with deterministic timing and multiple cores. >> John > > 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. >
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) -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com
On Tue, 19 Jul 2022 09:10:41 -0400, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

>jlarkin@highlandsniptechnology.com wrote: >> On Mon, 18 Jul 2022 14:05:27 -0700 (PDT), John Walliker >> <jrwalliker@gmail.com> wrote: >> >>> On Monday, 18 July 2022 at 21:30:01 UTC+1, lang...@fonz.dk wrote: >>>> mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don: >>>>> Lasse Langwadt Christensen wrote: >>>>>> John Larkin: >>>>>>> The pi doesn't seem to have any general counter/timer hardware, like >>>>>>> ARMs usually do. I've seen vague references to using the GPU to do >>>>>>> timings. >>>>>>> >>>>>> >>>>>> which version of pi? >>>>>> >>>>>>> I'd like to measure frequencies and timestamp some edges, in the 1 us >>>>>>> sort of domain, several channels. I guess we could hang a small FPGA >>>>>>> off to the side if pi can't do it. >>>>>> >>>>>> using a pi I assume you'll be running some kind of linux I don't see how you >>>>>> could do 1us timing in linux >>>>> My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns >>>>> resolution for my iic interface. >>>> sure as long as your code is running and not interrupted you can busy wait with >>>> nanosec resolution up to few ms >>>> >>>> try reacting on a signal to measure it's frequency or timestamp it .... >>> >>> The RasPi 4 is a very nice machine. The CM4 even more so if only you could buy one >>> at the moment. The CM4 has a PCI-e interface which gives lots of possibilities. >>> The Beaglebone Black is also good, but it has less RAM than >>> the Raspi 4 and only has a 100Mbit/s ethernet port whereas the PI 4 has 1Gbit/s. >>> The extra processors do allow time critical software to be written though. >>> >>> There are add-on modules with real time clock chips for the Pi and the BBB. >>> >>> Alternatively, look at the RasPi pico board or the RP2040 microcontroller which it >>> uses. Both of these have the big advantage that they can be bought in large quantities >>> at the moment. The RP2040 has multiple programmable state machines which >>> allow very complex i/o operations with precise timing. There are also multiple >>> counter-timer modules. It is a two-core ARM M0+. >>> Finally, don't forget the XMOS devices, many of which support USB and/or ethernet >>> together with deterministic timing and multiple cores. >>> John >> >> 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. >> > >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)
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.
On a sunny day (Tue, 19 Jul 2022 04:48:52 -0700) it happened
jlarkin@highlandsniptechnology.com wrote in
<066ddh5rrsupne4iqvks5gjj8ge1qhefe6@4ax.com>:

>On Tue, 19 Jul 2022 10:51:13 GMT, Jan Panteltje ><pNaonStpealmtje@yahoo.com> wrote: > >>On a sunny day (Mon, 18 Jul 2022 12:13:05 -0700) it happened John Larkin >><jlarkin@highland_atwork_technology.com> wrote in >><gobbdhpb39nfocgdnqd87vn8kkoc1vgtl6@4ax.com>: >> >>> >>> >>>The pi doesn't seem to have any general counter/timer hardware, like >>>ARMs usually do. I've seen vague references to using the GPU to do >>>timings. >>> >>>I'd like to measure frequencies and timestamp some edges, in the 1 us >>>sort of domain, several channels. I guess we could hang a small FPGA >>>off to the side if pi can't do it. >>> >>>Do pi's have crystal oscillators? >> >>dunno, did not see any crystal.. >> >>> I guess we could add one too. >> >>In this project I use an old raspberry as signal generator. >> http://panteltje.com/panteltje/newsflex/download.html#freq_pi >> >>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! >> > >It's been cold and foggy here. Mo looks cute in a parka. > >It's 52F here right now. The heater is running.
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.
On Tue, 19 Jul 2022 15:07:32 GMT, Jan Panteltje
<pNaonStpealmtje@yahoo.com> wrote:

>On a sunny day (Tue, 19 Jul 2022 04:48:52 -0700) it happened >jlarkin@highlandsniptechnology.com wrote in ><066ddh5rrsupne4iqvks5gjj8ge1qhefe6@4ax.com>: > >>On Tue, 19 Jul 2022 10:51:13 GMT, Jan Panteltje >><pNaonStpealmtje@yahoo.com> wrote: >> >>>On a sunny day (Mon, 18 Jul 2022 12:13:05 -0700) it happened John Larkin >>><jlarkin@highland_atwork_technology.com> wrote in >>><gobbdhpb39nfocgdnqd87vn8kkoc1vgtl6@4ax.com>: >>> >>>> >>>> >>>>The pi doesn't seem to have any general counter/timer hardware, like >>>>ARMs usually do. I've seen vague references to using the GPU to do >>>>timings. >>>> >>>>I'd like to measure frequencies and timestamp some edges, in the 1 us >>>>sort of domain, several channels. I guess we could hang a small FPGA >>>>off to the side if pi can't do it. >>>> >>>>Do pi's have crystal oscillators? >>> >>>dunno, did not see any crystal.. >>> >>>> I guess we could add one too. >>> >>>In this project I use an old raspberry as signal generator. >>> http://panteltje.com/panteltje/newsflex/download.html#freq_pi >>> >>>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! >>> >> >>It's been cold and foggy here. Mo looks cute in a parka. >> >>It's 52F here right now. The heater is running. > >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. > >
It's been raining anchovies here.
tirsdag den 19. juli 2022 kl. 17.04.13 UTC+2 skrev jla...@highlandsniptechnology.com:
> On Tue, 19 Jul 2022 09:10:41 -0400, Phil Hobbs > <pcdhSpamM...@electrooptical.net> wrote: > > >jla...@highlandsniptechnology.com wrote: > >> On Mon, 18 Jul 2022 14:05:27 -0700 (PDT), John Walliker > >> <jrwal...@gmail.com> wrote: > >> > >>> On Monday, 18 July 2022 at 21:30:01 UTC+1, lang...@fonz.dk wrote: > >>>> mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don: > >>>>> Lasse Langwadt Christensen wrote: > >>>>>> John Larkin: > >>>>>>> The pi doesn't seem to have any general counter/timer hardware, like > >>>>>>> ARMs usually do. I've seen vague references to using the GPU to do > >>>>>>> timings. > >>>>>>> > >>>>>> > >>>>>> which version of pi? > >>>>>> > >>>>>>> I'd like to measure frequencies and timestamp some edges, in the 1 us > >>>>>>> sort of domain, several channels. I guess we could hang a small FPGA > >>>>>>> off to the side if pi can't do it. > >>>>>> > >>>>>> using a pi I assume you'll be running some kind of linux I don't see how you > >>>>>> could do 1us timing in linux > >>>>> My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns > >>>>> resolution for my iic interface. > >>>> sure as long as your code is running and not interrupted you can busy wait with > >>>> nanosec resolution up to few ms > >>>> > >>>> try reacting on a signal to measure it's frequency or timestamp it .... > >>> > >>> The RasPi 4 is a very nice machine. The CM4 even more so if only you could buy one > >>> at the moment. The CM4 has a PCI-e interface which gives lots of possibilities. > >>> The Beaglebone Black is also good, but it has less RAM than > >>> the Raspi 4 and only has a 100Mbit/s ethernet port whereas the PI 4 has 1Gbit/s. > >>> The extra processors do allow time critical software to be written though. > >>> > >>> There are add-on modules with real time clock chips for the Pi and the BBB. > >>> > >>> Alternatively, look at the RasPi pico board or the RP2040 microcontroller which it > >>> uses. Both of these have the big advantage that they can be bought in large quantities > >>> at the moment. The RP2040 has multiple programmable state machines which > >>> allow very complex i/o operations with precise timing. There are also multiple > >>> counter-timer modules. It is a two-core ARM M0+. > >>> Finally, don't forget the XMOS devices, many of which support USB and/or ethernet > >>> together with deterministic timing and multiple cores. > >>> John > >> > >> 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. > >> > > > >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) > 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.
if USB will do almost any MCU with USB will do https://www.digikey.dk/da/products/detail/raspberry-pi/SC0914-13/14306010 https://www.digikey.dk/da/products/detail/winbond-electronics/W25Q16JVSNIQ/6193768 plenty in stock or if feeling lazy, https://www.waveshare.com/product/raspberry-pi-pico.htm?sku=19310
On Tuesday, 19 July 2022 at 17:08:53 UTC+1, lang...@fonz.dk wrote:
> tirsdag den 19. juli 2022 kl. 17.04.13 UTC+2 skrev jla...@highlandsniptechnology.com: > > On Tue, 19 Jul 2022 09:10:41 -0400, Phil Hobbs > > <pcdhSpamM...@electrooptical.net> wrote: > > > > >jla...@highlandsniptechnology.com wrote: > > >> On Mon, 18 Jul 2022 14:05:27 -0700 (PDT), John Walliker > > >> <jrwal...@gmail.com> wrote: > > >> > > >>> On Monday, 18 July 2022 at 21:30:01 UTC+1, lang...@fonz.dk wrote: > > >>>> mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don: > > >>>>> Lasse Langwadt Christensen wrote: > > >>>>>> John Larkin: > > >>>>>>> The pi doesn't seem to have any general counter/timer hardware, like > > >>>>>>> ARMs usually do. I've seen vague references to using the GPU to do > > >>>>>>> timings. > > >>>>>>> > > >>>>>> > > >>>>>> which version of pi? > > >>>>>> > > >>>>>>> I'd like to measure frequencies and timestamp some edges, in the 1 us > > >>>>>>> sort of domain, several channels. I guess we could hang a small FPGA > > >>>>>>> off to the side if pi can't do it. > > >>>>>> > > >>>>>> using a pi I assume you'll be running some kind of linux I don't see how you > > >>>>>> could do 1us timing in linux > > >>>>> My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns > > >>>>> resolution for my iic interface. > > >>>> sure as long as your code is running and not interrupted you can busy wait with > > >>>> nanosec resolution up to few ms > > >>>> > > >>>> try reacting on a signal to measure it's frequency or timestamp it .... > > >>> > > >>> The RasPi 4 is a very nice machine. The CM4 even more so if only you could buy one > > >>> at the moment. The CM4 has a PCI-e interface which gives lots of possibilities. > > >>> The Beaglebone Black is also good, but it has less RAM than > > >>> the Raspi 4 and only has a 100Mbit/s ethernet port whereas the PI 4 has 1Gbit/s. > > >>> The extra processors do allow time critical software to be written though. > > >>> > > >>> There are add-on modules with real time clock chips for the Pi and the BBB. > > >>> > > >>> Alternatively, look at the RasPi pico board or the RP2040 microcontroller which it > > >>> uses. Both of these have the big advantage that they can be bought in large quantities > > >>> at the moment. The RP2040 has multiple programmable state machines which > > >>> allow very complex i/o operations with precise timing. There are also multiple > > >>> counter-timer modules. It is a two-core ARM M0+. > > >>> Finally, don't forget the XMOS devices, many of which support USB and/or ethernet > > >>> together with deterministic timing and multiple cores. > > >>> John > > >> > > >> 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. > > >> > > > > > >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) > > 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. > if USB will do almost any MCU with USB will do > > https://www.digikey.dk/da/products/detail/raspberry-pi/SC0914-13/14306010 > https://www.digikey.dk/da/products/detail/winbond-electronics/W25Q16JVSNIQ/6193768 > > plenty in stock > > or if feeling lazy, https://www.waveshare.com/product/raspberry-pi-pico.htm?sku=19310
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
On Tue, 19 Jul 2022 10:50:49 -0700 (PDT), John Walliker
<jrwalliker@gmail.com> wrote:

>On Tuesday, 19 July 2022 at 17:08:53 UTC+1, lang...@fonz.dk wrote: >> tirsdag den 19. juli 2022 kl. 17.04.13 UTC+2 skrev jla...@highlandsniptechnology.com: >> > On Tue, 19 Jul 2022 09:10:41 -0400, Phil Hobbs >> > <pcdhSpamM...@electrooptical.net> wrote: >> > >> > >jla...@highlandsniptechnology.com wrote: >> > >> On Mon, 18 Jul 2022 14:05:27 -0700 (PDT), John Walliker >> > >> <jrwal...@gmail.com> wrote: >> > >> >> > >>> On Monday, 18 July 2022 at 21:30:01 UTC+1, lang...@fonz.dk wrote: >> > >>>> mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don: >> > >>>>> Lasse Langwadt Christensen wrote: >> > >>>>>> John Larkin: >> > >>>>>>> The pi doesn't seem to have any general counter/timer hardware, like >> > >>>>>>> ARMs usually do. I've seen vague references to using the GPU to do >> > >>>>>>> timings. >> > >>>>>>> >> > >>>>>> >> > >>>>>> which version of pi? >> > >>>>>> >> > >>>>>>> I'd like to measure frequencies and timestamp some edges, in the 1 us >> > >>>>>>> sort of domain, several channels. I guess we could hang a small FPGA >> > >>>>>>> off to the side if pi can't do it. >> > >>>>>> >> > >>>>>> using a pi I assume you'll be running some kind of linux I don't see how you >> > >>>>>> could do 1us timing in linux >> > >>>>> My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns >> > >>>>> resolution for my iic interface. >> > >>>> sure as long as your code is running and not interrupted you can busy wait with >> > >>>> nanosec resolution up to few ms >> > >>>> >> > >>>> try reacting on a signal to measure it's frequency or timestamp it .... >> > >>> >> > >>> The RasPi 4 is a very nice machine. The CM4 even more so if only you could buy one >> > >>> at the moment. The CM4 has a PCI-e interface which gives lots of possibilities. >> > >>> The Beaglebone Black is also good, but it has less RAM than >> > >>> the Raspi 4 and only has a 100Mbit/s ethernet port whereas the PI 4 has 1Gbit/s. >> > >>> The extra processors do allow time critical software to be written though. >> > >>> >> > >>> There are add-on modules with real time clock chips for the Pi and the BBB. >> > >>> >> > >>> Alternatively, look at the RasPi pico board or the RP2040 microcontroller which it >> > >>> uses. Both of these have the big advantage that they can be bought in large quantities >> > >>> at the moment. The RP2040 has multiple programmable state machines which >> > >>> allow very complex i/o operations with precise timing. There are also multiple >> > >>> counter-timer modules. It is a two-core ARM M0+. >> > >>> Finally, don't forget the XMOS devices, many of which support USB and/or ethernet >> > >>> together with deterministic timing and multiple cores. >> > >>> John >> > >> >> > >> 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. >> > >> >> > > >> > >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) >> > 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. >> if USB will do almost any MCU with USB will do >> >> https://www.digikey.dk/da/products/detail/raspberry-pi/SC0914-13/14306010 >> https://www.digikey.dk/da/products/detail/winbond-electronics/W25Q16JVSNIQ/6193768 >> >> plenty in stock >> >> or if feeling lazy, https://www.waveshare.com/product/raspberry-pi-pico.htm?sku=19310 > >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
Pico doesn't have ethernet. I'd like that.
On Tuesday, 19 July 2022 at 21:29:11 UTC+1, John Larkin wrote:
> On Tue, 19 Jul 2022 10:50:49 -0700 (PDT), John Walliker > <jrwal...@gmail.com> wrote: > > >On Tuesday, 19 July 2022 at 17:08:53 UTC+1, lang...@fonz.dk wrote: > >> tirsdag den 19. juli 2022 kl. 17.04.13 UTC+2 skrev jla...@highlandsniptechnology.com: > >> > On Tue, 19 Jul 2022 09:10:41 -0400, Phil Hobbs > >> > <pcdhSpamM...@electrooptical.net> wrote: > >> > > >> > >jla...@highlandsniptechnology.com wrote: > >> > >> On Mon, 18 Jul 2022 14:05:27 -0700 (PDT), John Walliker > >> > >> <jrwal...@gmail.com> wrote: > >> > >> > >> > >>> On Monday, 18 July 2022 at 21:30:01 UTC+1, lang...@fonz.dk wrote: > >> > >>>> mandag den 18. juli 2022 kl. 22.18.25 UTC+2 skrev Don: > >> > >>>>> Lasse Langwadt Christensen wrote: > >> > >>>>>> John Larkin: > >> > >>>>>>> The pi doesn't seem to have any general counter/timer hardware, like > >> > >>>>>>> ARMs usually do. I've seen vague references to using the GPU to do > >> > >>>>>>> timings. > >> > >>>>>>> > >> > >>>>>> > >> > >>>>>> which version of pi? > >> > >>>>>> > >> > >>>>>>> I'd like to measure frequencies and timestamp some edges, in the 1 us > >> > >>>>>>> sort of domain, several channels. I guess we could hang a small FPGA > >> > >>>>>>> off to the side if pi can't do it. > >> > >>>>>> > >> > >>>>>> using a pi I assume you'll be running some kind of linux I don't see how you > >> > >>>>>> could do 1us timing in linux > >> > >>>>> My RPi2B is loaded with BSD 14 and its nanosleep() function provides 1ns > >> > >>>>> resolution for my iic interface. > >> > >>>> sure as long as your code is running and not interrupted you can busy wait with > >> > >>>> nanosec resolution up to few ms > >> > >>>> > >> > >>>> try reacting on a signal to measure it's frequency or timestamp it .... > >> > >>> > >> > >>> The RasPi 4 is a very nice machine. The CM4 even more so if only you could buy one > >> > >>> at the moment. The CM4 has a PCI-e interface which gives lots of possibilities. > >> > >>> The Beaglebone Black is also good, but it has less RAM than > >> > >>> the Raspi 4 and only has a 100Mbit/s ethernet port whereas the PI 4 has 1Gbit/s. > >> > >>> The extra processors do allow time critical software to be written though. > >> > >>> > >> > >>> There are add-on modules with real time clock chips for the Pi and the BBB. > >> > >>> > >> > >>> Alternatively, look at the RasPi pico board or the RP2040 microcontroller which it > >> > >>> uses. Both of these have the big advantage that they can be bought in large quantities > >> > >>> at the moment. The RP2040 has multiple programmable state machines which > >> > >>> allow very complex i/o operations with precise timing. There are also multiple > >> > >>> counter-timer modules. It is a two-core ARM M0+. > >> > >>> Finally, don't forget the XMOS devices, many of which support USB and/or ethernet > >> > >>> together with deterministic timing and multiple cores. > >> > >>> John > >> > >> > >> > >> 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. > >> > >> > >> > > > >> > >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) > >> > 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. > >> if USB will do almost any MCU with USB will do > >> > >> https://www.digikey.dk/da/products/detail/raspberry-pi/SC0914-13/14306010 > >> https://www.digikey.dk/da/products/detail/winbond-electronics/W25Q16JVSNIQ/6193768 > >> > >> plenty in stock > >> > >> or if feeling lazy, https://www.waveshare.com/product/raspberry-pi-pico.htm?sku=19310 > > > >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 > Pico doesn't have ethernet. I'd like that.
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. https://www.raspberrypi.com/news/how-to-add-ethernet-to-raspberry-pi-pico/ John