![]() |
Forum Index : Microcontroller and PC projects : PicoMite V6.01.00 betas
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10364 |
V6.01.00b6 PicoMiteV6.00.03b6.zip Fixes bug when changing HDMI modes Fixes bug in DEVICE SERIALTX when pins other than GP0 are used Implements PLAY ARRAY PLAY ARRAY l%(), r%(), freq [,start] [,end] [,terminationinterrupt] This requires packed arrays (could be the same array for left and right) of 16 bit values in the range -32768 to 32767 and outputs the values in the array at the sample frequency specified. If the optional parameter 'start' is specified then the arrays are output from packed location 'start' If the optional 'end' is specified then the arrays are output until the packed location 'end' is reached If the optional parameter 'terminationinterrupt' is specified then the subroutine specified will execute once the last array element has been output. It is important to understand the 'freq' parameter. This is the rate at which each array element is output. So for example, if the array contained 10 cycles of a sine wave with 18000 total samples then setting the frequency to 1800 would output a 1Hz sine wave for 10 seconds. Setting the frequency to 18000 would output a 10Hz sine wave for 1 second. |
||||
twofingers![]() Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1613 |
Well explained! It remains to be added that "PLAY VOLUME" also works. Thanks again! Michael causality ≠ correlation ≠ coincidence |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5156 |
@Peter, Thanks ! Volhout P.S. no need to do anything about following, just a remark. On the 6.00.03 VGA PS2 version, when NO PS2 mouse is defined in OPTION MOUSE, and no mouse is opened with MOUSE OPEN, the DEVICE(MOUSE 2,x/y/l/r) functions do not report an error. I am happy with it (saves me to handle the error) but I was simply surprised. Edited 2025-08-08 03:55 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
twofingers![]() Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1613 |
Regarding "PLAY ARRAY" Hi Peter, One more small thing. (I hope I'm not being too annoying!). ![]() For me, as a non-native speaker, the name of the FREQ parameter isn't clear. Perhaps "output rate" (because it refers to the speed at which the data is played back, not the frequency of the audio signal itself) would be a more appropriate term? If you leave it as it is, that's fine. I've figured it out by now. Regards Michael causality ≠ correlation ≠ coincidence |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5156 |
Dear Peter, In the above provided ZIP there are 2040 and 2350 releases. The file names all designate 6.00.03(b6). The firmware shows OPTION LIST as 6.01.00. As such that is not a big issue, but there is a bug in this 2350 firmware, that is not in the last 6.00.03 firmware for 2350. The bug: The 6.01.00 in a 2350 equipped Game*Mite, after OPTION RESET GAMEMITE the SD card cannot be accessed (shared SPI with touch/lcd). The error says something like "error in the low level driver". After putting the last 6.00.03 in the unit all works. Again, this is the microcontroller version of the firmware, no HDMI/VGA/USB. This problem is only with 2350, the 2040 version does not suffer from it. Volhout Edited 2025-08-08 20:23 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
JanVolk Senior Member ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 251 |
Thanks, Peter. I see that the RAM LIST problem on the RP2350B has been resolved after a cold boot with PicoMite MMBasic RP2350B Edition V6.01.00b6. Do you also have an explanation for why the RP2040 has the LCD backlight option 0 in the options list? > option list PicoMite MMBasic RP2040 Edition V6.01.00b6 OPTION SYSTEM SPI GP10, GP11, GP12 OPTION SYSTEM I2C GP20, GP21 OPTION COLOURCODE ON OPTION HEARTBEAT OFF OPTION CPUSPEED (KHz) 200000 OPTION DISPLAY 43, 80 OPTION LCD BACKLIGHT 0 OPTION SD CARD GP19 > Regards, Jan. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10364 |
Please try setting the options by hand and report findings |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5156 |
Hi Peter, Yes, that worked. I did and OPTION LIST, and put the result in a text file. I did a OPTION RESET, and after that re-entered all OPTION's manually in the order of the text file, and the Game*Mite worked. Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10364 |
V6.01.00b7 PicoMiteV6.01.00b7.zip Should fix OPTION RESET for LCD based RP2350 variants Should fix spurious Backlight in OPTION LIST Corrects naming |
||||
JanVolk Senior Member ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 251 |
Problem solved after option reset. > option list PicoMite MMBasic RP2040 Edition V6.01.00b7 OPTION SYSTEM SPI GP10,GP11,GP12 OPTION SYSTEM I2C GP20,GP21 OPTION COLOURCODE ON OPTION HEARTBEAT OFF OPTION CPUSPEED (KHz) 200000 OPTION DISPLAY 43, 80 OPTION LCD BACKLIGHT 0 OPTION SDCARD GP19 > option reset > option list PicoMite MMBasic RP2040 Edition V6.01.00b7 OPTION COLOURCODE ON OPTION CPUSPEED (KHz) 200000 > option list PicoMite MMBasic RP2040 Edition V6.01.00b7 OPTION SYSTEM SPI GP10,GP11,GP12 OPTION SYSTEM I2C GP20,GP21, SLOW OPTION COLOURCODE ON OPTION HEARTBEAT OFF OPTION CPUSPEED (KHz) 200000 OPTION DISPLAY 43, 80 OPTION SDCARD GP19 > Regards, Jan. |
||||
dddns Guru ![]() Joined: 20/09/2024 Location: GermanyPosts: 554 |
Hello, I'm writing an application which runs in Resolution 1280 Mode1 and in Mode 3. I'm having a problem when switching the Mode within my program when a Framebuffer was created and Framebuffer write f was executed. In Mode 1 the memory is not released when closing the Framebufffer: For t=0 To 3 Print t,"start",MM.Info(heap) MODE 3 FRAMEBUFFER create FRAMEBUFFER write f Print t,"open3",MM.Info(heap) Pause 500 FRAMEBUFFER close Print t,"close3",MM.Info(heap) MODE 1 FRAMEBUFFER create FRAMEBUFFER write f Print t,"open1",MM.Info(heap) Pause 500 FRAMEBUFFER close Print t,"close1",MM.Info(heap) Next t Result without PSRAM: 0 start 187648 0 open3 72448 0 close3 187648 0 open1 72448 0 close1 72448 1 start 72448 [4] FRAMEBUFFER create Error : Not enough Heap memory with PSRAM: 0 start 6479104 0 open3 6363904 0 close3 6479104 0 open1 6363904 0 close1 6363904 1 start 6363904 1 open3 6248704 1 close3 6363904 1 open1 6248704 1 close1 6248704 2 start 6248704 2 open3 6133504 2 close3 6248704 2 open1 6133504 2 close1 6133504 3 start 6133504 3 open3 6018304 3 close3 6133504 3 open1 6018304 3 close1 6018304 It works in Resolution 800 and enabled PSRAM: Total of 6 Mbytes PSRAM available > RUN 0 start 6392576 0 open3 6152448 0 close3 6392576 0 open1 6392576 0 close1 6392576 1 start 6392576 1 open3 6152448 1 close3 6392576 1 open1 6392576 1 close1 6392576 2 start 6392576 2 open3 6152448 2 close3 6392576 2 open1 6392576 2 close1 6392576 3 start 6392576 3 open3 6152448 3 close3 6392576 3 open1 6392576 3 close1 6392576 PicoMiteHDMI MMBasic USB RP2350B Edition V6.01.00b7 OPTION SERIAL CONSOLE COM2,GP8,GP9 OPTION SYSTEM I2C GP4,GP5 OPTION BAUDRATE 230400 OPTION FLASH SIZE 16777216 OPTION COLOURCODE ON OPTION KEYBOARD GR OPTION PICO OFF OPTION RESOLUTION 800x600 @ 360000KHz OPTION DISPLAY 50, 100 OPTION SDCARD GP1, GP2, GP3, GP0 OPTION AUDIO GP6,GP7', ON PWM CHANNEL 3 OPTION RTC AUTO ENABLE OPTION F9 flash run 3 OPTION PSRAM PIN GP47 |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10364 |
Thanks for the report and test program - easily solved ![]() |
||||
dddns Guru ![]() Joined: 20/09/2024 Location: GermanyPosts: 554 |
Many thanks! I'm having another issue when using: on error skip 1 mode 3 ... It will continue executing the program but the previous created framebuffer is erased after the skip. But I'm not sure if this is the right way to do it? |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10364 |
A mode change re-configures the system in quite a major way. Before it can do anything it closes all framebuffers. If, after that there is an error they are going to be closed. You would have to recreate them in case of an error. In general, I hate ON ERROR, IMHO it is a lazy way of avoiding coding properly. Again IMHO the only valid use is for errors that relate to things external where you can't control them like a I2C device going offline. |
||||
dddns Guru ![]() Joined: 20/09/2024 Location: GermanyPosts: 554 |
I don't like it either but how can I determine, what the device is capable of? I went through the list up and down but there is no "mm.info(psram) or (mode) nor (resolution)". Is it somehow possible to detect? I'm blind..I will simply use the heap info. Sorry To know the resolution setting would be nice ;) Edited 2025-08-11 23:46 by dddns |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10364 |
MM.HRES/MM.VRES |
||||
JanVolk Senior Member ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 251 |
dddns, I think there's enough general information available about the Psram, see overview, but no mm.info about the Psram. PicoMite MMBasic RP2350B Edition V6.01.00b7 Copyright 2011-2025 Geoff Graham Copyright 2016-2025 Peter Mather Total of 6 Mbytes PSRAM available > memory Program: 0K ( 0%) Program (0 lines) 300K (100%) Free Saved Variables: 16K (100%) Free RAM: 0K ( 0%) 0 Variables 0K ( 0%) General 6492K (100%) Free > flash list Slot 1 available Slot 2 available Slot 3 available > ram list RAM Slot 1 available RAM Slot 2 available RAM Slot 3 available RAM Slot 4 available RAM Slot 5 available > option list PicoMite MMBasic RP2350B Edition V6.01.00b7 OPTION SYSTEM I2C GP4,GP5, SLOW OPTION FLASH SIZE 16777216 OPTION COLOURCODE ON OPTION PICO OFF OPTION CPUSPEED (KHz) 150000 OPTION DISPLAY 43, 90 OPTION LCDPANEL SSD1306I2C, LANDSCAPE OPTION SDCARD GP9, GP10, GP11, GP24 OPTION PLATFORM Olimex RP2350B-XXL OPTION PSRAM PIN GP8 Regards, Jan. |
||||
dddns Guru ![]() Joined: 20/09/2024 Location: GermanyPosts: 554 |
Without knowing the current mode? I think my solution is to set it to Mode 3 at the program start and then looking for mm.hres before continuing in Mode 1? Anyway, not that important. EDIT:I wanted to say resolution I have another issue reading from an open file as input. If the line contains a "," then the next line will be read and the current line ends at this point. This could be a default delimiter and maybe it could be changed but I don't know as I can't see how to. I there a solution? Edited 2025-08-12 03:18 by dddns |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4064 |
Sounds like it's the actual program code you use so please post a short example so people can suggest an alternative. John |
||||
dddns Guru ![]() Joined: 20/09/2024 Location: GermanyPosts: 554 |
Sounds like it's the actual program code you use so please post a short example so people can suggest an alternative. John Hello John, I have to admit that I'm not familiar with writing/reading from file. If it would happen while output I could work around.. > list Dim a$ = "test,test1" Dim b$ Open "test.txt" For output As #1 Print #1,a$ Close #1 Open "test.txt" For input As #1 Input #1,b$ Close #1 Print b$ > run test > list "test.txt" test,test1 |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |