Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:33 28 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 : PicoMite V6.01.00 release candidates

     Page 13 of 18    
Author Message
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2842
Posted: 09:44pm 13 Nov 2025
Copy link to clipboard 
Print this post

While tinkering with Frank's Christmas Bells project I thought a useful addition to MMBasic might be a Port version of the ADC command. That is, reading a Port instead of an analogue input.

For Frank's project speed wasn't an issue but for faster data the Do: Loop routine I used would be too slow.

Is this feasible and if so is it worthwhile?
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4158
Posted: 07:29am 14 Nov 2025
Copy link to clipboard 
Print this post

  phil99 said  a useful addition to MMBasic might be a Port version of the ADC command. That is, reading a Port instead of an analogue input.

In what way(s) would it differ from the existing Port command & function?

John
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5485
Posted: 07:46am 14 Nov 2025
Copy link to clipboard 
Print this post

Hi phill,

It may be already there, did you take a look at:
ADC OPEN freq,n
ADC START sh*tload_of_arrays


Volhout
PicomiteVGA PETSCII ROBOTS
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2842
Posted: 07:47am 14 Nov 2025
Copy link to clipboard 
Print this post

  Quote  In what way(s) would it differ from the existing Port command & function?
Sampling rate. My test with a For / Next loop fluctuated around 60 -70 µS/sample.
ADC can sample down to about 2 µS/sample with reliable timing.

Edit.
ADC Open, n can read 4 channels' but if you want to read a 8 bit bus...
It also uses a lot more memory with at least 8 bits per channel versus 1.
Edited 2025-11-14 17:54 by phil99
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2960
Posted: 08:01am 14 Nov 2025
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Any hope for an RP2340A version for ILI9488 480x320?

Already there, it is only the WebMites where I haven't enabled it


@Peter,

This is an awesome addition!
Without having a PicoMite nearby to try it right now, can you confirm it will work with SPI screens too!
If so, then is the turtle’s area/screen-size determined by mm.hres and mm.vres OR is it limited to something else ie 320x240 ?

Thanks….
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5485
Posted: 08:30am 14 Nov 2025
Copy link to clipboard 
Print this post

@phill,

Sorry, I mis-read your message. You where asking about reading a PORT in a faster automatic sequence. Not the reverse.

I can only offer PIO. The logic analyzer uses it, but that may be far to complex to be used as a basis for the bells. But the terminal version might be an option, since it contains only the basics. It is published in the PicoMite user manual, appendix F, sample program #3.

Volhout
Edited 2025-11-14 18:36 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8320
Posted: 09:28am 14 Nov 2025
Copy link to clipboard 
Print this post

Bear in mind that the Pico only has one ADC on the chip. The inputs to it are multiplexed. It's impossible to read all the ADC inputs simultaneously as each read takes a finite time.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2842
Posted: 10:32am 14 Nov 2025
Copy link to clipboard 
Print this post

  Quote  PicoMite user manual, appendix F, sample program #3.
Thanks for that.
That certainly could be adapted to read a parallel bus.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3487
Posted: 01:18pm 14 Nov 2025
Copy link to clipboard 
Print this post

  WhiteWizzard said  Without having a PicoMite nearby to try it right now, can you confirm it will work with SPI screens too!


It worked for me with a 480x320 ILI9488 SPI LCD. All tests ran. I think only two showed results which might be considered anomalous, where plot points outside the screen resolution plotted at the maximum x or y.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 721
Posted: 01:33pm 14 Nov 2025
Copy link to clipboard 
Print this post

Hi Peter,

new bug / problem with your latest updated RC12:

you fixed IR (now works!) but:

play mp3 "name_of_file"

does crash the whole picoMiteHDMI (tested version)... my option list is the same
as the picture in my above post with the IR bug. I can remember a few iteration ago there was also this play mp3 problem, but you fixed it, now the problem is back.

Greetings
Daniel
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8320
Posted: 09:26am 15 Nov 2025
Copy link to clipboard 
Print this post

Version 6.00.03

Print MM.Info(exists "a:/profiles.txt")
is giving me a syntax error. The file exists as MM.Info(filesize ...) works.

Not tested on a beta or rc as I want a (more or less) stable version for my hotplate temperature controller. :)

