Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:26 26 Dec 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.01 release candidates - please test thoroughly

     Page 11 of 21    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9293
Posted: 05:58pm 09 Dec 2024
Copy link to clipboard 
Print this post

The ds18B20 issue is trivial - been away but will issue fix when convenient
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9293
Posted: 06:52pm 10 Dec 2024
Copy link to clipboard 
Print this post

V6.00.01RC6

THIS VERSION WILL DELETE ALL OPTIONS

PicoMiteRP2040V6.00.01RC6.zip

PicoMiteRP2350V6.00.01RC6.zip

Fixes bug in Onewire subsystem.
OPTION PS2 PINS becomes OPTION KEYBOARD PINS and can only be used when the PS2 keyboard is disabled (OPTION KEYBOARD DISABLE)
OPTION MOUSE can only be used when the PS2 mouse is disabled (OPTION MOUSE DISABLE)
GUI TEST LCDPANEL now works on WebMite (for me at least)
Edited 2024-12-11 04:52 by matherp
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 300
Posted: 08:18pm 10 Dec 2024
Copy link to clipboard 
Print this post

  matherp said  V6.00.01RC6
OPTION PS2 PINS becomes OPTION KEYBOARD PINS and can only be used when the PS2 keyboard is disabled (OPTION KEYBOARD DISABLE)

After installing the firmware, the command
OPTION LIST
does not display the full list of assigned options, including the configured PS/2 keyboard on the default pins.

When setting up options with pins for your circuit, sometimes you run into pins already used by the system. It would be nice to have a built-in command that provides information about the state of the pins. For example, this one
PINS LIST

Edited 2024-12-11 06:19 by javavi
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1314
Posted: 08:48pm 10 Dec 2024
Copy link to clipboard 
Print this post

  javavi said  ... When setting up options with pins for your circuit, sometimes you run into pins already used by the system. It would be nice to have a built-in command that provides information about the state of the pins. ...

Something like Harms Freepins()?
Sub FREEPINS()
Local integer n,p
Local string gp$,pu$
For n=0 To 29
 gp$ = "GP"+Str$(n)
 On error skip
 p = MM.Info(pinno gp$)
 If Not MM.Errno Then
    pu$ = MM.Info(pin p)
 Else
    p=-1
    pu$=MM.ErrMsg$
 EndIf
 Print gp$;@(50,MM.Info(vPOS)) p, pu$
Next
End Sub

I have integrated it into your filemanager.

Best regards
Michael
causality ≠ correlation ≠ coincidence
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9293
Posted: 10:41pm 10 Dec 2024
Copy link to clipboard 
Print this post

  Quote  does not display the full list of assigned options, including the configured PS/2 keyboard on the default pins.

Option list does not show defaults for anything and won't
 
JanVolk
Senior Member

Joined: 28/01/2023
Location: Netherlands
Posts: 166
Posted: 09:52pm 11 Dec 2024
Copy link to clipboard 
Print this post

Peter,

After updating on an RP2350 with HDMI and USB on an Olimex module to PicoMiteHDMI MMBasic USB RP2350A Edition V6.00.01RC6, the serial port is not automatically reset after an option change, which means that all the nonsense appears on the screen the first time.
By restarting the module and also TeraTerm, everything works fine again. (no beep from TeraTerm USB reset)

One more point. What is SDS in the pin list with Boot Reserved : SYSTEM I2C SDS?
I think it's SDA?

> option list
PicoMiteHDMI MMBasic USB RP2350A Edition V6.00.01RC6
OPTION SERIAL CONSOLE COM2,GP8,GP9
OPTION SYSTEM I2C GP0,GP1
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD US
OPTION CPUSPEED (KHz) 315000
OPTION HDMI PINS  1, 3, 7, 5
OPTION SDCARD GP22, GP6, GP7, GP4

> freepins
GP 0     1      Boot Reserved : SYSTEM I2C SDS
GP 1     2      Boot Reserved : SYSTEM I2C SCL
GP 2     4      OFF
GP 3     5      OFF
GP 4     6      Boot Reserved : SPI SYSTEM MISO
GP 5     7      OFF
GP 6     9      Boot Reserved : SPI SYSTEM CLK
GP 7    10      Boot Reserved : SPI SYSTEM MOSI
GP 8    11      Boot Reserved : CONSOLE TX
GP 9    12      Boot Reserved : CONSOLE RX
GP10    14      OFF
GP11    15      OFF
GP12    16      Boot Reserved : HDMI
GP13    17      Boot Reserved : HDMI
GP14    19      Boot Reserved : HDMI
GP15    20      Boot Reserved : HDMI
GP16    21      Boot Reserved : HDMI
GP17    22      Boot Reserved : HDMI
GP18    24      Boot Reserved : HDMI
GP19    25      Boot Reserved : HDMI
GP20    26      OFF
GP21    27      OFF
GP22    29      Boot Reserved : SD CS
GP23    41      DOUT
GP24    42      DIN
GP25    43      HEARTBEAT
GP26    31      OFF
GP27    32      OFF
GP28    34      OFF
GP29    44      AIN

