Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:19 14 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Audio Oscilloscope using CMM2 ADC.

Author Message
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1955
Posted: 04:20am 01 Aug 2020
Copy link to clipboard 
Print this post

I've added a simple Waveform Generator to the CRO using the onboard PWM and DAC.
Just makes it easy to quickly setup some simple wave forms.

For displaying alternating waveforms from the DAC or other source, simply connect two 18k resistors to the input pin 7, one resistor connects to ground, the other connects to 3.3v, couple the input with a capacitor, value depends on input frequency but really for the purpose of playing around, anything from 100nf to 10uf would do.

NOTE: Observe the 3.3v input limit on the analogue inputs.

AudioCRO.ZIP  


Edited 2020-08-01 14:22 by KeepIS
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 734
Posted: 02:30pm 01 Aug 2020
Copy link to clipboard 
Print this post

Is there avantage to PWM over PLAY SOUND ?
my site
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1955
Posted: 10:54pm 01 Aug 2020
Copy link to clipboard 
Print this post

PWM is exactly that, pulse width modulation, a series of pulses at X frequency and of varying duty cycle as a % of the whole. Play sound uses the DAC and has implemented code to produce 5 basic waveforms. Other complex waveforms can be created using the sound DAC. The focus of this Audio CRO was on using the standard CMM2 functions and procedures. Play Sound is limited to 20KHz where as the PWM interface is up to 24MHz.

.
Edited 2020-08-02 08:55 by KeepIS
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 734
Posted: 01:45am 02 Aug 2020
Copy link to clipboard 
Print this post

I would like to do a crude
' real time ' oscilloscope
using my ( still in the mail )
CMM2 .... Is that anywhere near
realizable using an ADC pin ?  
Seems perhaps I would need an
external ' flash ' ADC ?
50 kHz would be enough BW .
Thank You ...
my site
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1955
Posted: 02:41am 02 Aug 2020
Copy link to clipboard 
Print this post

The requirements of a ADC with respect "accurate" waveform capture with increasing frequency is for another thread, however in simple terms, the ADC in the CMM2 will display a 50kHZ waveform, FFT transformation of the sample will show the correct frequency past 100kHZ. How you process and visualize the sample data is up to you.
Edited 2020-08-02 13:18 by KeepIS
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 734
Posted: 03:49am 02 Aug 2020
Copy link to clipboard 
Print this post

  KeepIS said  ADC in the CMM2 will display a 50kHZ waveform,

Please forgive my ignorance .
O.K.....It will display 50 kHz
BUT
Can it capture the waveform ( more or less )
realtime . I . E ..... Emulate the below  
( but 8 bits )
LEDS replaced by pixels ..
my site
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1955
Posted: 05:13am 02 Aug 2020
Copy link to clipboard 
Print this post

You are better of starting a separate thread on this as this will only confuse any new users wanting to just play with the CMM2 and the existing hardware.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1955
Posted: 09:16am 02 Aug 2020
Copy link to clipboard 
Print this post

  hitsware2 said  
Please forgive my ignorance .
Can it capture the waveform ( more or less )
realtime


Just to answer that last question, YES it can capture in real time.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 734
Posted: 03:19pm 02 Aug 2020
Copy link to clipboard 
Print this post

  KeepIS said  
  hitsware2 said  
Please forgive my ignorance .
Can it capture the waveform ( more or less )
realtime


Just to answer that last question, YES it can capture in real time.

Thank You !
So something like : ( way simplified )

DO
CLS
FOR x = 0 TO 255
y = READ ADC
PIXEL x , y
NEXT x
LOOP

Should work ?
my site
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025