Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 02:42 25 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 V6.00.00 release candidates - all versions

     Page 15 of 24    
Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6781
Posted: 08:20am 25 Oct 2024
Copy link to clipboard 
Print this post

A lot of development has happened since 5.08. :)

This is a stopgap file that is intended ro fill the gap since the 5.08 manual and is more or less up to date:
MMBasic catchup - 22-10-24.pdf
RC9 is the latest, but is basically a bug-squashing release. I'm not aware of anything new in it.
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: 11:32am 25 Oct 2024
Copy link to clipboard 
Print this post

V6.00.00RC10


PicoMiteRP2350V6.00.00RC10.zip


PicoMiteRP2040V6.00.00RC10.zip


I've reverted to compiler version 12.2.1 as it generates slightly faster code than the current version

Changes USB channel allocations so that:
This will always try and allocate slot 1 to the keyboard and slot 2 to a mouse.
It will always try to allocate slot 3, if free, to the first game controller and slot 4 to the second.

In the event that you are trying to use three of more game controllers or two or more keyboards or mice then this of course will break down and the extra ones will be allocated to the highest available slot.

In addition, this version now assumes that generic gamepads pid/vid use either 2079/58369 or
2064/58625 so you shouldn't see the phantom (NB: Sony ds3/ds4 are already handled separately)
Hopefully, this change doesn't exclude any of the available generics but if anyone does find a gamepad is no longer found then please run the previous posted version and report the VID/PID to me so I can special case it as well.

This version also unlocks the ADC speed for the ADC command. Valid total frequecies are now anywhere between CPU_speed_in_Hz/96/65536 and CPU_speed_in_Hz/96.
Normal ADCinput using the pin function is not affected and uses the default sampling rate.
 
stanleyella

Guru

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

it didn't change options, which is safe now, only if necessary?

option list
PicoMiteHDMI MMBasic USB Version 6.00.00RC10
OPTION SERIAL CONSOLE COM2,GP8,GP9
OPTION AUTORUN  ON
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD UK, 0, 0, 600, 150
OPTION CPUSPEED (KHz) 315000
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
>
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 05:34pm 25 Oct 2024
Copy link to clipboard 
Print this post

quick example of pixel folowing mouse movements :)
(Correct mouse device channel must be if not 3 as in my case)


MODE 2
Device mouse set 3,MM.HRes\2,MM.VRes\2,0

Do
If DEVICE(MOUSE 3,x) <> tmpx Or DEVICE(MOUSE 3,y) <> tmpy Then
Pixel tmpx,tmpy,0
Pixel DEVICE(MOUSE 3,x),DEVICE(MOUSE 3,y)
tmpx=DEVICE(MOUSE 3,x)
tmpy=DEVICE(MOUSE 3,y)
End If
Loop

Edited 2024-10-22 15:37 by electricat

don't work?
this wireless kb works but not the mouse pad

 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 07:01pm 25 Oct 2024
Copy link to clipboard 
Print this post

Hi Peter,
Trying to test the VGA 2040 and can't get my options programmed in

> option list
PicoMiteVGA MMBasic USB Edition  6.00.00RC10
OPTION SERIAL CONSOLE COM2,GP24,GP25
OPTION FLASH SIZE 16777216
OPTION COLOURCODE ON
OPTION KEYBOARD ES
OPTION HEARTBEAT OFF
OPTION PICO OFF
OPTION CPUSPEED (KHz) 252000
> option system spi gp18,gp19,gp16
Error : Invalid Option

Any ideas.
Regards Kevin
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 07:08pm 25 Oct 2024
Copy link to clipboard 
Print this post

Hi Kevin,

In the VGA (without re-defining the VGA pins) gp16,18 and gp19 are used for VGA.
Maybe you should first re-allocate the VGA pins...

Volhout
PicomiteVGA PETSCII ROBOTS
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 08:25pm 25 Oct 2024
Copy link to clipboard 
Print this post

Ah, ok, it's a bit confusing that it doesn't show those options in the options list, also the error would be more useful if it said GP16... already allocated, rather than Invalid Option. Anyway I'll try de-allocating the VGA and then re-allocating to the pins I  actually use. Thanks Harm. :-)
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 08:55pm 25 Oct 2024
Copy link to clipboard 
Print this post

PicoVGA doesn't have SYSTEM SPI, you setup the SD card something like this:-
OPTION SDCARD GP13, GP10, GP11, GP12

Other SPI devices use the regular SPI commands

OPTION VGA PINS is in the 5.08 manual.
Edited 2024-10-26 06:56 by phil99
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 09:12pm 25 Oct 2024
Copy link to clipboard 
Print this post

PicoMiteVGA MMBasic USB Edition  6.00.00RC2
OPTION SERIAL CONSOLE COM2,GP8,GP9
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD US
OPTION CPUSPEED (KHz) 315000
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
>
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 09:45pm 25 Oct 2024
Copy link to clipboard 
Print this post

  stanleyella said  