> list
Sub FreePins
 Local n,gp$,p,pu$
 For n = 0 To 29
   gp$ = "GP" + Str$((n),2)
   p   = MM.Info(pinno gp$)
   pu$ = MM.Info(pin p)
   Print gp$,Str$((p),2),pu$
 Next
End Sub


Greetings,
Jan.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4347
Posted: 08:55am 12 Dec 2024
Copy link to clipboard 
Print this post

@Peter,

In the last (2040 VGA RC6) version the logic analyzer DEMO mode does not work anymore.
Demo mode uses the PIO to sample input pins GP0..GP5 and uses PWM output at the same time on these pins.

For this purpose the pins are configured as PWM pins and NOT as PIO pins. PIO only reads the pins in the background.

That used to work, but not anymore.
I have confirmed that the PWM works on GPx pins. But PIO does not see these anymore.
In fact, the PIO cannot read any input signals anymore.
Not even when SETPIN GPx,PIO1 is performed.

This seriously invalidates PIO.

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9293
Posted: 09:18am 12 Dec 2024
Copy link to clipboard 
Print this post

Please try setting the pins as inputs. Pins default to OFF which turns off everything. Setting them as PIO enables them for output but not input.
Edited 2024-12-12 19:22 by matherp
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4347
Posted: 09:43am 12 Dec 2024
Copy link to clipboard 
Print this post

Hi Peter,

No, when setting SETPIN GPx,DIN the PIO also does not see input signals.

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9293
Posted: 09:45am 12 Dec 2024
Copy link to clipboard 
Print this post

I'm confused. Are you physically wiring the PWM pins to the PIO inputs or are you assuming they can be read without wires?
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4347
Posted: 09:52am 12 Dec 2024
Copy link to clipboard 
Print this post

Hi Peter,

