4 ms·
Rpi-logic-analyzer: a simple stand-alone logic analyzer
- userbinator 11y agoJust about any computer with input pins can be turned into an LA, so not surprising that this happened to an RPi. For practical use, however, the sampling frequency is far too low and it really needs a triggering option. If you really wanted to use an RPi as an LA, then I think plugging in one of the cheap FX2LP-based LAs and running Sigrok (http://sigrok.org/wiki/Embedded http://sigrok.org/wiki/Embedded ) on it would give you far better capabilities.
- vvanders 11y agoYup, it's actually really common to see sound cards used a o-scopes with just a tiny bit of input leveling. Sadly the sampling frequency is pretty low and lack of triggers make it not very applicable. This domain is really where CPLDs and FPGAs shine.
- go1979 11y agoNaive question ... is the key difference between the Arduino,RPi,etc. and your vanilla laptop or PC with respect to physical computing that the first class of devices has a ADC and pins for hooking up sensors? Does that first class of devices have a name?
- zokier 11y agoI'd say the difference between Arduino and RPi is far greater than the difference between RPi and vanilla PC. RPi is very much just a computer with couple GPIO (general purpose input/output) pins exposed. RPi runs pretty much the same Linux as your PC would. Indeed RPi originally was designed to allow school pupils to have cheap access to Ubuntu and LibreOffice and whatnot, the maker community thing was kinda just a sideproduct of that. This class of devices are commonly called single-board computers. Arduino on the other hand is designed to run your code on bare metal and typically does not involve operating system of any sort. That means that you got very direct access to the HW, and also that you generally have fairly solid hard realtime guarantees. Arduinos also have orders of magnitude less resources (memory/compute/storage) available than RPi but also consume order(s?) of magnitude less power. I'd call this class devboards. One relatively important distinction between the two is that RPi class devices can be considered self-hosting in the sense that you can program the devices on the device itself without another computer, whereas Arduino development generally always requires a host computer that programs ("flashes") the device.
- paulannesley 11y ago> between the Arduino,RPi,etc. and your vanilla laptop or PC RPi is closer to a vanilla laptop/PC than it is to an Arduino. Arduino describes an ecosystem of microcontrollers, traditionally 8-bit AVR and more recently 32-bit ARM. Microcontrollers are designed specifically (physically, instruction set, cost) to control low-level digital and analog IO, and not to run a general Operating System. Raspberry Pi etc are general purpose computers. They only differ from your general laptop etc in form factor, and that they're built around a System on a Chip (SoC) rather than discrete CPU and peripherals. In that regard it's much like your cell phone, tablet, Chromebook and other budget laptop/desktop computers. But general computers are moving in that direction too — on-chip graphics, ethernet etc. Because RPi targets education and hobbyists, its form factor exposes some general purpose IO (GPIO) pins, much like a general computer parallel port might. As far as I know, Raspberry Pi doesn't have ADC on-board, but you can wire an external one into its digital GPIO/SPI pins. You could also plug a USB or serial port ADC into your laptop, or your RPi. With regard to “physical computing”, there's generally a real-time requirement, which cannot be achieved with a multi-tasking OS. Microcontrollers generally run at less then 100 MHz (often 8 or 16 MHz), but because of their instruction set design, timer and interrupt systems, and lack of multitasking, they can reliably and rapidly sample inputs or trigger outputs. A 48 MHz microcontroller could perhaps come close to 1 MHz sample rate. SoC devices and general purpose computers are designed to run a multi-tasking OS at GHz speed with heaps of RAM. But despite that, this example shows an inability to reliably control I/O at more than 100 KHz when running a general (multitasking) OS. IO tasks that do require real-time characteristics (USB, ethernet, etc) are delegated to separate controller chips. It's possible to write “bare-metal” code to run directly on a Raspberry Pi (or any computer) without an operating system which brings it closer to behaving like a microcontroller, but the instruction set isn't optimized for this, nor are the compilers/toolchains, and nor is the I/O and on-chip peripherals of the SoC. Hope that meandering ramble helps.
- makomk 11y agoI'm not sure how well those would work on the Pi; they really want a good, reliable, high-throughput USB controller and the one in the Pi definitely isn't that.
- zokier 11y agoFor bit more serious performance, check out BeagleLogic which provides 12 channels at 100MSPS on BeagleBone Black. * Presentation: https://www.youtube.com/watch?v=CDbEAq33vdA https://www.youtube.com/watch?v=CDbEAq33vdA * GitHub: https://github.com/abhishek-kakkar/BeagleLogic https://github.com/abhishek-kakkar/BeagleLogic
- mmastrac 11y agoWow. That's in the ballpark of the DS1045Z I just bought. What an impressive technical achievement.
- deutronium 11y agoThe scope you've got actually has an ADC which samples at 1G Sa/s :) rather than 100M Sa/s
- mmastrac 11y agoYeah, it's in the ballpark -- not the same as it, but not really that far off either.