don't work?
this wireless kb works but not the mouse pad

Your mouse is most likely on USB 2 not USB 3


Print "Device: 0=not used,1=Keyboard,2=Mouse,128=PS4,129=PS3,130=SNES/Generic"
Print "chan  device    VID     PID"
For x=1 To 4
Print x,MM.Info(USB x),Hex$(MM.Info(USB VID x),4),Hex$(MM.Info(USB PID x),4)
Next

> run
Device: 0=not used,1=Keyboard,2=Mouse,128=PS4,129=PS3,130=SNES/Generic
chan  device    VID     PID
1       1      046D    C52B
2       2      046D    C52B
3       0      046D    C52B
4       0      0000    0000
>
Test the mouse.

no=2 'Set correct mouse channel
MODE 2
Device mouse set no,MM.HRes\2,MM.VRes\2,0

Do
If DEVICE(MOUSE no,x) <> tmpx Or DEVICE(MOUSE no,y)
<> tmpy Then
Pixel tmpx,tmpy,0
Pixel DEVICE(MOUSE no,x),DEVICE(MOUSE no,y)
tmpx=DEVICE(MOUSE no,x)
tmpy=DEVICE(MOUSE no,y)
End If
Loop


Footnote added 2024-10-26 11:12 by disco4now
Correction - needs to be on a single line

If DEVICE(MOUSE no,x) <> tmpx Or DEVICE(MOUSE no,y)<> tmpy Then

Latest F4 Latest H7
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 09:48pm 25 Oct 2024
Copy link to clipboard 
Print this post

this was posted to show pin use
MM.Startup
end

Sub MM.Startup
Local Integer m, n
For m=0 To 28
 n = MM.Info(pinno "GP"+Str$(m))
 If MM.Info(pin n)="OFF" Then SetPin n, DIN, PULLUP
 print n,"GP"+Str$(m), MM.Info(pin n)
Next
End Sub

but get
RUN
1     GP0     DIN
2     GP1     DIN
4     GP2     DIN
5     GP3     DIN
6     GP4     OFF: Boot Reserved
7     GP5     DIN
9     GP6     OFF: Boot Reserved
10    GP7     OFF: Boot Reserved
11    GP8     OFF: Boot Reserved
12    GP9     OFF: Boot Reserved
14    GP10    DIN
15    GP11    DIN
[8] n = MM.Info(pinno "GP"+Str$(m))
Error : Invalid pin
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 10:10pm 25 Oct 2024
Copy link to clipboard 
Print this post

My guess is HDMI pins are not treated as GPIO pins.

To test this idea, at the command prompt type:-

? MM.INFO(pinno GP12)
then
? MM.INFO(pin GP12)

If either gives an error modify MM.STARTUP to exclude the HDMI pins from testing.

I don't have a HDMI setup so can't test.

It works without error on VGA
Edited 2024-10-26 08:19 by phil99
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 10:12pm 25 Oct 2024
Copy link to clipboard 
Print this post

for n=0 to 28
print  MM.Info$(pin n)
next
gives
RUN
Invalid
OFF
OFF
Invalid
OFF
OFF
OFF: Boot Reserved
OFF
Invalid
OFF: Boot Reserved
OFF: Boot Reserved
OFF: Boot Reserved
OFF: Boot Reserved
Invalid
OFF
OFF
Invalid
Invalid
Invalid
Invalid
Invalid
Invalid
Invalid
Invalid
Invalid
Invalid
OFF
OFF
Invalid
>
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 10:25pm 25 Oct 2024
Copy link to clipboard 
Print this post

try

For m=0 To 28
 n = MM.Info(pinno "GP"+Str$(m))
 print n,"GP"+Str$(m), MM.Info(pin n)
Next
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 10:48pm 25 Oct 2024
Copy link to clipboard 
Print this post

my actual vga usb options are
Connected to COM11 at 115200
> option list
PicoMiteVGA MMBasic USB Edition  6.00.00RC10
OPTION SERIAL CONSOLE COM2,GP8,GP9
OPTION AUTORUN  ON
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD UK, 0, 0, 600, 150
OPTION CPUSPEED (KHz) 378000
OPTION SDCARD GP13, GP10, GP11, GP12
OPTION AUDIO GP0,GP1', ON PWM CHANNEL 0
>

Phil
RUN
1     GP0     OFF: Boot Reserved
2     GP1     OFF: Boot Reserved
4     GP2     OFF
5     GP3     OFF
6     GP4     OFF
7     GP5     OFF
9     GP6     OFF
10    GP7     OFF
11    GP8     OFF: Boot Reserved
12    GP9     OFF: Boot Reserved
14    GP10    OFF: Boot Reserved
15    GP11    OFF: Boot Reserved
16    GP12    OFF: Boot Reserved
17    GP13    OFF: Boot Reserved
19    GP14    OFF
20    GP15    OFF
21    GP16    OFF: Boot Reserved
22    GP17    OFF: Boot Reserved
24    GP18    OFF: Boot Reserved
25    GP19    OFF: Boot Reserved
26    GP20    OFF: Boot Reserved
27    GP21    OFF: Boot Reserved
29    GP22    OFF
41    GP23    DOUT
42    GP24    DIN
43    GP25    HEARTBEAT
31    GP26    OFF
32    GP27    OFF
34    GP28    OFF
>
 