.
Edited 2025-11-15 19:28 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10653
Posted: 10:13am 15 Nov 2025
Copy link to clipboard 
Print this post

  Quote  Print MM.Info(exists "a:/profiles.txt")
is giving me a syntax error.

That's what happens if you invent syntax   manual page 85
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4328
Posted: 11:33am 15 Nov 2025
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Print MM.Info(exists "a:/profiles.txt")
is giving me a syntax error.

That's what happens if you invent syntax   manual page 85


Oddly enough supported by MMB4L which makes me suspect it was supported by the CMM2 but not the PicoMite.

Still kicking,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4158
Posted: 11:50am 15 Nov 2025
Copy link to clipboard 
Print this post

  Mixtel90 said  Version 6.00.03

Print MM.Info(exists "a:/profiles.txt")

Should it be

Print MM.Info(exists file "a:/profiles.txt")

John
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8320
Posted: 11:57am 15 Nov 2025
Copy link to clipboard 
Print this post

Oh c**p!
:(
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4158
Posted: 01:28pm 15 Nov 2025
Copy link to clipboard 
Print this post

I confess I had to read the manual entry.

We used to say RTFM...

John
Edited 2025-11-15 23:29 by JohnS
 
ville56
Senior Member

Joined: 08/06/2022
Location: Austria
Posts: 295
Posted: 01:41pm 15 Nov 2025
Copy link to clipboard 
Print this post

There seems to be a bug in the turtle graphics ....

If I run the test program form Peter (earlier in this thread) at test # 10 (cursor tests) subtest "different cursor colors" fails with invisible cursor if the test is repeated. The first run after a reset or cpu restart is ok. There is also an artefact left over after the first cursor is painted. My setup is as follows:

PicoMiteHDMI MMBasic USB RP2350B Edition V6.01.00RC12
OPTION SERIAL CONSOLE COM1,GP0,GP1
OPTION FLASH SIZE 16777216
OPTION COLOURCODE ON
OPTION KEYBOARD US
OPTION PICO OFF
OPTION RESOLUTION 640x480 @ 252000KHz
OPTION DISPLAY 30, 53
OPTION HDMI PINS  1, 3, 7, 5
OPTION SDCARD GP22, GP6, GP7, GP4
OPTION AUDIO GP26,GP27', ON PWM CHANNEL 5
OPTION MODBUFF ENABLE  192
OPTION PLATFORM OLIMEX USB

The effect seems to be independent of the mode setting.


Gerald
                                                                 
73 de OE1HGA, Gerald
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10653
Posted: 01:59pm 15 Nov 2025
Copy link to clipboard 
Print this post

  Quote  There seems to be a bug in the turtle graphics ....

Explain the exact running sequence to create the issue. Can't reproduce
Edited 2025-11-16 00:01 by matherp
 
ville56
Senior Member

Joined: 08/06/2022
Location: Austria
Posts: 295
Posted: 02:26pm 15 Nov 2025
Copy link to clipboard 
Print this post

running your test-suite

' ============================================================================
' TURTLE GRAPHICS TEST SUITE FOR MMBASIC
' ============================================================================
'

>run

TURTLE GRAPHICS TEST SUITE
==========================

1.  Basic Movement Tests
2.  Pen Control Tests
3.  Position Tests
4.  Shape Tests (Circles)
5.  Shape Tests (Rectangles)
6.  Arc Tests
7.  Fill Pattern Tests
8.  Polygon Fill Tests
9.  Stack (PUSH/POP) Tests
10. Cursor Tests
11. Complex Drawing Tests
12. Stress Tests
13. Run All Tests
0.  Exit

Select test: 10
==========================================
Cursor Tests
==========================================

Test 1: Toggle cursor visibility
Cursor should be visible
 (Press any key for next test)
Cursor should be hidden
 (Press any key for next test)
Test 2: Cursor following movement
 (Press any key for next test)
Test 3: Different cursor sizes
 (Press any key for next test)
Test 4: Different cursor colors
 (Press any key for next test)

Test 4 is the failing one on the HDMI monitor. Didn't test on SPI display yet.

Gerald
                                                                 
73 de OE1HGA, Gerald
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10653
Posted: 02:31pm 15 Nov 2025
Copy link to clipboard 
Print this post

What do you do after each run? ctrl-c or press 0 or what?
 
     Page 13 of 18    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025