Why pay for a scoppy?
Author | Message | ||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9172 |
Specially for Harm Coming in RC10 I've unlocked the ADC speed and it can now sample up to CPU speed/96 So in the example below on a RP2040 I'm running the CPU at 378MHz and sampling two channels each at 1.96775 MHz to give a total sample rate of over 3.9MHz https://youtu.be/7w7MKo9nofo CLS FRAMEBUFFER create FRAMEBUFFER write f Dim float a(1279),b(1279),aa(639),bb(639),c(639),d(639),e(639) ADC open 1968750,2,done For i=0 To 639:e(i)=i:Next Do ADC start a(),b() Do Loop Until f%=1 f%=0 p%=Math(crossing a(),1.5,-1) Memory copy float Peek(varaddr a(p%)),Peek(varaddr aa(0)),640 Memory copy float Peek(varaddr b(p%)),Peek(varaddr bb(0)),640 Math scale aa(),50,aa() Math scale bb(),50,bb() Math add aa(),50,aa() Math add bb(),250,bb() Line graph e(),c(),0 Line graph e(),d(),0 Line graph e(),aa(),RGB(green) Line graph e(),bb(),RGB(cyan) FRAMEBUFFER copy f,n Math scale aa(),1,c() Math scale bb(),1,d() Loop Sub done f%=1 End Sub |
||||