Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 03:01 24 Apr 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 : New PicoMite firmware release V5.07.06

     Page 1 of 6    
Author Message
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 01:16am 07 Jan 2023
Copy link to clipboard 
Print this post

Peter has released V5.07.06 of the PicoMite and PicoMiteVGA firmware (V5.07.05 was skipped).

This release is an update to both versions and fixes all currently known bugs.  However the outstanding new feature is the Flash Filesystem.  In case you have missed Peter's beta test versions this looks like a normal disk drive to MMBasic and is automatically created by the firmware using the spare flash memory in the Pico.  Data and programs can be read/written using the normal BASIC file commands (SAVE, RUN, OPEN, etc) and sub directories can be created and deleted, long filenames used, etc.

This is a major feature and is worth the upgrade.  Peter has done a tremendous job  

The changes are listed in the release notes and both user manuals have been updated and now include change bars to highlight the new material.

The new firmware and manuals can be downloaded from:
PicoMite: https://geoffg.net/picomite.html
PicoMiteVGA: https://geoffg.net/picomitevga.html

Upgrading the firmware will erase the program and programs stored in the flash slots and clear any options set.  So save everything first.

Geoff
Edited 2023-01-07 11:35 by Geoffg
Geoff Graham - http://geoffg.net
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8573
Posted: 09:04am 07 Jan 2023
Copy link to clipboard 
Print this post

Thanks as always to Geoff for a huge amount of work on updating the manuals. The release notes for 5.07.06 are in the download but are reproduced below. Updating to this new release is highly recommended.

PicoMite V5.07.06 Changes from V5.07.04

Breaking changes PicoMite
PAGE command removed - replaced by GUI PAGE
GUI TEXTBOX ACTIVATE removed
Reduced available RAM and program size from 120KB to 116KB
Removes support for the GDEH029A1 display as this controller is now obsolete

Breaking changes PicoMiteVGA
Reduced available RAM and program size from 108KB to 100KB

General changes - both versions
Various tuning and performance improvements
Updates SDK to V1.4
Updates Compiler to version 11.2.1
Enables operation up to 378MHz
SETPIN for PWM no longer needs to specify the channel and port e.g. "SETPIN 1,PWM" is now accepted
Re-engineering of PORT command to allow simultaneous update
Modifies the port function to read all pins simultaneously
Revised version of CSub header to cater for compiler change
Updated CSUB header file and additional functions exposed
The number of flash slots in both versions is now 5
Changes the priority of the CIN.FIN,PER interrupt to improve accuracy
Resets default fonts when a new program is loaded or the NEW command is executed.
Max editor clipboard size now 16384 characters
Max number of BLIT buffers now 32 (memory dependent)
Support for file system on the Pico's flash. All SD file commands are supported. Flash drive is "A:" SDcard if configured is drive "B:"
By default the system restarts with the active drive as drive "A:" even if the SDcard is configured
On first installation the firmware will automatically create the flash drive. The firmware reads the size of the flash
and uses this to determine the drive size. Flash chips > 2Mb are fully supported
OPTION LIST now shows version number and which firmware
Changes to better support modules with >2Mb Flash chips
PWM duty cycles can now be negative which will invert the output (-100.0 <= duty <=100.0)


