![]() |
Forum Index : Microcontroller and PC projects : PicoMite V6.00.02 betas
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10063 |
I need an example of why it is a bad idea. If in pinctrl you set a pin to be used as an output (sideset or output) then it should be set as an output. Otherwise there is no way to make it an output from within the PIO program. We can have a discussion about pins set as SET pins because they can be controlled in a program but, in particular OUT pins cannot be controlled. I hit this problem developing the I2S code as a Basic program. Unless I forced the data pin to be contiguous with the sideset pins it wasn't an output and the code didn't work. This is a crazy limitation. Pins are only set as outputs if they are specified in pinctrl. If a pin is used as an input then don't specify it. As above, I'm happy to remove SET pins from the change if that makes the difference UPDATE How about this for a compromise? Any pin in pinctrl defined as a SET pin will NOT be configured as an output. Any OUT pin or SIDESET pin that is not also a SET pin WILL be configured as an output Edited 2025-01-21 19:18 by matherp |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4853 |
Hi Peter, I am so happy you are not mad at me. I wrote last post in the middle of the night, could not sleep because the issue kept spinning in my mind. And I may have been a little to blunt. My personal preference would be that you have an option in the PIO INIT MACHINE that either sets all output according your original plan, or not touch pindirs at all. Not for SET, not for SIDE SET, not for OUT. Since that mode is compatible with all existing PIO programs. I would prefer that mode to be default, since all existing programs would run unaltered. As I said before, there is a way to set datadirection of a single OUT pin, that is out of range for SET. Below is a section of the (manual assembled, so mnemonics will not directly work in PIO ASSEMBLER) PIONESS for PicoGameVGA (dual NES controller decoder running on PIO) where the GPxx pins are all over the place. '0 E081 'set pindir latch, out [side 0] '1 E000 'set latch low [side 0] '2 A0EB 'MOV null inverted to OSR [side 0] OSR = &hffffffff '3 6081 'OUT 1 bit OSR to pindirs [side 0] set clock to output (pindir = 1) line 2 and 3 perform this function. For completeness, the whole package. piones2.zip Regards, Volhout Edited 2025-01-21 20:50 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1139 |
![]() This happens to me all-too-often. I read what I posted and it comes across arrogant and confrontational...unintentionally ![]() |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 3996 |
It's pretty much the default for Yorkshire. Hopefully people realise it's being blunt, not meaning to be rude... John |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7499 |
Flippin' furriners - over on't wrong side 't Pennines... :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10063 |
V6.00.02b2 is now available on https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip Fixes occasional lock up with I2S Audio after ctrl-C when playing New SAVE PERSISTENT n% 'saves the value n% in memory that will survive a watchdog reset (RP2040 and RP2350) or a physical reset (RP2040 only) MM.INFO(PERSISTENT) ' recovers any value saved as above PIO INIT MACHINE pio%, statemachine%, clockspeed [,pinctrl] [,execctrl] [,shiftctrl] [,startinstruction] [,sideout [,setout] [,outout] sideout, setout, and outout can be set to 0 (default) or 1 to specify if pins defined in pinctrl should be initialised as inputs (0) or outputs (1) Please provide a SHORT program that demonstrates this issue - can't replicate Dim a%(9)=(1,2,3,4,5,6,7,8,9,10) Sub test Local b%=77 Edit File getfile() Print b% End Sub test Math v_print a%() Do Loop Function getfile() As string getfile="b:/solar_eclipse" End Function Edited 2025-01-22 20:38 by matherp |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4853 |
Thanks Peter, This is very much appreciated... Harm PicomiteVGA PETSCII ROBOTS |
||||
javavi![]() Guru ![]() Joined: 01/10/2023 Location: UkrainePosts: 436 |
Dim string T$(4) T$(1)="test.bas" test Do :Loop Sub test Print GetFile(1) Edit File GetFile(1) End Sub Function GetFile(index) As string GetFile=T$(index) End Function [13] GetFile=T$(index) Error : T is not declared Before PicoMite version 6.00.02 this worked fine. Edited 2025-01-23 03:39 by javavi |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1139 |
Just testing the "persistent" ![]() BUT... ![]() |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 3996 |
Dim string T$(4) T$(1)="test.bas" test Do :Loop Sub test Print GetFile(1) Edit File GetFile(1) End Sub Function GetFile(index) As string GetFile=T$(index) End Function [13] GetFile=T$(index) Error : T is not declared Before PicoMite version 6.00.02 this worked fine. Is it OK to "doubly specify" string? I expected either Dim string T(4) or Dim T$(4) I think it ought to be allowed but is it? John Edited 2025-01-23 07:45 by JohnS |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2415 |
Dim string T$(4) So not the issue. > T$(1)="test.bas" > ? T$(1) test.bas > Dim string z%(4) Error : Conflicting variable type > |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 3996 |
Dim string T$(4) So not the issue.> T$(1)="test.bas" > ? T$(1) test.bas > Dim string z%(4) Error : Conflicting variable type > That's not proof, sadly, though it makes it a bit more likely that it doesn't mind. Depends what the C code actually does. John |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10063 |
Its a bug I've introduced when I removed the size limit on EDIT FILE Will fix MATH PID CLOSE gives a syntax error - I wonder why? Perhaps the manual will help (page 128) |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1139 |
So it was a thing and now it's not? This has been running fine (without REMs on older firmware): ![]() I got it from the original example: ![]() Just tested with the REMs and works great ![]() The manual points to the original example which includes MATH PID CLOSE ![]() Edited 2025-01-23 11:10 by PhenixRising |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4853 |
@Peter, Thanks for the functional framebuffer L in mode 1. Volhout PicomiteVGA PETSCII ROBOTS |
||||
electricat![]() Senior Member ![]() Joined: 30/11/2020 Location: LithuaniaPosts: 294 |
setup --> PICO2 RP2350A , HDMI, USB For some reason, there is no picture after flashing with PicoMiteHDMIUSBV6.00.02b2.uf2 Nuked, flashed, re-nuked, re-flashed several times, re-downloaded archive - no picture. Flashing back 2024-12-30_183756_PicoMiteRP2350V6.00.01 --> PicoMiteHDMIUSBV6.00.01.uf2 and everything again works OK. Not a first time I am flashing firmwares. But I am lost this time. (Was highly interested to test I2S sound) My MMBasic 'sand box' |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10063 |
Just tested and it works fine for me. Try OPTION RESET |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10063 |
I've re-uploaded V6.00.02b2 on https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip Fixes a bug when passing a function as a parameter to EDIT FILE in a program. No other changes |
||||
electricat![]() Senior Member ![]() Joined: 30/11/2020 Location: LithuaniaPosts: 294 |
It might be something with my HW then (hand made PCB, simplified. With unpopulated MCP2221A, adafruit HDMI adapter, cheap but acceptable DS1307 ). Tried FW you just uploaded - no picture. Tried different monitor - no joy. Repeatedely flashed to official PicoMiteHDMIUSBV6.00.01 and picture comes back imediately. For RP2350A I shoud use this file, yes ? -- > PicoMiteHDMIUSBV6.00.02b2.uf2 It might be interestig for You, what people are making: my home made toy :) ![]() ![]() ![]() ![]() My MMBasic 'sand box' |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10063 |
Boot 6.00.02b2 as normal and even though there isn't a picture type MODE 2 Tell me what happens please |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |