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 : Nothing essential, deep memory scope with PSRAM
Author | Message | ||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4222 |
Just to demonstrate how usefull PSRAM can be PicoMiteVGA for the RP2350 This is a demo to sample 100000 ADC samples (800kbyte data) stored in PSRAM. The cursor keys let you zoom through the data. Just apply an input signal to GP26. The scope samples at 100kHz, and takes 100k samples, so capturing takes 1 second. The red section in the green bar shows what piece of data is shown. 'screen setup mode 2: cls 'startscreen print "simple scope" print "uses GP26 analog input, and samples at 100kHz" print "to demonstrate PSRAM on RP2350B platform" print "cursor keys zoom and pan the displayed data" print "press any key to start sampling" do : loop while inkey$="" 'pan-zoom pan=0 zoom=1 points=100000 rate=100000 'the data array dim a(points) as float 'the video array dim y(319) as integer 'will be adc samples dim x(319) as integer for i=0 to 319:x(i)=i:next 'coordinates x 'the adc taking samples cls : print "sampling" adc open rate,1 adc start a(),,,,100,200 'and scaling between 100 and 200 pause points/rate*1000 cls : print "done " do 'display part of array using vectors for i=0 to 319: y(i)=a(i*zoom+pan) : next line graph x(),y(),rgb(green) 'display the memory (what data is viewed ) line 0,90,319,90,3,rgb(green) xstart=320*pan/points sze=320*320*zoom/points line xstart,90,xstart+sze,90,3,rgb(red) do k=asc(inkey$) loop while k=0 select case k case 128 zoom=zoom+1 if zoom>20 then zoom=20 cls case 129 zoom=zoom-1 if zoom<1 then zoom=1 cls case 131 pan=pan+zoom*160 if pan>points-zoom*320 then pan=points-zoom*320 cls case 130 pan=pan-zoom*160 if pan <0 then pan=0 cls case 32 save compressed image "scrn.bmp" end select loop Again nothing fancy, only a demo to show deep memory using PSRAM on the PGA2350 or Pico2-plus. You must enable PSRAM using OPTION PSRAM PIN GP47. Theoratically it is possible to use all PSRAM, and store 1 million samples. I did not try that. Volhout Edited 2024-09-17 21:37 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6778 |
Don't use GP26 as an ADC input on the PGA2350. It isn't one. :) They start at GP40. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3800 |
May not be fancy but it is impressive. John |
||||
Print this page |