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 5 of 20 | |||||
Author | Message | ||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 297 |
The RGB(color) function returns a constant value for the specified color. That's how I understand it. I expect to get the current value for the color from the MAP(n) array of the color palette. But it doesn't change. Although it looks like I assigned a new value to an element of the array, but the value was not assigned. Print Map(1) Map(1)=16384 Print Map(1) Map Set Print Map(1) 128 128 128 > Edited 2024-11-30 21:16 by javavi |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9288 |
I explained it if you read what I wrote - it is not an array - the colour changes. The map function allows you to reference the changed colour using the same value you used in the MAP command MAP(1)=RGB(RED) PIXEL 0,0,MAP(1) 'outputs a red pixel If you want to know the colour of MAP(1) you need to maintain it in your program Edited 2024-11-30 21:23 by matherp |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 297 |
These variables are not variables, arrays are not arrays, they are very confusing to me, sorry. Then how do I get the current values for a given color palette? |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9288 |
V6.00.00RC4 PicoMiteRP2350V6.00.01RC4.zip PicoMiteRP2040V6.00.01RC4.zip Fixes cut-and-paste error in HDMI mode 4 buffer sizes causing crashes Re-engineers the real time system (TIME and DATE commands and functions and WEB NTP/RTC GETTIME) to avoid time loss when programs use functions that have to disable interrups MM.INFO(SDCARD) now returns "Not Configured" if the SDcard hasn't been set up MM.INFO(pinno GPn) now returns pins for HDMI allocated pins - you will still get errors if you try and use them New command OPTION MILLISECONDS ON/OFF (temporary defaults to OFF) This option enables millisecond output in the TIME$ function ie HH:MM:SS.mmm NB: the milliseconds are set to zero whenever the time is updated using the TIME command, WEB NTP command or RTC GETTIME command You can now use a layer in HDMI mode 4 (320x240 RGB555) MODE 4 FRAMEBUFFER layer FRAMEBUFFER write l Box 100,100,100,100,5,RGB(blue),RGB(red) FRAMEBUFFER write n GUI test lcdpanel Do Loop Edited 2024-11-30 22:36 by matherp |
||||
cosmic frog Senior Member Joined: 09/02/2012 Location: United KingdomPosts: 289 |
Hi Peter, I can't seem to get the VS1053 audio board to work on this version. It works ok on ver. PicoMiteV5.08.00 I've only tried it with MP3's PicoMite MMBasic RP2040 Edition V6.00.01RC4 OPTION SYSTEM SPI GP10,GP11,GP12 OPTION SDCARD GP13 OPTION AUDIO VS1053 GP2,GP3,GP4,GP9,GP8,GP7,GP6', ON PWM CHANNEL 1 Thanks. Dave. |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 517 |
Hi Peter, Thanks for the update, I confirm the crash has gone and also that FRAMEBUFFER works in MODE 4. :-) My Raspberry Pi keyboard, with built in hub also works, but not reliably in RESOLUTION 1280, so CPUSPEED 372000, about 1 in 5 times it is not recognised? Thanks for all your work on this update. Regards, Kevin. |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 517 |
Hi Peter, A sort of technical question, to which there may not be a straightforward answer? When using, for example, bubble, and writing directly to a HDMI 1280 screen, I get a update rate of say 339mS, basically whatever Mode 2 or 3, or 5, this will change with RESOLUTION, but exactly in line with CPU frequency. However if I start using a FRAMEBUFFER, in MODE 2, it makes no difference to the update rate, still 339mS maybe 1mS more, but basically the same. However if I change to MODE 5, this update rate drops dramatically to 515mS, so by working with a 25KB buffer, almost no time penalty, working with a 49KB buffer 176mS penalty. I realise you are moving more memory, but only an extra 25K, so if it only took 1mS to move 25K, why does it take 176mS to move 49K. Simirlarly with MODE 3, 339mS with no buffer, 604mS 98K buffer, so an extra 265mS (quarter of a second) to move an extra 73K (compared with MODE 2 25K). This is the same for all RESOLUTIONS whether HDMI or VGA? Bus contention? more work to do in the other modes? it just seems like a huge change, especially when working at the compiled code level, rather than, interpreted code, always assuming I've got my numbers right! Any ideas? Regards, Kevin. Edited 2024-12-01 01:48 by Bleep |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9288 |
This may be power supply or cable. It is rock solid for me but wasn't until I changed cable. Can't comment on the performance issue without thinking about it more and brain isn't available at the moment |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1307 |
Hmm, I still don't get a pin number for the HDMI assigned pins if I use a string for GPn. > GP$="GP22":? mm.INFO(pinno GP$) 29 > GP$="GP12":? mm.INFO(pinno GP$) Error : Invalid pin > GP$="GP12":? mm.INFO(pinno GP12) 16 But I'm happy with how it is now. Regards Michael Edited 2024-12-01 02:54 by twofingers causality ≠ correlation ≠ coincidence |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9288 |
Thanks for the report - will look at it. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9288 |
Dave Please try this and report PicoMite.zip Edited 2024-12-01 04:39 by matherp |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2183 |
mode 4 same RUN [44] Sprite READ 1,10,10,8,16 'reads sprite1 from screen to sprite buffer1 Error : Not available for this display mode > option list PicoMiteHDMI MMBasic USB RP2350A Edition V6.00.01RC4 OPTION SERIAL CONSOLE COM2,GP8,GP9 OPTION FLASH SIZE 4194304 OPTION COLOURCODE ON OPTION KEYBOARD UK OPTION CPUSPEED (KHz) 315000 OPTION AUDIO GP0,GP1', ON PWM CHANNEL 0 |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9288 |
That's because sprites are only available in RGB121 colour modes - the error is correct |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2183 |
I tried this but error 'simple scope gp26 ain. gp2 test signal mode 3 'play tone 1000,1000 SetPin GP2,pwm 1'this optional test signal comment out freq=100 PWM 1,freq,50 dim c%,x%,samples!(480) setpin gp26,ain 'SETPIN (34), AIn adc open freq*100,1 'samples per second FRAMEBUFFER CREATE F FRAMEBUFFER LAYER L FRAMEBUFFER WRITE L line 0,119,319,119,,rgb(green) line 159,0,159,239,,rgb(green) FRAMEBUFFER WRITE F do adc start samples!() 'get new samples 'trigger c%=0 do:If samples!(c%) > 0.1 then if samples!(c%+1) < 0.2 then exit do inc c%:loop while c%<160 math scale samples!(),239,samples!()'scale to 240 pixel height FRAMEBUFFER COPY L,F for x%=0 to 319 'screen width line x%,samples!(x%+c%),x%+1,samples!(x%+1+c%),,rgb(magenta) 'draw new sample from sample(c%) next x% FRAMEBUFFER COPY F,N loop RUN [13] FRAMEBUFFER LAYER L Error : Not enough Heap memory > |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9288 |
How big is a framebuffer in mode 3? Answer 150Kb. How much memory is there available? answer 180Kb. How will another 150Kb buffer fit into 30Kb of memory? - answer it won't. What error will this cause? - answer "Not enough Heap memory" |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2183 |
thanks peter, don't want to post sycophantic comments but your work has evolved pico mmbasic. star u r sir. |
||||
DaveJacko Regular Member Joined: 25/07/2019 Location: United KingdomPosts: 78 |
Trivial I'm sure, but can any 'civilians' (users) confirm my findings? 'option display' now seems to need the previously optional columns parameter. (although if you don't use 80 cols, the menu don't display fully) And maybe setpin/PWM behaviour has evolved beyond the current manual description? regards, Dave. Try swapping 2 and 3 over |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2183 |
OPTION DISPLAY lines [,chars] Set the characteristics of the display terminal used for the console. Both the LIST and EDIT commands need to know this information to correctly format the text for display. 'lines' is the number of lines on the display and 'chars' is the width of the display in characters. The default is 24 lines x 80 chars and when changed this option will be remembered even when the power is removed. Maximum values are 100 lines and 240chars. This command is only available if the display is not being used as a console by setting OPTION LCDPANEL NOCONSOLE |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2180 |
An observation on the WebMite RC4 date at bootup. It has changed from 01-01-2000 to 01-01-2024. If your programs are using that to indicate a need to get NTP they will need adjusting. Footnote added 2024-12-01 20:32 by phil99 Also applies to standard PicoMite, may well apply to all. |
||||
Chopperp Guru Joined: 03/01/2018 Location: AustraliaPosts: 1071 |
Thanks Phil Brian ChopperP |
||||
Page 5 of 20 |
Print this page |