Oscilloscope | Oscilloscope for Mac/Windows written in OF | Graphics library
kandi X-RAY | Oscilloscope Summary
kandi X-RAY | Oscilloscope Summary
A software oscilloscope attempting to mimic the aesthetic of old school ray oscilloscopes.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Oscilloscope
Oscilloscope Key Features
Oscilloscope Examples and Code Snippets
Community Discussions
Trending Discussions on Oscilloscope
QUESTION
I've been trying to process speech on a stm32f407ve development board for some time now, which makes me wonder if the ADC is really set up to precisely sample the values. CMSIS FFT Functions. But when I try to couple it with the ADC in continuous conversion to sample a sine signal, it doesn't seem to sample well periodically. I put a sine signal into it from a frequency test of a 1khz sine wave from an internet video with a plug that I take out of some headphones, which by the way I already tested that it works correctly with an oscilloscope. So... this one from the development board is obviously not from a DSP but its ADC should work correctly for this type of application? Here is my code, obviously I made sure that the test was emitting voltage before the debug.
...ANSWER
Answered 2022-Mar-20 at 08:40You are just calling the function to take a single reading over and over in a loop. There is no reason to think that each pass through this loop will take the same amount of time. You need to set the ADC to be triggered from a timer in order to have some kind of reproducible sample rate.
In general the internal ADC is not of suitable quality for audio use. There is an external audio codec fitted to this board, look at the example projects in the Stm32CubeF4 package.
QUESTION
I am trying to use scipy.fft to see the noise in my data. The raw data is a electrical signal dataset which collect by oscilloscope.
The primary frequency is 60MHz, The total is 250000 data points(rows) which is 2 sec(in reality). The noise should be all over the place.
The problem is that when I plot it, the xf and yf can't aligned.
ValueError: x and y must have same first dimension, but have shapes (270000000,) and (250000,)
I copied the code from: https://docs.scipy.org/doc/scipy/tutorial/fft.html
It doesn't work well for my dataset, but I am not sure why this happened. My dataset is here: https://drive.google.com/file/d/19HFOIZyfI0rOy2_G-csqtCs7He27LhLg/view?usp=sharing
...ANSWER
Answered 2022-Mar-16 at 04:49Your SAMPLE_RATE is incorrect.
If 250,000 rows amount to 2s, your SAMPLE_RATE should be 125kHz, yet you specify SAMPLE_RATE = 180000000
.
Correcting the SAMPLE_RATE yields the following plot:
QUESTION
There are questions that deal with this issue in:
Read CSV into a dataFrame with varying row lengths using Pandas
How to read a no header csv with variable length csv using pandas
However changes to Pandas seem to be deprecating those solutions. If I run this:
...ANSWER
Answered 2022-Mar-13 at 06:37QUESTION
I am trying to program an AVR ATTiny13A using a USBasp adapter (guloprog) and avrdude. Uploading the program and running it works fine the first time for a fresh ATTiny13A device, but re-uploading again fails. avrdude cannot see/access the device at all. avrdude behaves like the device is not connected.
...ANSWER
Answered 2022-Mar-06 at 19:19How to unbrick the AVR with a very slow clock divider setting
The problem is caused by writing CLKPR with a very slow clock divider setting (/128 or /256 with the 128kHz clock) in the program. After the program started, programming no longer works (regardless of the -B
setting for avrdude).
Solution without HVSP (with pull-down resistor): Put a pull-down resistor between RESET and GND (10k worked for me). Now you can access the AVR again and program a different program, setting the clock divider to at most /64.
The pull-down resistor will keep the AVR in reset after power-up, not allowing the program to run, preventing the slow clock to be set. In order to run the new program you need to remove the pull-down resistor.
Alternative solution with HVSP
If you have a HVSP you can reset the CKSEL to 10 again to use the 9.6 MHz internal clock (and potentially set CKDIV8 to 0 again). This will allow you to access the device again.
Background
avrdude limits the slowest communication speed to a minimum of 500 Hz. This is hardcoded in the source, see https://github.com/avrdudes/avrdude/blob/5cbc9c37fc71c424e99bdcc00bb910fd581c2676/src/usbasp.c#L903
The device must be clocked at least four times faster than this speed. For 500 Hz communication speed this means that the AVR must run at 2000 Hz or higher. This means that the slowest clock-divider setting with the 128kHz clock which is compatible with avrdude is 128kHz/64 = 2000Hz (and this is already on the edge and may fail, but it worked well for me). To get the slowest avrdude communication speed (500 Hz) use the -B 2000
option, e.g.:
QUESTION
I have two signals from an oscilloscope. Each of them has 1000 points with a 1ns step. I need to see the difference between signals. But the signals are shifted by 0.31ns. I can create two plots with aligned signals with the command
...ANSWER
Answered 2022-Feb-23 at 01:19Use the interp1
function:
QUESTION
I want to implement a simple "GPT" timer that generates an interrupt every 1ms. However, I get an interrupt exactly every 3ms (instead of the desired 1ms).
Where is my error? What values should I set to get a 1ms timer?
Here is my calculation for the GPT timer:
EXPLANATION OF TIMER VALUES:
We take for source clock the PLL1 DIV2 400MHz We define the root divisor at 4 => 400MHz / 4 = 100MHz
100MHz = one increment every 10ns We want an interrupt to be generated every 1 ms
So we have : Output_compare_value = delay_time x GPT_frequency
Output_compare_value = 1 x 10^-3 x (1/(10 x 10^-9)) = 100000
Here is my code (I change the state of a GPIO at each interrupt to check the operation of my timer on the oscilloscope):
...ANSWER
Answered 2022-Feb-01 at 10:18I found out what my problem was with the timer. The truth is that all my values were fine, but it was the execution of the logging that was taking time (line PRINTF("GPT interrupt is occurred !");
) So I could have lowered my reload value even more, but I would still have the logging that was taking time to run.
QUESTION
So I'm doing a simple oscilloscope in C. It reads audio data from the output buffer (and drops buffer write counter when called so the buffer is refreshed). I tried making simple zero-cross triggering since most of the time users will see simple (sine, pulse, saw, triangle) waves but the best result I got with the code below is a wave that jumps back and forth for half of its cycle. What is wrong?
Signal that is fed in goes from -32768 to 32767 so zero is where it should be.
If you didn't understand what I meant you can see the video: click
Upd: Removed the code unrelated to triggering so all function may be understood easier.
...ANSWER
Answered 2022-Jan-26 at 14:39During debugging, I simplified the code until it started working. Thanks Clifford.
I found a trigger index i
(let's say it is array index 300). Modified it so that the oscilloscope was drawing lines from [(2 * i) + offset]
to [(2 * i + 1) + offset]
, thus an incorrect picture was formed.
I used (2 * i)
, because I wanted long waves to fit into oscilloscope. I replaced it with drawing from [i + offset]
to [i + 1 + offset]
and that solved a problem.
Afterwards, I implemented "horizontal scale 0.5x
properly.
The output waveform still jumps a little, but overall it holds it in place.
QUESTION
maybe you can give me a hand, I've been looking for all information, in order to solve this problem of mine, but nothing, I can't use the player with cordova ...
in practice I can't load mp3 files, whether they are both locally and remotely, I always get this error: "Error: buffer is either not set or not loaded", the files in the path are there.
I tried using Tone's oscilloscope to see if I was having trouble loading Tone, but this works fine.
Could it depend on some authorization, particular that I might be missing ?.
For example using cordova media plugin I can reproduce the audio, but I need to use Tonejs.
Do you have any ideas, what this might depend on. or what could I try to do? ...
even this simple example, after the device ready does not go:
...ANSWER
Answered 2022-Jan-15 at 18:49I posted an answer, here, which also solves this problem.
I don't know if the solution is the only possible way, or the best, in order to access the folders locally, I made these changes to the call. Using an XMLHttpRequest object which can be used, to request data from a web server, I got a Blob object, which I then passed to the Tone player.
QUESTION
I have been trying to get SPI master transmit to work using DMA and STM32 LL drivers, on STM32G030C8.
I did get the SPI to work with LL drivers without DMA, so I believe that at least my wiring is correct.
What I have done:
Set SPI to use DMA in cubeMX by setting
SPI1_TX
Request to DMA1 channel 1Setup the transmit in code:
main.c
...ANSWER
Answered 2022-Jan-02 at 21:13After some time debugging I found there is a bug in STM32cubeMX code generator. (this also seems to be already reported (https://community.st.com/s/question/0D53W00001HJ3EhSAL/wrong-initialization-sequence-with-cubemx-in-cubeide-when-using-i2s-with-dma?t=1641156995520&searchQuery)
when selecting SPI and DMA, the generator first initializes SPI and then DMA with
QUESTION
I am trying to convert an ADC bipolar differential signal in C++. The device I am using is a 12 bit MAX11613 (datasheet) and the microcontroller is a Raspberry PI 3B+. So far I am able to capture values, however the results are not the differential result of AIN0 and AIN1 I would expect.
The device is a 3.3V supply and the input on AIN0 is 0-3.3V. The input on AIN1 is the virtual ground of the incoming signal at 1.65V.
The bipolar transfer function of the device shown below may be my source of confusion. Why is it that a value just under the midrange of 1.65V would produce a value of 0b111111111111 and not 0b100000000001? And if that is actually correct, how does one adjust for that to reflect an actual negative voltage compared to the virtual ground input (AIN1)?
For what it's worth, here's my code:
max11613.h
...ANSWER
Answered 2021-Dec-07 at 22:29Updated original code with final working detail.
I used the pigpio library to control the read and write to the chip. Setup function runs first to complete chip setup and configuration, then reads are called as needed.
Many, MANY thanks to alagner for assistance reviewing code and troubleshooting!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Oscilloscope
Download and unzip Openframeworks 0.10.1
Open the folder apps/myApps/ (in the OpenFrameworks folder)
Clone the repository with submodules: git clone --recursive https://github.com/kritzikratzi/Oscilloscope.git
Download the binary release for ofxAvCodec from [https://github.com/kritzikratzi/ofxAvCodec/releases/tag/0.2](https://github.com/kritzikratzi/ofxAvCodec/releases/tag/0.2)
Replace the addons/ofxAvCodec/libs with the libs folder from the download
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page