Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 02:50 27 Nov 2024 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/VGA/Web V5.08.00: back to betas

     Page 3 of 7    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9119
Posted: 02:45pm 03 Dec 2023
Copy link to clipboard 
Print this post

V5.08.08b3

https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

Fixes the couple of bugs identified above and also a bug I'd introduced in audio playback from directories other than root.

There a couple of facilities that I may not have mentioned before

MM.INFO(UPTIME) returns the number of seconds since the Pico was booted as a float
MM.INFO(TRACK) returns the filename that is currently playing on the audio output
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 02:46pm 03 Dec 2023
Copy link to clipboard 
Print this post

I come back to the display waveshare Pico-ResTouch-LCD-3.5
( https://www.thebackshed.com/forum/ViewTopic.php?TID=16248&P=17#213230  ).
Thanks @Peter, the backlight command works again!
And the problem with the GP22 and the SD card is also solved.
The problem has nothing to do with IDC2, even though the Pico W version of the GP22 lacks it. The pin is only used for CS and it works.
BUT only after activating the touch function! This is quite unusual.
So the Pico W alias WebMite works with the Waveshare board mentioned above.
Here is the options list:

> option list
WebMite MMBasic Version 5.08.08b2
OPTION SYSTEM SPI GP10,GP11,GP12
OPTION LCDPANEL ILI9488W, RLANDSCAPE,GP8,GP15,GP9,GP13
OPTION WIFI *****, ******, PicoLCDw
OPTION TOUCH GP16,GP17
GUI CALIBRATE 1, 3597, 489, -1347, 10358
OPTION SDCARD GP22
>

Matthias

A blessed 1st of Advent.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9119
Posted: 02:49pm 03 Dec 2023
Copy link to clipboard 
Print this post

  Quote  BUT only after activating the touch function! This is quite unusual.


Not unusual, well known and repeatedly discussed. With touch CS floating the touch controller corrupts the SPI bus. If you don't want to enable touch you can set the pin high manually or with a pullup resistor
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 213
Posted: 03:54pm 03 Dec 2023
Copy link to clipboard 
Print this post

matherp,
PicoMite V5.08.08b3
in its pure form it gives an error when compiling

[build] C:\ARM\PROJECTS\PicoMite\PicoMite\Audio.c: In function 'cmd_play':
[build] C:\ARM\PROJECTS\PicoMite\PicoMite\Audio.c:1946:17: error: too few arguments to function 'checkend'
[build]  1946 |                 checkend();
[build]       |                 ^~~~~~~~
[build] In file included from C:\ARM\PROJECTS\PicoMite\PicoMite\MMBasic_Includes.h:31,
[build]                  from C:\ARM\PROJECTS\PicoMite\PicoMite\Audio.c:32:
[build] C:\ARM\PROJECTS\PicoMite\PicoMite\MMBasic.h:271:6: note: declared here
[build]   271 | void checkend(unsigned char *p);
[build]       |      ^~~~~~~~
[build] mingw32-make.exe[3]: *** [CMakeFiles\PicoMite.dir\build.make:467: CMakeFiles/PicoMite.dir/Audio.c.obj] Error 1

Previous versions were compiled without such errors in this environment
Pico SDK 15 VSCODE on W11 using GCC 12.3.1 arm-none-eabi
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 12:59am 04 Dec 2023
Copy link to clipboard 
Print this post

Something for the audiophiles to contemplate.
The LCD backlight frequency was raised from 1kHz to 50kHz to minimize its effect on audio quality.
Might there now be an intermodulation artefact between 50kHz and the 44.1kHz audio PWM? The sum frequency is unimportant but the difference is 5.9kHz.
My geriatric ears notice nothing but others might. If anyone does might 44.1kHz be a better backlight frequency?
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 03:44am 04 Dec 2023
Copy link to clipboard 
Print this post

Your favorite OPTION strikes again!
MATH M_PRINT a%()
with OPTION BASE 1 prints one extra column and row so runs out of data.


 test_print:
LOCAL a%(BASE%+15,BASE%+7)
Math set 3,a%()
MATH M_PRINT a%()

Matrix Integer
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
3, 3, 3, 3, 3, 3, 3, 3, 3, 7598259076605371764, 2126958, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0


Edited 2023-12-04 13:46 by disco4now
Latest F4 Latest H7
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9119
Posted: 11:25am 05 Dec 2023
Copy link to clipboard 
Print this post

V5.08.00b4

https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

New command and function
OPTION PLATFORM name$ ' This command allows a user to identify a particular H/W configuration that can then be used to control a program. name$ can be up to 31 characters long
MM.INFO$(PLATFORM) ' returns a string previously set with OPTION PLATFORM

NB: Will erase all options and A: drive on a WebMite

Special request, Please could anyone with a WebMite application test this version
Edited 2023-12-05 21:26 by matherp
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4040
Posted: 11:27am 05 Dec 2023
Copy link to clipboard 
Print this post

  matherp said  ... MM.INFO$(PLATFORM) ...


Thanks Peter,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9119
Posted: 11:32am 05 Dec 2023
Copy link to clipboard 
Print this post

Note: OPTION LIST will show junk in OPTION PLATFORM (VGA and PicoMite) until you set it or do an OPTION RESET. The final release will force a reset so this will only be an issue for beta upgraders.

Also fixes M_PRINT bug as reported
Edited 2023-12-05 21:34 by matherp
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4238
Posted: 11:47am 05 Dec 2023
Copy link to clipboard 
Print this post

Peter,

OPTION PLATFORM works (on VGA). Tested it with several ASCII patterns.
You could default with OPTION PLATFORM MM.INFO(DEVICE)

Regards,

Volhout
Edited 2023-12-05 21:47 by Volhout
PicomiteVGA PETSCII ROBOTS
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 213
Posted: 05:53pm 05 Dec 2023
Copy link to clipboard 
Print this post

I'm building the PicoMite firmware from source code and it works.
But when I add files according to the instructions and build PicoMiteVGA, the firmware is built but does not work.
This started with the beta version of PicoMite 05.08.00b1
What could be wrong?
Who can check the PicoMiteVGA firmware build from these sources?
https://github.com/UKTailwind/PicoMite
https://github.com/UKTailwind/PicoMite-VGA-Edition
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6098
Posted: 08:33pm 05 Dec 2023
Copy link to clipboard 
Print this post

Beta 4 works well on my WEBmite.

Jim
VK7JH
MMedit   MMBasic Help
 
led-bloon

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 205
Posted: 09:11pm 05 Dec 2023
Copy link to clipboard 
Print this post

V5.08.00b3 source code for PicoMite and PicoMiteVGA compile and run ok
albeit with limited testing. The WebMite code does not compile when it
cannot find a header file (from & within code in the sdk!). Something
funny going on there and I haven't had a chance to track that down yet.
Compiling on RaspberryPi, sdk v1.5, arm-none-eabi-gcc v10.3
No suggestion as I'm sure you have already tried a "clean slate" approach.
@Jim Beta 4 has not been updated into the source code repo
led

Edit: Suggestion
Ignore the Include.h in the VGA repo, and just use the Include.h of
the main PicoMite repo.  The former has not been updated for some
defs.  I do, and, PicoMiteVGA compiles.

led
Edited 2023-12-06 12:16 by led-bloon
Miss you George
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 213
Posted: 05:49pm 06 Dec 2023
Copy link to clipboard 
Print this post

Yes, I understood the reason for my failures with compiling the PicoMiteVGA !
Apparently the GitHub code of the PicoMiteVGA repository has not been updated since version 5.08.00b0
https://github.com/UKTailwind/PicoMite-VGA-Edition
In the end, I managed to correct the code in the files: include.h and SMakeLists.txt
By analogy with the same files in the PicoMite codes
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 10:52pm 06 Dec 2023
Copy link to clipboard 
Print this post

MATH SHIFT a%(),nbr , b%() has an issue when B(63)=1
Once B(63) is set any following shift right will will populate the new B(63) as a 1.


 test_shift:
This value (hex)
0000000000000001
shifted left 63 gives
8000000000000000
now shifted right 63 gives
FFFFFFFFFFFFFFFF
FAIL (1/1)
   1: Assert equals failed, expected 1 but actually -1


Latest F4 Latest H7
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9119
Posted: 08:31am 07 Dec 2023
Copy link to clipboard 
Print this post

This correct. The value is signed and propagates the MSbit on right shifts

UPDATE

In the next release I'll add an optional parameter to force unsigned shifts

MATH SHIFT a%(),n,b%() [,U]
Edited 2023-12-07 20:40 by matherp
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 05:28pm 07 Dec 2023
Copy link to clipboard 
Print this post

  matherp said  This correct. The value is signed and propagates the MSbit on right shifts

UPDATE

In the next release I'll add an optional parameter to force unsigned shifts

MATH SHIFT a%(),n,b%() [,U]


Great!!! Is this also possible for the shift operators << >>?
 
karlelch

Senior Member

Joined: 30/10/2014
Location: Germany
Posts: 172
Posted: 07:50pm 07 Dec 2023
Copy link to clipboard 
Print this post

Regarding WebMite: Something "happened" between V5.08.00b3 and V5.08.00b4:
With V5.08.00b4 my MQTT application was running rather reliably over days; with V5.08.00b4 I get random errors, such as:
[222] "Cint(pow(1) = getVal(FLD_POW, 1) *POW_CORR
Error : Invalid character: "

But the line is fine, if I look at it the editor. As if the flash was corrupted.
If I write the program again to flash slot 1 (flash overwrite 1), the program runs again but freezes 1-2 min later (reset needed).

Puzzeled
Thomas

P.S.: here is the code.

The options are:
> option list
WebMite MMBasic Version 5.08.00b4
OPTION SYSTEM SPI GP10,GP11,GP12
OPTION AUTORUN  1
OPTION COLOURCODE ON
OPTION DISPLAY 64, 80
OPTION LCDPANEL ST7789_320, LANDSCAPE,GP8,GP15,GP9,GP13
OPTION WIFI Elchland3, ****************, PICOE6614104037
OPTION TOUCH GP16,GP17
OPTION SDCARD GP22
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 09:00pm 07 Dec 2023
Copy link to clipboard 
Print this post

  Homa said  MATH SHIFT a%(),n,b%() [,U]
Great!!! Is this also possible for the shift operators << >>?

It already seems to do that.
A:/> n = 2^62 * -1
A:/> ? n
-4.611686018e+18
A:/> ? hex$(n,16)
C000000000000000
A:/> ? bin$(n,64)
1100000000000000000000000000000000000000000000000000000000000000
A:/> m = n >> 16
A:/> ? bin$(m,64)
0000000000000000110000000000000000000000000000000000000000000000
A:/>

If that isn't what you mean then read the MSBit (n>>63) and if 1 change it to 0 before shifting and after shifting multiply by -1 to recover the sign, if its needed.

eg
A:/> clear
A:/> n = 2^62 * -1
A:/> ? bin$(n,64)
1100000000000000000000000000000000000000000000000000000000000000
A:/> if n>>63 = 1 then m = n and (2^63 - 1)
A:/> ? bin$(2^63 - 1,64)
0111111111111111111111111111111111111111111111111111111111111111
A:/> ? bin$(m,64)
0100000000000000000000000000000000000000000000000000000000000000
A:/> p = m >> 16
A:/> ? bin$(p,64)
0000000000000000010000000000000000000000000000000000000000000000
A:/> ? p
7.036874418e+13
A:/> q = p * -1
A:/> ? bin$(q,64)
1111111111111111110000000000000000000000000000000000000000000000
A:/> ? q
-7.036874418e+13
A:/>

Edited 2023-12-08 14:25 by phil99
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9119
Posted: 10:54am 08 Dec 2023
Copy link to clipboard 
Print this post

  Quote  With V5.08.00b4 my MQTT application was running rather reliably over days; with V5.08.00b4 I get random errors, such as:


Please could you try the attached. I made some changes to try and improve stability in b4 but the fact it made it worse has given me a clue as to what the problem was. I hope this improves it


PicoMiteWeb.zip
 
     Page 3 of 7    
Print this page
© JAQ Software 2024