The logic analyzer (DEMO mode) outputs PWM signals at GP0,1,2,3,4,5 (3 PWM's,6channels) as demo signals.

In the background the PIO reads the pins GP0...GP5 and displays the signals on the logic analyzer screen.

That did work (just confirmed my Pico is not dead by running 5.09.00RC5).

But the essential problem now (RC6) is that even if I stop the PWM's, and configure the pins GP0..GP5 as PIO, or DIN, I cannot read anything in the PIO. PIO is disconnected from the input pins. Regardless SETPIN.

I remember that in 5.07.xx you made a fix that allows PIO to read pin status regardless  the SETPIN command. Maybe that feature got lost somewhere in the 6.00.01 series ? I remeber that I succesfully ran the logic analyzer in 6.00.00 series. MAy even be a toolchain issue ? Maybe in the pin direction/function register there is a bit that connects PIO directly to the pin, that got changed.

I use this function (PIO can read, MMBasic can control) a lot to start and stop PIO state machines. I.e. in the frequency counter on GP22. MMBasic is set for DOUT, where the state machine uses this as gate signal.

Volhout
Edited 2024-12-12 19:56 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9293
Posted: 09:59am 12 Dec 2024
Copy link to clipboard 
Print this post

When pins are set as outputs (e.g. PWM) the input capability is turned off. Therefore PIO can't read them (logically except for your demo purposes there is no real reason why you should be able to).

If you set your PIO to read pin A and PWM on pin B and connect a wire between A and B it should work if A is set as an input (not PIO). I will make a change so that A can be set as an input OR PIO.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4347
Posted: 10:09am 12 Dec 2024
Copy link to clipboard 
Print this post

Peter,

If I connect GPx to a 3.3V power supply, regardless of what I do, PIO does not see a high level in 6.00.01b6. It is always 0.
Regardless if I set pin to PIO1,DIN or whatever. PIO is deaf.

About the capability of PIO to read pins when MMBasic drives them...
- this functionality existed in 5.09.00
- it does not exist anymore
- this feature is also used in the PIO chapter in the user manual (EXAMPLE PROGRAM 3). In case this functionality is lost, I need to carefully check and adapt that section before it is published.

Volhout
Edited 2024-12-12 20:15 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9293
Posted: 10:16am 12 Dec 2024
Copy link to clipboard 
Print this post

Please provide me a simple test program and I'll look at it some more
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4347
Posted: 10:47am 12 Dec 2024
Copy link to clipboard 
Print this post

Hi Peter,

This is one of the first excersizes in the PIO training course 3 years ago.

'disconnect ARM from GP0. - 1000Hz / 1500Hz Square Wave
SetPin gp0,pio1

'configure pio1
p=Pio(pinctrl 0,1,,,,gp0,)
e=Pio(execctrl gp2,0,31)
f=1000 * 6 'Hz

'line code comment
' 0   E081 SET GP0 output
' 1   E001      SET gp0 high
' 2   00C5      JMP (GP2=1) to 5, (skip instructions 3 & 4)
' 3   E001      SET gp0 high
' 4   E000      SET gp0 low
' 5   E000      SET gp0 low
' 6   0001      JMP to 1


'program pio1
PIO program line 1,0,&hE081
PIO program line 1,1,&hE001
PIO program line 1,2,&h00C5
PIO program line 1,3,&hE001
PIO program line 1,4,&hE000
PIO program line 1,5,&hE000
PIO program line 1,6,&h0001


'write the configuration (note we added "e")
PIO init machine 1,0,f,p,e,,0

'start the pio1 code
PIO start 1,0


'toggle GP2 in MMBasic
SetPin gp2,dout
SetPin gp8,fin

Do
 Pin(gp2) = Not Pin(gp2) 'toggle pin GP2
 'Print Pin(gp8)
 Pause 2000
Loop

End


It uses GP2 (MMBasic) to control the frequency of a tone generated by PIO. Potentially you can use GP8 (wire) to measure the frequency. But a speaker connected to GP0 is easier (audio).

It is also tested on normal PicoMite (non VGA). Due to the bug, the output tone is 1000 (from pin 8 reading). On 5.09.00 the reading toggles between 1000 and 1500.

Volhout

P.S. you may need to set the CPUCLOCK to 133MHz...
Edited 2024-12-12 21:01 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9293
Posted: 11:17am 12 Dec 2024
Copy link to clipboard 
Print this post

The example gives the same issue. GP2 is an output so it isn't an input and can't be read. The PIN function gets round this by reading the state of the output latch but the PIO is trying to read the input itself.
Again, if GP2 was being externally controlled in a real application the example would work.
You can demo this by setting GP2 as an input and then connecting it to GND or VCC in which case the code works
'disconnect ARM from GP0. - 1000Hz / 1500Hz Square Wave
SetPin gp0,pio1

'configure pio1
p=Pio(pinctrl 0,1,,,,gp0,)
e=Pio(execctrl gp2,0,31)
f=1000 * 6 'Hz

'line code comment
' 0   E081 SET GP0 output
' 1   E001      SET gp0 high
' 2   00C5      JMP (GP2=1) to 5, (skip instructions 3 & 4)
' 3   E001      SET gp0 high
' 4   E000      SET gp0 low
' 5   E000      SET gp0 low
' 6   0001      JMP to 1


'program pio1
PIO program line 1,0,&hE081
PIO program line 1,1,&hE001
PIO program line 1,2,&h00C5
PIO program line 1,3,&hE001
PIO program line 1,4,&hE000
PIO program line 1,5,&hE000
PIO program line 1,6,&h0001


'write the configuration (note we added "e")
PIO init machine 1,0,f,p,e,,0

'start the pio1 code
PIO start 1,0


'toggle GP2 in MMBasic
SetPin gp2,din
SetPin gp8,fin

Do
' Pin(gp2) = Not Pin(gp2) 'toggle pin GP2
Print Pin(gp8)
Pause 2000
Loop

End
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4347
Posted: 11:32am 12 Dec 2024
Copy link to clipboard 
Print this post

  matherp said  The example gives the same issue. GP2 is an output so it isn't an input and can't be read.


This worked in 5.07,xx 5.08.00, 5.09.00, and not anymore. The RP2040 is capable. Something disables this function.



Maybe this is disabled in the new toolchain for compatibility to 2350.
I will ask Geoff remove the applicable section in the user manual for 6.00.01.
I will revert back to 5.09.00 since I need this function.

Thank you for your support. Sorry to be such a problem maker...

Volhout
PicomiteVGA PETSCII ROBOTS
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2181
Posted: 11:35am 12 Dec 2024
Copy link to clipboard 
Print this post

There is something odd going on with regular DIN also.

This command line test works on some recent firmware versions and not on others.
PicoMiteVGA MMBasic RP2040 Edition V6.00.00RC16
Copyright 2011-2024 Geoff Graham
Copyright 2016-2024 Peter Mather

> setpin gp6,din,pullup :pause 10 : ? pin(gp6)
0
> setpin gp2,din,pullup :pause 10 : ? pin(gp2)
0
> setpin gp3,din,pullup :pause 10 : ? pin(gp3)
0
> setpin gp7,din,pullup :pause 10 : ? pin(gp7)
0
> setpin gp7,off
> humid gp7,t,h,1 :? t,h
22.6    15
>

With a meter connected to the pins there is 3.23V with the pullup. The pins do work as inputs for Humid, I2C etc. and DOUT. Just DIN playing up.

Also I can confirm that PIO could read any output pin in the past.
Edited 2024-12-12 21:38 by phil99
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9293
Posted: 11:36am 12 Dec 2024
Copy link to clipboard 
Print this post

Just needs the words "if set as inputs" added
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9293
Posted: 11:39am 12 Dec 2024
Copy link to clipboard 
Print this post

  Quote  There is something odd going on with regular DIN also.

Works fine for me - same version
 
     Page 11 of 21    
Print this page
© JAQ Software 2024