![]() |
Forum Index : Microcontroller and PC projects : PicoMite V5.07.00b0 - beta firmware
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4240 |
Hi Peter, Apologies for not having had an opportunity to check, but did one of the recent betas get the increased number of user functions/subs you suggested might be possible ? Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4240 |
Possibly this should be a separate thread, but presumably if you were so inclined two Pico's could be coupled with one implementing a Console for the other ... but would they need to somehow share ownership of the SPI display ? Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9992 |
Current status is that all function slots are used and there are 2 free command slots. The CMM2 creates more function slots by changing things like MM.ERRNO to mm.info(errno) as it tokenises the program. You don't see this because you are always editing the disk image. I could do the same on the PicoMite but it would really change the user's program (like EXIT DO/EXIT). What is the reason for the question? |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4240 |
Thanks Peter, that wasn't my question - I'm not that brave ![]() I was asking about USER functions/subs, currently 64, when I asked a couple of pages back you suggested there was a possibility of 128/256 ? Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9992 |
I increased it to 256 by decreasing the maximum GOSUB to 64 |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4240 |
Many thanks - wow, MMBasic has GOSUB, how quaint ![]() Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3298 |
Possibly this should be a separate thread, but presumably if you were so inclined two Pico's could be coupled with one implementing a Console for the other ... but would they need to somehow share ownership of the SPI display ? Best wishes, Tom Actually the F4 would be better (and probably less expensive) than two Picos, and has more pins available, and more LCD options, but the Pico makes for such a tidy little package that I had hoped . . . ~ Edited 2021-07-30 22:02 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
Oi! I happen to like GOSUB. It's a reet proper command, not one of these new-fangled things. ;) Useful for converting old programs. Thanks for the update, Peter. The RESTORE <variable> has come in useful in a way that I didn't originally envisage. Now you can pass the label for a DATA block to a sub or function very neatly. Edited 2021-07-30 22:18 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4240 |
Useful for converting old programs. If only the firmware licensing terms allowed forks then we could have an "MMBasic (Northern)" version ... with a line-editor instead of a full-screen editor. Just kidding, I'm "Northern" myself and proud of it. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
@Tom OPTION MODE NORTHERN >e'dit print "Eh up world!" >RUN Tha what? Is't tha jokin'? (sorry, Peter - couldn't resist. :) ) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4811 |
@Peter, Thanks for fixing the ADC ! Volhout PicomiteVGA PETSCII ROBOTS |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4811 |
Small piece of demo code for the ADC and FFT in the pico. In the end this will become a mains power analyzer. Waveforms plot on ILI9341 LCD. Uses the PWM output as a signal generator for the ADC. With a 10k/10n low pass filter in between the square wave will be rounded. ' test ADC burst read and fft ' connect ADC input to PWM output using RC filter to create triangle-ish wave ' PWM = 400Hz ' ADC takes 512 samples for fft, sampling 10 cycles pwm_freq = 400 samples = 511 adc_freq = pwm_freq*samples/10 '10 cycles gain = MM.VRes/(3.3*2) 'waveform gain 'fftgn = MM.VRes/(3.3*samples) 'fft gain in linear mode 'reserve memory Dim array!(samples),fftarr!(samples) 'open PWM(GP18) and ADC(GP26) SetPin GP18,pwm1A SetPin GP26,ain ADC open adc_freq, 1, ready_int 'start PWM PWM 1,pwm_freq,50 ' 50% = square wave Pause 100 'start ADC ADC start array!() Do :Loop End 'when all samples are measured we end up here. Sub ready_int ADC close CLS 'plot input waveform For i=0 To samples-1 'Print Str$(array!(i),2,2), x=i*MM.HRes/samples Line x,gain*array!(i),x+1,gain*array!(i+1),1,RGB(yellow) Next i 'DO FFT Math fft magnitude array!(),fftarr!() 'convert to log For i=0 To samples fftarr!(i)=20*Log(fftarr!(i))/Log(10) Next i fftgn = 2 'gain or displaying the fft in the plot window, roughly 'plot fft waveform For i=0 To samples/2 Print Str$(fftarr!(i),2,2), x=i*2*MM.HRes/samples Line x,240-fftgn*fftarr!(i),x+1,240-fftgn*fftarr!(i+1),1,RGB(red) Next i Print "ready" End End Sub PicomiteVGA PETSCII ROBOTS |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
@ matherp I know I've asked this before... Would it be possible to read GP24? It's only a digital input on the chip (AFAIK) but throws an error. It should read high when VBUS is present. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
Big release today. :) The latest version of the PIO programming package. I think this is pretty functional now, but I should perhaps do more with the state machine registers. I'm considering a separate module to view and set values in them, returning hex values for each register. PIO programming package 010.zip The latest version of the PicoMite TINAM doc. This now includes the PIO doc, which I won't now be supporting as a separate entity unless it's decided to split it away from the manual. PicoMite TINAM doc 0803.zip Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
paceman Guru ![]() Joined: 07/10/2011 Location: AustraliaPosts: 1329 |
I received my first RPi Pico yesterday and loaded it up with Peter's "PicoMiteV5.07.00b9.uf2" firmware as per Mixtel90's TINAM manual on my Win7/64 system. All seemed to load well first time and the LED started doing it's flashing 1s ON/1s OFF thing so I assumed it had loaded properly. I then disconnected the USB cable and a couple of minutes later reconnected it. The flashing then automagically started nicely again so I fired up TeraTerm to use as the console. TeraTerm didn't auto-connect (not a surprise) but when I ran "Device Manager" and checked "Ports" to find the correct COM port to apply to it, no new COM ports had been installed. I think I'm missing something obvious here, like should I install a special 2040 USB driver from somewhere (and at what baud rate), or am I just "doing it all wrong" Greg |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
If the PicoMite LED is flashing then the program is in and running. With it plugged in: Start Tera Term. Go to Setup / Serial port. You should see a Com port listed. Don't do anything to it, just accept it. You should get a blank screen. Press Enter and you should see the ">" prompt. You are in. :) Tera Term *never* connects automatically from switch-on. It does auto-connect after a firmware update though. I'm a little concerned that you are using a Win 7/64 system. I can't verify what's happening as I can't get that setup. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9992 |
Try here |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6210 |
Greg The pico doesn't like enumerating if there is other activity on the USB hub. In my case, I have to put the pico on a separate hub to the CMM2 (or turn the CMM2 off) if I want to see the pico. Jim VK7JH MMedit |
||||
paceman Guru ![]() Joined: 07/10/2011 Location: AustraliaPosts: 1329 |
Peter - thanks for that, looks like there is another driver required with Win7, 8.1 and XP. Also a fair bit of modification of the .inf file too. I'll mull have another go tomorrow. Jim - I don't have anything else running Jim but I tried another physical port on the notebook anyway - no go. Mick - looks like TINAM might need extra explanation for people using Win7, 8.1 and XP. Check out Peter's link. BTW thanks a lot for your work on TINAM, it sure beats wading thru all the Pico development posts each time you're unsure. Greg |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7458 |
If people want info on running the PicoMite with other platforms I'm afraid they are going to have to provide me with tested methods of making it work. It's not something I can do myself now. I no longer have any hardware other than an ageing laptop, 2 low-powered fanless PCs, (all running Win 10) and a couple of RPis. None will be moving to Win 11 as none of them will meet the minimum spec. :) I *might* be able to sort out another laptop, but that'll be reserved for linux if I can. More news on the PIO software front: PREDIT will be on its way soon... The PIO Register Editor. :) At the moment it will edit EXECCTRL, SHIFTCTRL and PINCTRL registers for all four of the shift registers for a PIO and give you the hex values for each. All register fields are on screen at the same time, making it easy to see where you are. I want to add a few bells and whistles yet. At the moment this is a stand-alone program and you have to copy the output values to where you want them. Also attempting to add labels to PASM. At the moment you can put destination labels in and PREVAS will show them in the listing, but you can't use them in instructions. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
![]() ![]() ![]() ![]() |
![]() |