New/changed Commands - both versions
DRIVE drive$ - sets the active drive
DRIVE "A:/FORMAT" - re-initialise the flash drive
MATH RANDOMIZE [n] - seeds the  Mersenne Twister algorithm.
TRIANGLE SAVE [#]n, x1,y1,x2,y2,x3,y3 - saves a triangular area of the screen to buffer #n.
TRIANGLE RESTORE [#]n - restores a saved triangular region of the screen and deletes the saved buffer.
MEMORY PACK source%(),Destination%(), number, size - packs the contects of one array into another
MEMORY UNPACK source%(), Destination%(), number, size - unpacks the content of one array from another
BITBANG SERIALTX pinno, baudrate, ostring$ - transmits ostring$ on pinno
BITBANG SERIALRX pinno, baudrate, istring$, timeout_in_ms, status% [,nbr] [,terminators$] - receives istring$ on pinno
ON PS2 interrupt - triggers an interrupt whenever the PicoMite sees a message from the PS2 interface.
OPTION HEARTBEAT ON/OFF
LINE  AA x1, y1, x2, y2 [, LW [, C]] - Draws a line with anti-aliasing.
FRAMEBUFFER - see manuals for details
OPTION SERIAL CONSOLE TXpin, RXpin [,B] - adding the "B" parameter means output will go to "B"oth the serial port and the USB
PIO READ - Allows a single integer variable to be used when nbr=1

New/changed Functions - both versions
MATH(RAND) - returns a random number 0.0 <= n < 1.0 using the "Mersenne Twister: A 623-dimensionally
MM.INFO(drive) - get the current active drive - returns A: or B:
MM.INFO(HEAP) - returns the free space on the MMBasic heap
MM.INFO(STACK) - returns the C program stack pointer
MM.INFO$(SOUND) - returns the status of the audio channel
MM.INFO(PS2) - returns the last raw PS2 message received.
MM.INFO(PINNO n) now accepts a literal, a string variable or an unquoted GPn designation
MATH(CRC8 array()_or_string$, [length,] [polynome,] [startmask,] [endmask,] [reverseIn,] [reverseOut] - calculate an 8 bit CRC
MATH(CRC12 array()_or_string$, [length,] [polynome,] [startmask,] [endmask,] [reverseIn,] [reverseOut] - calculate a 12 bit CRC
MATH(CRC16 array()_or_string$, [length,] [polynome,] [startmask,] [endmask,] [reverseIn,] [reverseOut] - calculate a 16 bit CRC
MATH(CRC32 array()_or_string$, [length,] [polynome,] [startmask,] [endmask,] [reverseIn,] [reverseOut] - calculate a 32 bit CRC
PIO(EXECCTRL jmp_pin ,wrap_target, wrap [,side_pindir] [,side_en]) - JMP PIN must have GP designation, Extra optional parameters

Other new functionality - PicoMite
Enabled BLIT and LOAD JPG for mono displays
BLIT LOAD: now also accept BLIT LOADBMP for compatibility with VGA version
Adds support for the 480x320 IPS ILI9481 display (use code ILI9481IPS)

Other new functionality - PicoMiteVGA
Use EDIT 1 to edit in mode 1, Use EDIT 2 to edit in mode 2, Use EDIT to edit in current mode
Implements DRAW3D command and function
Improved LOAD JPG for MODE 1 (mono).
Implementation of enhanced sprite command and function


Bug Fixes and corrections - both versions
Fixes crashing bug if edit is used after running a program with IR input
Fixes bug in BITBANG LCD CMD and BITBANG LCD DATA
Fixes bug in PIO READ
Fixed bug in sound command overdriving the PWM when > 2 channels are used and the volume isn't explicitly specified
Fixed bug in PWM n,OFF requiring spurious extra parameter
Fixes bug in SDK that caused SPI clock to set to wrong level before first transaction
Fixes bug when using "ON KEY int" command
Fixes bug in passing string function to time$
Fixes bug in MM.INFO(filesize ... and MM.INFO(Modified ...
Changes to PS2 keyboard handler to fix bug where interrupts are dropped
Fixes bug in PLAY TONE n. m. d, interrupt which caused the interrupt not to fire
Fixes bug in ERASE command when erasing arrays
Improved error checking of SETPIN command to avoid crashes
Fix to BITBANG WS2812 timings
Improved error messaging for incorrect pin usage.
Fixed MM.INFO(pinno when OPTION EXPLICIT specified.
Improved error detection on some option commands to avoid lockups through pin conflicts
Fixes bug in setpin fin,per,cin when fast signal is established before the setpin

Bug Fixes and corrections - PicoMite
Fixes bug in GUI DELETE
Fixes bug in OPTION LIST for some displays
SPI for touch reduced in speed to 1MHz to improve reliability
Bug fix to GUI spinbox to erase triangle bounding line properly
Fixed bug in LOAD IMAGE for mono displays
Corrects reporting of MM.HRES and MM.VRES by OPTION LIST when a user driver is loaded

Bug Fixes and corrections - PicoMiteVGA
Fixes issue where connecting a USB CDC cable would cause the VGA version to Hardfault
Change timing of PAGE COPY ,,B to avoid screen artefacts
Fixes issue on some Pico in VGA mode 1 output at 126MHz
Edited 2023-01-07 19:10 by matherp
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5710
Posted: 10:13am 07 Jan 2023
Copy link to clipboard 
Print this post

Just....  WOW!

Many thanks, Peter, this is sterling work on your part as usual. This really has become a habit of yours. :) Many thanks also to Geoff for his excellent work on the manuals. I've been watching the development of 5.07.06 but until now I hadn't realised just how much has gone into it.
Mick

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

Joined: 30/06/2020
Location: Germany
Posts: 374
Posted: 10:30am 07 Jan 2023
Copy link to clipboard 
Print this post

Those are BIG changes and improvements! Many thanks for creating such a wonderful piece of software and a manual which deserves it's name. But also it is the community here in the forums, which is always kind and helpful   !

Greetings
Daniel
 
homa

Senior Member

Joined: 05/11/2021
Location: Germany
Posts: 238
Posted: 12:11pm 07 Jan 2023
Copy link to clipboard 
Print this post

Danke! Thank you, Geoff and Peter!
And everyone else, like Volhout for the PIO course and the great forum here.
Best regards
Matthias
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3838
Posted: 12:25pm 07 Jan 2023
Copy link to clipboard 
Print this post

Well done Peter and Geoff.

We should probably hold a sweepstake on how long before the first bug/typo is reported  .

Happy New Year,

Tom
Edited 2023-01-07 22:25 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
cosmic frog
Senior Member

Joined: 09/02/2012
Location: United Kingdom
Posts: 278
Posted: 01:42pm 07 Jan 2023
Copy link to clipboard 
Print this post

Thankyou. This is very much appreciated.

Dave.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3505
Posted: 01:51pm 07 Jan 2023
Copy link to clipboard 
Print this post

Thanks Peter,

Now I read the list I realize how much improvements went into this release. This is Major. We are lucky to have such a dedicated sw developer....

Volhout
PicomiteVGA PETSCII ROBOTS
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3650
Posted: 02:55pm 07 Jan 2023
Copy link to clipboard 
Print this post

Great stuff!

John
 
karlelch

Senior Member

Joined: 30/10/2014
Location: Germany
Posts: 155
Posted: 04:09pm 07 Jan 2023
Copy link to clipboard 
Print this post

Excellent! Thank you both - Peter and Geoff!

Best
Thomas
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 05:32pm 07 Jan 2023
Copy link to clipboard 
Print this post

Thanks Peter, thanks Geoff!  

Sorry I have to report a bug in the manual page 73  
  Quote  MM.INFO$(FILESIZE file$) Returns the size of file$ in bytes or -1 if not found, -2 if a directory.

Actually it should be: MM.INFO(FILESIZE file$)
That makes more sense too.

BTW. the transfer speed (copy a: to a:) is 63.5 KB/s on my 16MB-Picomite (Clone).

Best regards
Michael
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 411
Posted: 06:08pm 07 Jan 2023
Copy link to clipboard 
Print this post

Hi Peter,
Thanks very much for this release, working fine, except for one problem I'm having. This is on a VGA.
If you load my WS2812 PIO program below.
'PIO WS2812 driver on GP0
'
' The PIO program -------------------------------------------------------------

'Set GPIO to GP0, PIO no. 1
SetPin gp0,pio1

'configure the PIO sequencer clock and pin registers
e0=Pio(execctrl GP0,1,4)
p0=Pio(pinctrl 1,1,,,gp0,gp0,)    'GP0 side set, GP0 SET (for pindirs)
f0=Pio(shiftctrl 0,0,0,1)         'Set Auto Pull at 32bits (0)
fr0=5000000                       '5MHz PIO frequency, lowest I could go with my pixels

'This code relies on AutoPull when all 32 bits have been read from X
'line   Bin             code                              comment
'0  1110 0000 1000 0001 'set GP0 output, side(0),         'note GP0 is assigned in pinctrl
'.wrap_target
'1  0110 0002 0010 0001 'out x, 1bit, side(0), dly 1 or 2 or 1 'put one bit in x side set 0
'2  0001 0001 0010 0011 'jmp !x to 4, side(1), dly 1 or 1 or 1 'jump if not X (ie 0) side set 1
'3  0001 0004 0000 0000 'jmp to 1, side(1),    dly 1 or 1 or 2 'jump to 1 side set 1
'4  1010 0004 0100 0010 'MOV Y to Y side(0),   dly 1 or 2 or 2 'Nop delay side set 0
'wrap
PIO program line 1,0,&hEF81
PIO program line 1,1,&h6121
PIO program line 1,2,&h1124
PIO program line 1,3,&h1101
PIO program line 1,4,&hA142

'PIO1.0  setup the machine.
PIO init machine 1,0,fr0,p0,e0,f0,0
'LED data GRBG RBGR BGRB GRBG
Dim Integer ct(3)=(&h00000100,&h00010000,&h01000001,&h00000100)
               
'The MMBasic program --------------------------------------------------------

Do
PIO start 1,0  'start the PIO
For b=0 To 86
PIO WRITE 1,0,3,ct(0),ct(1),ct(2) 'writes led colours to fifo
Next
PIO Write 1,0,1,&h00000000  ' Haven't worked out why I need this to flush?
ct(3)=ct(0):ct(0)=ct(1):ct(1)=ct(2):ct(2)=ct(3) ' rotate the colours
PIO stop 1,0   'stop the pio
Pause 200
Loop While Inkey$=""
End

and run it, all works fine.
If I Ctrl C out and run again I get various errors, like:-
[9] e0=Pio(execctrl GP0,1,4)
Error : Divide by zero
or
[9] e0=Pio(execctrl GP0,1,4)
Error : 3 is invalid (valid is 0 to 1)
If I edit the code and make any change, even a comment and re-run all is fine again for the first run, then errors after that.
If I 'List' my program and then try to 'run' it I get:-
Error: Invalid address - resetting
my options are:-
PicoMiteVGA MMBasic Version 5.07.06
OPTION SYSTEM I2C GP22,GP15
OPTION COLOURCODE ON
OPTION KEYBOARD UK
OPTION CPUSPEED (KHz) 378000
OPTION DEFAULT MODE 2
OPTION SDCARD GP5, GP2, GP3, GP4
OPTION AUDIO GP6,GP7, ON PWM CHANNEL 3
OPTION RTC AUTO ENABLE
OPTION F6 Edit 1
OPTION F7 Edit 2
OPTION DEFAULT FONT 8, 1
Thanks for any help.
Regards, Kevin.
Edited 2023-01-08 04:17 by Bleep
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1776
Posted: 09:49pm 07 Jan 2023
Copy link to clipboard 
Print this post

Thanks Peter and Geoff for all the time and brain power you have put into this.

Also on VGA only PWM invert doesn't.

> setpin 1,pwm
> setpin 2,pwm
> pwm 0, 67, 50, -50

same as

pwm 0, 67, 50, 50
 
jwettroth

Regular Member

Joined: 02/08/2011
Location: United States
Posts: 70
Posted: 05:14am 08 Jan 2023
Copy link to clipboard 
Print this post

Sincere thank you's for all your hard work- I've found these devices to be wonderful time savers for the kind of stuff that I do on a regular basis.

In reading through the manual and other docs, I found a couple of minor items-

1.  There are two of more references to the PIC32 in the Manual.  Do a search.  Not a big deal but a small confusion.

2. The explanation of how sound works in the background is somewhat confusing.
Page 32-
Play Tone 500,500,2000
End
It makes some sense that this doesn't work.  You then add the pauses- this I guess is still "non blocking" or is it?

You go on to say just below that this applies to PLAY WAV as well.
I would think that you'd use the interrupt in the original invocation to jump some where when that sound completed and the next should start.  I'm going to play with this a bit tonight but I'm not sure its crystal clear what is going on.

3. I'm dying to play with the PIO stuff.  I've played with this in the Python version and got it do some things.  I'm an old assembly programmer so this really dear to me.  I'll do some testing on the PIO stuff in the coming days.  I'm going to try to hang a nice I2S DAC on it to play high fidelity sound.  I'll post my results.

This is a cool version- I like the internal file storage support as well as the very complete SD Card Support- wonderful.
John Wettroth
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8573
Posted: 09:17am 08 Jan 2023
Copy link to clipboard 
Print this post

  Quote  except for one problem I'm having.

  Quote  Also on VGA only PWM invert doesn't.


That will teach me to do last minute updates.

Geoff has uploaded fixed versions to his site. You will know you have the new versions as the copyright is also updated to show 2023

  Quote  2. The explanation of how sound works in the background is somewhat confusing.
Page 32-
Play Tone 500,500,2000
End
It makes some sense that this doesn't work.  You then add the pauses- this I guess is still "non blocking" or is it?


Sound commands are non-blocking. The issue is that when a program ends with an END command or Ctrl-C it stops the audio output so unless you wait before exiting you will never hear anything. Likewise executing PLAY TONE twice in rapid succession will replace the first tone with the second such that the first may never be heard.

Ending a program by "running off the end" without an explicit END statement will not stop the audio. Otherwise you would not be able to execute sound commands at the command prompt.
Edited 2023-01-08 19:27 by matherp
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 411
Posted: 09:38am 08 Jan 2023
Copy link to clipboard 
Print this post

  matherp said   That will teach me to do last minute updates.

:-) :-)
Been there, got the T shirt, all working great now thanks. :-)
Kevin.
Edited 2023-01-08 20:49 by Bleep
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1133
Posted: 12:30pm 08 Jan 2023
Copy link to clipboard 
Print this post

@Peter

I think I found a small bug regarding MM.Info(FILESIZE file$).
I wanted to use it to determine whether a file exists.

From manual:
  Quote  MM.INFO$(FILESIZE file$) Returns the size of file$ in bytes or -1 if not found, -2 if a directory.

I would expect a return of -1 for a nonexistent file, but I get:

Error : Could not find the file

I know I could deal with "on error skip" and "mm.errno".

I also know that there are two other ways to determine if a file_exists.
MM.Info(MODIFIED fb$)=""

and
On Error Skip
Open "file.txt" For Input As #1
If MM.ErrNo <> 0 Then
...


Best regards
Michael

EDIT:
I was surprised!
Question regarding the copy command:
Is it a desired behavior that files with the same name are not automatically overwritten/replaced, but have to be deleted first?
Edited 2023-01-08 23:09 by twofingers
 
homa

Senior Member

Joined: 05/11/2021
Location: Germany
Posts: 238
Posted: 05:58pm 08 Jan 2023
Copy link to clipboard 
Print this post

@Peter

I think there is a bug with the flashdisk
the following code always leads to an error with a value di<>1:


Open "test.dat" For random As #1
'
di=1
Seek #1, di
l$=Input$(4, #1)
Print l$;
'
di=4
Seek #1, di
l$=Input$(4, #1)
Print l$;
'
Close #1



[3] Seek #1, di
Error : A hard error occurred in the low level disk I/O layer
>

[8] Seek #1,di
Error : Could not find the file
>
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 411
Posted: 06:27pm 08 Jan 2023
Copy link to clipboard 
Print this post

Hi Peter,
Sorry, another bug. :-( Using VGA with options:-
PicoMiteVGA MMBasic Version 5.07.06
OPTION SYSTEM I2C GP22,GP15
OPTION COLOURCODE ON
OPTION KEYBOARD UK
OPTION DEFAULT MODE 2
OPTION DISPLAY 80, 160
OPTION SDCARD GP5, GP2, GP3, GP4
OPTION AUDIO GP6,GP7, ON PWM CHANNEL 3
OPTION RTC AUTO ENABLE
OPTION F6 Edit 1
OPTION F7 Edit 2
OPTION DEFAULT FONT 8, 1

The Mode 1 screen is only 620 wide, height is good, similarly the Mode 2 screen is only 310 wide, as in, if I draw past these values they are off screen, the whole width seems to be stretched.
Regards, Kevin.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8573
Posted: 06:38pm 08 Jan 2023
Copy link to clipboard 
Print this post

  Quote  The Mode 1 screen is only 620 wide, height is good, similarly the Mode 2 screen is only 310 wide, as in, if I draw past these values they are off screen, the whole width seems to be stretched


Check your monitor (auto adjust)- no issue for me

the following code always leads to an error with a value di<>1:


Trivial - will fix

  Quote  I think I found a small bug regarding MM.Info(FILESIZE file$).


Trivial - will fix
Edited 2023-01-09 04:41 by matherp
 
     Page 1 of 6    
Print this page
© JAQ Software 2024