Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:49 24 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 : RP2350 firmware

     Page 6 of 20    
Author Message
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 01:51pm 29 Aug 2024
Copy link to clipboard 
Print this post

  matherp said  Here is the full set of firmware for the RP2350: V6.0.0b0

PicoMite-RP2350-V6.0.0B0.zip

Enclosed are standard and USB-host versions for the PIcoMite, PicoMiteVGA, and PicoMiteHDMI.

The USB versions are not tested other than that they boot, flash the heartbeat, and in the case of the VGA and HDMI variants display the expected screen.

All versions now support:

PLAY MP3 fname$ as long as the CPU speed is set to > 200MHz
Like the CMM2 if fname$ is a directory the PicoMite will play all the files in the directory and PLAY NEXT and PLAY PREVIOUS should work as expected.

Please report any issue you find.

Please try any and all programs from  your stock of RP2040 portfolio. There should be no difference other than a performance improvement. HDMI and VGA versions should also behave identically


Using usb vga pico2 and usb keyboard no response. pico2 was drop in replacement for 2040 where usb keyboard worked. pico2 vga display is ok just usb keyboard don't work

ps thanks for the work you are doing both 2040 and now pico2. it is greatly appreciated.
Edited 2024-08-30 00:40 by stanleyella
 
Sasquatch

Guru

Joined: 08/05/2020
Location: United States
Posts: 362
Posted: 03:28pm 29 Aug 2024
Copy link to clipboard 
Print this post

  matherp said  Bug fixes for VGA version "Error : Stack overflow, expression too complex at depth 0"
and HDMI version "I'm getting some blocky artefacts on HDMI, only seems to affect Mode 1"


Much better!  I will use V6.00.00b0 for all my testing now!

The RP2350B PGA device ran Mandelbrots in HDMI mode at 315000Khz for 24 hours with no problems.  This is despite the solderless breadboard and nest of Dupont wires I am currently using.

The progress on this port for a device that was only released 3 weeks ago has been brilliant!
-Carl
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 07:00pm 29 Aug 2024
Copy link to clipboard 
Print this post

This is for Harm



PicoMiteVGARP2350.zip

New PIO stuff which I may or may not have understood: totally untested

In theory the following assembler statements are now supported
mov rxfifo[y], isr
mov rxfifo[<index>], isr
mov osr, rxfifo[y]
mov osr, rxfifo[<index>]

In addition two new parameters to the shiftctlr function

push threshold,pull threshold,[autopush],[autopull],[IN_SHIFTDIR],[OUT_SHIFTDIR],[FJOIN_RX],[FJOIN_TX],[FJOIN_RX_GET,[FJOIN_RX_PUT

Then a new subcommand

WRITEFIFO pio, sm, fifo, value

and a new function

PIO(READFIFO pio, sm, fifo)

If I understand correctly, you need to enable either FJOIN_RX_GET, and/or FJOIN_RX_PUT in order for the new assembler statements to do anything and then, depending on them being enabled you can read and/or write directly to the FIFO cells


  Quote  When only SHIFTCTRL_FJOIN_RX_PUT is set (in SM0_SHIFTCTRL through SM3_SHIFTCTRL), the system can also read the RX
FIFO registers with random access via RXF0_PUTGET0 through RXF0_PUTGET3 (where RXFx indicates which state
machine’s FIFO is being accessed). In this state, the FIFO register storage is repurposed as status registers, which the
state machine can update at any time and the system can read at any time. For example, a quadrature decoder program
could maintain the current step count in a status register at all times, rather than pushing to the RX FIFO and potentially
blocking.


  Quote  When only SHIFTCTRL_FJOIN_RX_GET is set, the system can also write the RX FIFO registers with random access via
RXF0_PUTGET0 through RXF0_PUTGET3 (where RXFx indicates which state machine’s FIFO is being accessed). In this
state, the RX FIFO register storage is repurposed as additional configuration registers, which the system can update at
any time and the state machine can read at any time. For example, a UART TX program might use these registers to
configure the number of data bits, or the presence of an additional stop bit.

  Quote  When both SHIFTCTRL_FJOIN_RX_PUT and SHIFTCTRL_FJOIN_RX_GET are set, the system can no longer access the RX FIFO
storage registers, but the state machine can now put/get the registers in arbitrary order, allowing them to be used as
additional scratch storage.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 11:10am 30 Aug 2024
Copy link to clipboard 
Print this post

V6.0.0b1 for HDMI, PicoMite and VGA - no USB versions yet


PicoMiteRP2350V60.0b1.zip


This has the new PIO functions as above + full transparent support for PSRAM


 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 01:29pm 30 Aug 2024
Copy link to clipboard 
Print this post

Hi Peter,

I think the "mov rxfifo[], isr" does not work correct.



When the datasheet is correct it should translate to something starting with &h80xx



Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 01:43pm 30 Aug 2024
Copy link to clipboard 
Print this post

Can you post your test program please - thanks. I think I had a |= rather than an =
Edited 2024-08-30 23:43 by matherp
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 03:11pm 30 Aug 2024
Copy link to clipboard 
Print this post

That is the whole test program, these 8 lines. I did not arrive at executing anything yet...just the lines PIO ASSEMBLE 1, ....

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 06:28pm 30 Aug 2024
Copy link to clipboard 
Print this post

USB editions all now tested and working with a USB keyboard and USB game controller. Remember to apply 5V on pin 40 (VBUS) and serial console on pins GP8 and GP9


PicoMiteUSBRP2350.zip


Non-USB editions


PicoMiteRP2350.zip

Should fix the PIO issue above

All HDMI and VGA versions now support "MODE 3" which is 640x480c16 colour.
This can be set as the default with
OPTION DEFAULT MODE 3

All versions now support PSRAM if enabled with
OPTION PSRAM PIN pinno 'pinno is typically GP47 for Pimoroni boards
When enabled PSRAM can be used like normal ram to store large arrays/strings etc.

Source code on github
Edited 2024-08-31 04:51 by matherp
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 06:48pm 30 Aug 2024
Copy link to clipboard 
Print this post

Hi Peter,
Which USB games controller would you recommend? I'm looking to get one for the PicoMIte USB.
Thanks Kevin.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 06:55pm 30 Aug 2024
Copy link to clipboard 
Print this post

Something like this is cheap and fully supported. Or for more functionality "genuine" Dualshock3
 
Sasquatch

Guru

Joined: 08/05/2020
Location: United States
Posts: 362
Posted: 09:28pm 30 Aug 2024
Copy link to clipboard 
Print this post

  matherp said  All HDMI and VGA versions now support "MODE 3" which is 640x480c16 colour.
This can be set as the default with
OPTION DEFAULT MODE 3


 Hooray Mode 3     Great Progress!!!

Map commands don't seem to be working in Mode 3.  Martin's program works in Mode 2 but not not quite in Mode 3.  Using the VGA version.

MODE 3
Dim co(16,3)
For f=1 To 15:Read co(f,0),co(f,1),co(f,2)
Text 0,f*12,"Color MAP("+Str$(f)+")",,,,Map(f)
'TEXT 0,0,"Hello world",,,,MAP(1)
Next
Do
' Color-map-rotation
For f=0 To 15
  Map(F)=RGB(co(f,0),co(f,1),co(f,2))
Next
Map set
Pause 100
R1=co(1,0):G1=co(1,1):B1=co(1,2)
For n=2 To 15:co(n-1,0)=co(n,0):co(n-1,1)=co(n,1):co(n-1,2)=co(n,2):Next
co(15,0)=R1:co(15,1)=G1:co(15,2)=B1
Loop

Data 0,0,128
Data 0,128,0
Data 0,128,128
Data 128,0,0
Data 128,0,128
Data 128,128,0
Data 128,128,128
Data 0,0,0
Data 0,0,255
Data 0,255,0
Data 0,255,255
Data 255,0,0
Data 255,0,255
Data 255,255,0
Data 255,255,255
Data 255,0,0
>

-Carl
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 09:42pm 30 Aug 2024
Copy link to clipboard 
Print this post

VGA can only show the RGB121 colours as per the RP2040 so whatever you set to will only be one of those. This is determined by the resistor network. map works as expected on HDMI as all the colours are RGB555
 
Sasquatch

Guru

Joined: 08/05/2020
Location: United States
Posts: 362
Posted: 09:52pm 30 Aug 2024
Copy link to clipboard 
Print this post

  Quote  VGA can only show the RGB121 colours as per the RP2040 so whatever you set to will only be one of those. This is determined by the resistor network. map works as expected on HDMI as all the colours are RGB555


I understand, I was actually testing something else, when it didn't work as expected, I reverted to Martin's test program.  Martin's Test Program works on VGA Mode 2, I couldn't get the map commands to work properly in Mode 3.  The behavior is inconsistent between Mode 2 and Mode 3.  I will test on HDMI version.


Same result on HDMI version, map commands don't seem to be working correctly in Mode 3?  Or at least not the same as Mode 2.  I'm not complaining, I think the progress to date has been exceptional!  Just reporting what I am finding.
Edited 2024-08-31 07:58 by Sasquatch
-Carl
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6097
Posted: 05:58am 31 Aug 2024
Copy link to clipboard 
Print this post

The PAUSE bug has returned.

PicoMite RP2350B, B0 firmware, default options

This code will run for a few minutes to a few hours before locking up. The Hardware Watchdog does it's thing but a software Watchdog fails to restart.
Edit: The first run on b1 failed after 13 minutes.
'
'settick 2000, ping
'do
'loop

DO
WATCHDOG HW 8000
DEVICE HUMID GP20, tVar, hVar
PRINT TIME$, n, tVar, hVar ;
PAUSE 2000
n = n + 1
PRINT n
LOOP

SUB ping
'do
WATCHDOG HW 8000
DEVICE HUMID GP20, tVar, hVar
PRINT TIME$, n, tVar, hVar ;
'pause 2000
n = n + 1
PRINT n
'loop
END SUB



The print statement was split before and after the PAUSE ro confirm that it is the PAUSE that is the culprit.

Remove the comments from the SETTICK and the empty loop and SETTICK is used rathhheer than PAUSE 2000
Then it appears to run for ever (well tested for 10 hours so for)
Edited 2024-08-31 16:44 by TassyJim
VK7JH
MMedit   MMBasic Help
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 09:51am 31 Aug 2024
Copy link to clipboard 
Print this post

  matherp said  USB editions all now tested and working with a USB keyboard and USB game controller. Remember to apply 5V on pin 40 (VBUS) and serial console on pins GP8 and GP9


PicoMiteUSBRP2350.zip


Non-USB editions


PicoMiteRP2350.zip

Should fix the PIO issue above

All HDMI and VGA versions now support "MODE 3" which is 640x480c16 colour.
This can be set as the default with
OPTION DEFAULT MODE 3

All versions now support PSRAM if enabled with
OPTION PSRAM PIN pinno 'pinno is typically GP47 for Pimoroni boards
When enabled PSRAM can be used like normal ram to store large arrays/strings etc.

Source code on github



Heck, I'm having heart palpitations  

This is getting silly-good  
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 12:32pm 31 Aug 2024
Copy link to clipboard 
Print this post

My Pico2 finally arrived :-)

I have graphical artifacts with the "files" command. See picture.



@Peter: Is there a way to prevent the message that a keyboard has been connected/disconnected? The reason is that I use a switcher ... PC/Pico2


By the way, the HDMI/DVI signal only works with a direct connection to the monitor. Using an HDMI matrix (Greathtek 4x2) does not work.

As always, it's an exciting phase to see what's possible.

Matthias
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6780
Posted: 12:50pm 31 Aug 2024
Copy link to clipboard 
Print this post

I see the same artefacts. Only in mode 1. Modes 2 and 3 are ok.

I'm not getting a response from a WS2812B at the moment. The supply is there. I'm still playing so no panic on that one. It might be my fault.

USB and DVI are playing nicely together. The USB-TTL converter is a black one with a CH9340C on it rather than the purple one that I experimented with earlier. No real reason, it just fits the (Alpha) PCB better as it's slightly longer. :)

I've hard-wired D+ and D- to the hub at the moment as I've no sacrificial micro USB data leads to hand.

RTC is working (once I remembered to set system I2C up).

I set keyboard UK but it's not mapping correctly. It may be the font or it might be this (wireless) keyboard.
Edited 2024-08-31 22:54 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: 9110
Posted: 01:07pm 31 Aug 2024
Copy link to clipboard 
Print this post

V6.00.00b2

Minor bug fixes and I've re-coded pause although it hasn't changed in months.
Should fix artifacts in HDMI mode 1
Fixes bug in map() function for VGA in mode 3
Increases program size HDMI/VGA = 180Kb, PicoMite = 256Kb



PicoMiteRP2350.zip


PicoMiteUSBRP2350.zip
Edited 2024-08-31 23:22 by matherp
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 351
Posted: 02:08pm 31 Aug 2024
Copy link to clipboard 
Print this post

1. Map commands don't seem to be working in Mode 3.  Martin's program works in Mode 2 but not not quite in Mode 3.  Using the HDMI V6.00.00b2 version.

2. Is there a way to prevent the message that a keyboard has been connected/disconnected?
 
JanVolk
Senior Member

Joined: 28/01/2023
Location: Netherlands
Posts: 144
Posted: 02:37pm 31 Aug 2024
Copy link to clipboard 
Print this post

> memory
Program:
  0K ( 0%) Program (0 lines)
208K (100%) Free

Saved Variables:
 16K (100%) Free

RAM:
  0K ( 0%) 0 Variables
  0K ( 0%) General
250K (100%) Free
> option list
PicoMite MMBasic Version 6.00.00b0
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION CPUSPEED  150000 'KHz
OPTION DISPLAY 43, 96
> files
A:/
  <DIR>  .
  <DIR>  ..
00:00 01-01-2000          4  bootcount
04:39 01-01-2000        449  hexdump.bas
00:26 01-01-2000        462  hexdump1.bas
01:09 01-01-2000         74  test.bas
00:01 01-01-2000         60  test1.bas
2 directories, 5 files, 2568192 bytes free
>

PicoMite MMBasic Version 6.00.00b2
Copyright 2011-2024 Geoff Graham
Copyright 2016-2024 Peter Mather

> memory
Program:
  0K ( 0%) Program (0 lines)
256K (100%) Free

Saved Variables:
 16K (100%) Free

RAM:
  0K ( 0%) 0 Variables
  0K ( 0%) General
304K (100%) Free
> files
A:/
  <DIR>  .
  <DIR>  ..
00:00 01-01-2000          4  bootcount
2 directories, 1 file, 2330624 bytes free
>

RAM is also larger and the contents of drive A: are erased.

Jan
 
     Page 6 of 20    
Print this page
© JAQ Software 2024