![]() |
Forum Index : Microcontroller and PC projects : PicoMite V6.00.02 betas
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9957 |
The error is correct. You have set GP1 as the I2S BCLK and then in the library are trying to use it for something else. |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4809 |
@Peter, Last post I added 2 ZIP's. The one that uses PIO ASSEMBLE 1,"mnemonics" (the classical one) assembles now correct. But with your new PicoMite.uf2 the new code throws an error. There is something wrong with .side_set RUN 0: A02B 1: 20A0 2: 0043 3: 00C2 4: A0C9 5: 8000 0 0 5 [161] _side_set 1 '1 side set bit Error : Unknown command Looks like a similar translation issue. Regards, Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9957 |
Will post update in a few mins Edited 2025-02-02 19:37 by matherp |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9957 |
PicoMiteRP2040V6.00.02b6.zip This now works for the old version On the new version replace ".side_set" with ".side set" to be consistent with other directives and the official syntax. Also you have spurious "" on a .line command. After these changes it works. Download from Geoff's site also updated with all RP2040 versions Edited 2025-02-02 20:46 by matherp |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4223 |
Hi Peter, Why does this: ? Mm.Version Print the trailing zero on this: 6.000204 0 Running on "PicoMiteVGA MMBasic USB RP2040 Edition v6.00.02b4" . Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4223 |
And again, Should Mode 2 clear the display if already in Mode 2 ? It doesn't, but I think it should, however I've been wrong before ![]() Running on "PicoMiteVGA MMBasic USB RP2040 Edition v6.00.02b4" . Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9957 |
Because the variable is MM.VER not MM.Version I'm in 2 minds about this one. First it did and now it doesn't. But it could again - who knows? |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4223 |
Ah ... the parser (and my memory) was obviously slacking. I'm in 2 minds about this one. First it did and now it doesn't. But it could again - who knows? I think there are existing programs (PETSCII Robots for one) that assume it will clear the display, but it's not a massive deal. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9957 |
The problem is that if the mode command actions when the mode is the same it will close framebuffers, reset colour maps, clear tiles (mode 1), etc.. This can be a pain during development so I made the decision that a mode change to the same mode is a NOP. |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4223 |
I can see your problem and I don't know whether it should clear the data-structures or not; I can make an argument either way since sometimes you want all that stuff clearing without having to do it piecemeal. Perhaps less controversial could it just act as a CLS rather than a NOP and leave the data structures intact ? Edited 2025-02-02 22:26 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9957 |
Too complex. Does it also clear a layer buffer or leave that showing? I think it has to be all or nothing |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4809 |
Tom, In robots603 I already added the CLS. It was especially confusing since in PETSCII we do a new RUN, clearing everything, but now except framebuffers since the MODE 2 does not do it anymore. I would have expected RUN to clear everything. It is also confusing if you run multiple of javavi's VGA demo's, Most of them run in mode 2. So if you stop one, and run a new one, there is leftovers from the previous. My personal opinion in this is not important, but I understood the previous implementation better. Now you are forced to adapt your code to clear everything manual. Volhout PicomiteVGA PETSCII ROBOTS |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4223 |
That would have met the principle of least surprise. On balance I agree. I certainly implemented an equivalent to the previous behaviour in MMB4L and I *think* that is how the CMM2 behaved. Best wishes, Tom Edited 2025-02-03 00:07 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9957 |
I'll revert to a full clear if that is the consensus |
||||
JanVolk Senior Member ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 213 |
PicoMiteHDMI MMBasic USB RP2350A Edition V6.00.02b6 Copyright 2011-2025 Geoff Graham Copyright 2016-2025 Peter Mather > new > option list PicoMiteHDMI MMBasic USB RP2350A Edition V6.00.02b6 OPTION SERIAL CONSOLE COM2,GP8,GP9 OPTION SYSTEM I2C GP20,GP21 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 OPTION AUDIO I2S GP1,GP5', ON PWM CHANNEL 0 > list pins GP0 1 OFF GP1 2 Boot Reserved : I2S BCLK GP2 4 Boot Reserved : I2S LRCK GP3 5 OFF GP4 6 Boot Reserved : SPI SYSTEM MISO GP5 7 Boot Reserved : I2S DATA GP6 9 Boot Reserved : SPI SYSTEM CLK GP7 10 Boot Reserved : SPI SYSTEM MOSI GP8 11 Boot Reserved : CONSOLE TX GP9 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 Boot Reserved : SYSTEM I2C SDA GP21 27 Boot Reserved : SYSTEM I2C SCL 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 > memory Program: 0K ( 0%) Program (0 lines) 180K (100%) Free Saved Variables: 16K (100%) Free RAM: 0K ( 0%) 0 Variables 0K ( 0%) General 228K (100%) Free > flash list Slot 1 available Slot 2 available Slot 3 available > library list > list system i2c [LIBRARY] Pin(gp1)=1 Error : Pin 2/GP1 is not an output > > load "i2cscanner.bas > i2cscanner HEX 0 1 2 3 4 5 6 7 8 9 A B C D E F 00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > > list Sub i2cscanner Print " HEX 0 1 2 3 4 5 6 7 8 9 A B C D E F" For y = 0 To 7 Print " "; Hex$(y, 1); "0: "; For x = 0 To 15 addr = y * 16 + x I2C Write addr, 0, 1, &H00 If MM.I2C = 0 Then If addr = 0 Then Print "-- "; If addr > 0 Then Print Hex$(addr, 2);" "; Else Print "-- "; EndIf Next x Next y End Sub > My own i2c scanner works fine and no errors on an RP2350 with HDMI and USB and Audio I2S. A possibility may be that there is still something in the memory that has not been properly erased due to a leak. Or do I have to manually clear the memory with a .uf2 file (should be in the update list for RP2040 and RP2350) or option reset and enter it manually? Tested on other boards without Audio I2S, it works fine so far. Does anyone have any other ideas? Greetings, Jan |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 521 |
I have found a bug, I think: MODE 3 16 colours with a resolution of 640 x 480 (RP2350 only) does not work, just a black screen on ALL my monitors and TVs. If I am typing (blind) "MODE 1" and ENTER, the screen suddenly appears again (in mode 1).. But MODE 3 isn't working. V6.00.02b6 OPTION LIST OPTION SYSTEM I2C GP14,GP15 OPTION FLASH SIZE 4194304 OPTION COLOURCODE ON OPTION KEYBOARD GR OPTION MOUSE GP27,GP28 OPTION CPUSPEED (kHz) 315000 OPTION SDCARD GP13,GP10,GP11,GP12 OPTION AUDIO GP6,GP7 OPTION COUNT GP0,GP1,GP2,GP3 Tested on my own PCB, which works fine with older versions: ![]() Greetings Daniel |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9957 |
Thanks - will fix Will have a look - think I may have left a diagnostic in Edited 2025-02-03 08:47 by matherp |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4809 |
Hi Amnesie, Does your board use a DS1307? Not a DS3132 ? Looks like it has a crystal. PS2 keyboard AND PS2 mouse ? Schematics ? Volhout Edited 2025-02-03 17:06 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4809 |
@Peter, The beta6 from Geoff's site compiles and runs PIO. Both classic style, and new style (after changing labels to .label, and .side_set in .side set). And of coarse removing the """ I forgot. Also nice that the built in editor colors the nmemonics correctly. No coloring for the .directives yet, but the mnemonics is already very nice. Volhout Edited 2025-02-03 18:18 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 521 |
Does your board use a DS1307? Not a DS3132 ? Looks like it has a crystal. PS2 keyboard AND PS2 mouse ? Schematics ? Volhout Hi, no it is not a DS1307 it is a PCF8563. There is one thing I hate: Cheap counterfeit China Modules. You can get the (in all ways superior) DS3231 cheap, but try to get the genuine for under 10€ (mouser 12€). The PCF8563 in contrast costs 75 cents here in Germany (from NXP). For better accuracy I left 2 optional capacitors for tuning, if needed. Yes my board has PS/2 keyboard AND PS/2 mouse. On the bottom layer of the PCB there is an audio power amplifier, too. And I didn't used a schottky diode for reverse polarity protection but a p-ch-mosfet. Sorry I've got no schematics, I did it for myself, but if there is interest I will do a schematic. Greetings Daniel Edited 2025-02-03 18:47 by Amnesie |
||||
![]() ![]() ![]() ![]() |
![]() |