stanleyella

Guru

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

  disco4now said  
  stanleyella said  
don't work?
this wireless kb works but not the mouse pad

Your mouse is most likely on USB 2 not USB 3


Print "Device: 0=not used,1=Keyboard,2=Mouse,128=PS4,129=PS3,130=SNES/Generic"
Print "chan  device    VID     PID"
For x=1 To 4
Print x,MM.Info(USB x),Hex$(MM.Info(USB VID x),4),Hex$(MM.Info(USB PID x),4)
Next

> run
Device: 0=not used,1=Keyboard,2=Mouse,128=PS4,129=PS3,130=SNES/Generic
chan  device    VID     PID
1       1      046D    C52B
2       2      046D    C52B
3       0      046D    C52B
4       0      0000    0000
>
Test the mouse.

no=2 'Set correct mouse channel
MODE 2
Device mouse set no,MM.HRes\2,MM.VRes\2,0

Do
If DEVICE(MOUSE no,x) <> tmpx Or DEVICE(MOUSE no,y)
<> tmpy Then
Pixel tmpx,tmpy,0
Pixel DEVICE(MOUSE no,x),DEVICE(MOUSE no,y)
tmpx=DEVICE(MOUSE no,x)
tmpy=DEVICE(MOUSE no,y)
End If
Loop


the mouse demo works now and the micro wireless keyboard touch pad. yippee!
dunno why didn't work before when should . rc10 maybe? but it's nice it works!
maybe the usb adaptors from big to little.
I can think of uses... missile command :) but click icon like gui touch for whatever
thanks Peter for sorting. looking forward to checking new ain. stan

If DEVICE(MOUSE no,x) <> tmpx Or DEVICE(MOUSE no,y)
<> tmpy Then
has to be on one line
If DEVICE(MOUSE no,x) <> tmpx Or DEVICE(MOUSE no,y)<> tmpy Then
Edited 2024-10-26 09:59 by stanleyella
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6781
Posted: 06:31am 26 Oct 2024
Copy link to clipboard 
Print this post

Correct - HSTX (HDMI) pins are not GPIO pins and are not available. The Pico has probably disconnected them from the GPIO pin matrix and connected them to the HSTX peripheral internally so they no longer exist. :)
Mick

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

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 07:51am 26 Oct 2024
Copy link to clipboard 
Print this post

Thanks for confirming that Mick.

Stan, try this version for the Olimex HDMI board.
It should skip over the HDMI pins, but as I don't have one it is untested.

Sub MM.Startup
 Local Integer m, n
 For m=0 To 28
  if m=12 then m=20
  n = MM.Info(pinno "GP"+Str$(m))
  If MM.Info(pin n)="OFF" Then SetPin n, DIN, PULLUP
  print n,"GP"+Str$(m), MM.Info(pin n)
 Next
End Sub
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 09:02am 26 Oct 2024
Copy link to clipboard 
Print this post

For m=0 To 28
a$="mm.info(pin GP"+Str$(m)+")"
Print Eval(a$)
Next

Edited 2024-10-26 19:03 by matherp
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 02:18pm 26 Oct 2024
Copy link to clipboard 
Print this post

  phil99 said  Thanks for confirming that Mick.

Stan, try this version for the Olimex HDMI board.
It should skip over the HDMI pins, but as I don't have one it is untested.

Sub MM.Startup
 Local Integer m, n
 For m=0 To 28
  if m=12 then m=20
  n = MM.Info(pinno "GP"+Str$(m))
  If MM.Info(pin n)="OFF" Then SetPin n, DIN, PULLUP
  print n,"GP"+Str$(m), MM.Info(pin n)
 Next
End Sub


Phil. results, get one, they're tidy boards.
RUN
1     GP0     DIN
2     GP1     DIN
4     GP2     DIN
5     GP3     DIN
6     GP4     OFF: Boot Reserved
7     GP5     DIN
9     GP6     OFF: Boot Reserved
10    GP7     OFF: Boot Reserved
11    GP8     OFF: Boot Reserved
12    GP9     OFF: Boot Reserved
14    GP10    DIN
15    GP11    DIN
26    GP20    DIN
27    GP21    DIN
29    GP22    OFF: Boot Reserved
41    GP23    DOUT
42    GP24    DIN
43    GP25    HEARTBEAT
31    GP26    OFF: Boot Reserved
32    GP27    OFF: Boot Reserved
34    GP28    DIN
>
stan
 
     Page 15 of 24    
Print this page
© JAQ Software 2024