|
Forum Index : Microcontroller and PC projects : ArmmiteH7 V5.05.06: MP3 playback
| Author | Message | ||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10572 |
2019-04-25_040132_Armmite1.3.zip 2019-04-25_040611_Armmite_H7_Manual.pdf This release includes a huge amount of conditional compilation to support the forthcoming ArmmiteF4 so it is possible (likely?) that I have introduced some bugs. Please report anything you find. To sweeten the pill I have included a full mp3 playback capability. The sound plays over the DAC outputs on pins PA4 and PA5. These will drive an external amplifier. PLAY MP3 filename$ [,interrupt_on_completion] 'filename$' is the MP3 file to play (the extension of .mp3 will be appended if missing). The MP3 file is played in the background. 'interrupt_on_completion' is optional and is the name of a subroutine which will be called when the file has finished playing. P.S DON'T ASK IF IT CAN BE CONVERTED TO A CFUNCTION - THE ANSWER IS NO It may be possible to include mp3 playback in the MMX code playing over the I2S I/F - a job for another day. |
||||
goc30![]() Guru Joined: 12/04/2017 Location: FrancePosts: 435 |
Hi peter good job!!! on pdf, page 21 for "OPTION LCDPANEL SSD1963_n_8BIT", you write "Selects 16-bit bus operation.... " I think it is "8bits" this relevant remark is only intended to prove that I read the documentation ![]() I have a most important pb it is "gui calibrate" function who don't work i have reloaded armite versus 25 sept 2018. it work correctly with new versus, it don't work my config OPTION LCDPANEL SSD1963_5_BUFF, RLANDSCAPE OPTION TOUCH 56, 123 OPTION SDCARD 114 |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10572 |
Thanks for the report - should be fixed in the update below 2019-04-25_204231_Armmite1.3.zip The manual is actually correct but I understand the confusion. This mode uses a framebuffer for the display with 8 bits per pixel (really 64 colours RGB222). However the bus communication is 16-bit as the controller doesn't have an 8-bit colour depth mode so I expand the 6 bits into the 16-bit RGB565 colour specification. I have also added another very small change LIST COMMANDS will list all valid ArmmiteH7 commands LIST FUNCTIONS will list all valid ArmmiteH7 functions and operators 2019-04-25_204400_Armmite_H7_Manual.pdf |
||||
goc30![]() Guru Joined: 12/04/2017 Location: FrancePosts: 435 |
Hi Peter new version is OK for me. Calibrate work! and "lists commands & list function" are very useful juste question for "pixel function" on Micromite Manual pixel draw 1 pixel in "c" color on h7 manual it is more confuse ans seem to be an loading b/w image in array and in my test, it draw 1 pixel b/w only (not in color) |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10572 |
Not sure I understand the question. On my ports you can use arrays as inputs to all drawing routines in order to speed up drawing by removing parsing overhead. Please see the attached code snippet which I hope explains how it works. The drawing commands will always draw the number of items in the smallest array except for colour when either an array or a single colour can be specified. In all cases an array index can of course be substituted for a single variable or literal. If any of the coordinate parameters to a drawing command are arrays then they must all be arrays or you will get an error (error : Dimensions) - only the colours may be single values in this case. Option explicit option default NONE cls dim x%(799),y%(799),y1%(1799),c%(799), i% for i%=0 to 799 'create x,y arrays of pixels with individual colours x%(i%)=i% y%(i%)= sin(rad(i%/800.0*720.0*pi))*50 +240 y1%(i%)=y%(i%)+40 c%(i%)=RGB(red) if i%<600 then c%(i%)=RGB(CYAN) if i%<400 then c%(i%)=RGB(GREEN) if i%<200 then c%(i%)=RGB(magenta) next i% 'test 1 array of pixels with array of colours timer=0 pixel x%(),y%(),c%() ' print timer 'test 2 - different size arrays of pixels with single colour timer=0 pixel x%(),y1%(),rgb(yellow) print timer 'test 3 - single pixels timer=0 for i%=0 to 799 pixel x%(i%),y%(i%)-40,rgb(red) next i% print timer PS you didn't include my ArmmiteF4 support in your latest version of the graphics test |
||||
goc30![]() Guru Joined: 12/04/2017 Location: FrancePosts: 435 |
Hi ok for pixel function I have put new version |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10572 |
Minor addition of an information function. I'll add this to other ports as and when. This also fixes a number of issues that occurred when a user defined function was called in the conditional test of a DO WHILE loop or in the parameters of a FOR-NEXT loop - thanks to Geoff for this fix. 2019-04-28_020513_Armmite1.3.zip 2019-04-28_005635_Armmite_H7_Manual.pdf ![]() ![]() |
||||
CircuitGizmos![]() Guru Joined: 08/09/2011 Location: United StatesPosts: 1427 |
I hope this goes into all MicroMites. Micromites and Maximites! - Beginning Maximite |
||||
goc30![]() Guru Joined: 12/04/2017 Location: FrancePosts: 435 |
i will put it on my prog |
||||
| seco61 Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 205 |
Hi Peter. A couple of comments on the H7 code now that I have played with it a bit. I was having random issues when loading a new program to the unit. Despite issuing the NEW command, I was seeing code listed with the LIST ALL command, or I was getting really strange errors and eventually had to do a firmware reload. I am using ST-Link to do the firmware loads. When I changed to OPTION FLASHPAGES 4 I have not seen a repeat of this behaviour. Also, I noticed that the first VAR SAVE command takes a considerable length of time - not an issue but as I had a WATCHDOG 1500 command I was continually resetting until I found the issue (now changed to WATCHDOG 5000). No doubt due to the time taken to rewrite a much larger flash area. I have also had no luck as yet using the SSD1963_5_8BIT driver (just hangs and I have to reload firmware). However SSD1963_5_16 works fine. Regards Gerard Regards Gerard (vk3cg/vk3grs) |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10572 |
I can't get ST-LINK to work with the H7 anymore even during development. I now exclusively use the method of copying the .BIN file to the disk Almost certainly a bug I have introduced with all the conditional compilation. I'm away from home at the moment but will look at it later in the week I'm going to have to cull a couple of the lesser used functions - no decision on what yet. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10572 |
Update to 5.05.06 that includes BIN2STR$() and STR2BIN(). Also fixes problem with SSD1963_5_8BIT driver and a bug when using VAR save with large arrays 2019-05-08_235659_Armmite1.3.zip 2019-05-08_235733_Armmite_H7_Manual.pdf Functions removed: SPC(): already marked as obsolete by Geoff - use SPACE$() MM.I2C2: use MM.I2C instead, this will be updated after any I2C or I2C2 command |
||||
goc30![]() Guru Joined: 12/04/2017 Location: FrancePosts: 435 |
ok for me (tomorrow I will test ssd193 v 8bits) |
||||
| seco61 Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 205 |
Hi Peter. I got the following error using the ssd1963_5_8bit type: > option lcdpanel ssd1963_5_8bit,l > backlight 50 Error: SSD1963 display only > option list OPTION LCDPANEL SSD1963_5_8BIT, LANDSCAPE OPTION SDCARD 110, 87 > Regards Gerard Regards Gerard (vk3cg/vk3grs) |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10572 |
That's easily fixed 2019-05-10_011522_Armmite1.3.zip |
||||
| seco61 Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 205 |
Thanks Peter. After the latest update I noticed some interesting timing differences when using the "graphics" test program. Some tests were significantly faster/slower using the various ssd1963_5 drivers: ************************** * Begin graphics test * SSD1963_5_8BIT SSD1963_5_16 SSD1963_5_BUFF SSD1963_5 ************************** Test 2 Pixel test colored in 02.847 Seconds 00.617 Seconds 03.934 Seconds 00.617 Seconds Test 3 Line test B/W (1pixel) in 00.056 Seconds 00.062 Seconds 00.065 Seconds 00.073 Seconds Test 4 Line test Color (1pixel) in 00.066 Seconds 00.066 Seconds 00.064 Seconds 00.075 Seconds Test 5 H/V Line test (rnd pixel) in 00.028 Seconds 00.027 Seconds 00.036 Seconds 00.075 Seconds Test 6 Rectangle test 1pixel b/w not filled in 00.278 Seconds 00.015 Seconds 00.427 Seconds 00.032 Seconds Test 7 Rectangle test 1pixel colored in 00.297 Seconds 00.265 Seconds 00.352 Seconds 01.128 Seconds Test 8 Rectangle test rounded 1pixel in 02.161 Seconds 00.394 Seconds 04.246 Seconds 01.453 Seconds Test 9 Rectangle test rnd width, color in 00.244 Seconds 00.281 Seconds 00.446 Seconds 01.237 Seconds Test 10 Circle test 1pixel not filled in 00.193 Seconds 00.307 Seconds 00.255 Seconds 00.821 Seconds Test 11 Circle test rnd width not filled in 00.239 Seconds 01.447 Seconds 00.325 Seconds 01.910 Seconds Test 12 Circle test colored not filled 1pixel in 00.180 Seconds 00.318 Seconds 00.233 Seconds 00.828 Seconds Test 13 Elipse test filled 1pixel in 00.208 Seconds 00.338 Seconds 00.258 Seconds 00.938 Seconds Test 14 Cls color test in 08.775 Seconds 08.059 Seconds 12.795 Seconds 36.224 Seconds Test 15 Text test simple b/w size=1 font=1 in 00.027 Seconds 00.021 Seconds 00.032 Seconds 00.040 Seconds Test 16 Text test xfonts b/w size=1 all fonts in 00.064 Seconds 00.054 Seconds 00.081 Seconds 00.161 Seconds Test 17 Text test color size=1 in 00.072 Seconds 00.052 Seconds 00.078 Seconds 00.122 Seconds Test 18 Text test colored rnd*size in 00.312 Seconds 00.172 Seconds 00.330 Seconds 00.721 Seconds Test 19 Text rotate test in 00.291 Seconds 00.233 Seconds 00.357 Seconds 00.568 Seconds Test 20 Text transparent test in 00.428 Seconds 00.964 Seconds 00.554 Seconds 01.575 Seconds Test 21 Triangles no bg test in 00.191 Seconds 00.189 Seconds 00.173 Seconds 00.208 Seconds Test 22 Triangles color bg test in 00.737 Seconds 00.415 Seconds 01.031 Seconds 01.123 Seconds Test 23 SPRITE function test in 03.744 Seconds 12.933 Seconds 05.030 Seconds 17.642 Seconds Test 24 Stars function test in 00.384 Seconds 00.416 Seconds 00.473 Seconds 00.720 Seconds Test 25 Elipses rnd function test in 01.476 Seconds 01.458 Seconds 01.549 Seconds 01.741 Seconds Test 26 Arcs function (1 pixel) test in 00.297 Seconds 00.218 Seconds 00.396 Seconds 00.248 Seconds Test 27 Arcs function (x pixels) test in 04.922 Seconds 03.187 Seconds 07.594 Seconds 03.690 Seconds Test 28 Beziers function test in 00.186 Seconds 00.107 Seconds 00.193 Seconds 00.115 Seconds Test 29 Gauges function test in 00.253 Seconds 00.243 Seconds 00.280 Seconds 00.300 Seconds ---------------------------------------------------------------------------------------------------------------- Total time test : 28.956 Seconds 32.858 Seconds 41.587 Seconds 74.385 Seconds The SPRITE tests only looked good on the "8BIT" and "BUFF" drivers. So the device driver to choose really depends on the type of graphics you want to use! Regards Gerard (vk3cg/vk3grs) |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10572 |
Definitely, and thanks for the data Simple graphics will always be quickest with the ordinary 16-bit driver. Buffered drivers will be slower as it is a two stage process: write to memory, write from memory to the display. However, buffered drivers will be much quicker when a read from the display is required. What the timings don't, of course , show is the visual impact of the update. Buffered drivers update a rectangular area containing the complete graphics element in one go minimising flashing and tearing. Moreover, using OPTION AUTOREFRESH you can control when updates take place.In the pixel test if you only updated the display every 1000 pixels then the buffered driver would be massively faster. However, as you say: horses for courses. |
||||
| seco61 Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 205 |
Another slight problem... > ? dir$("*.*") Error: Syntax > ? dir$("*.*",file) logom4.png The manual states that the type parameter is optional and defaults to file. Regards Gerard (vk3cg/vk3grs) |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10572 |
Try this: 2019-05-10_231917_Armmite1.3.zip I've also solved the number of functions and commands issue ![]() I'll make many of "my" commands and functions loadable and that way users can select which they need for a specific application. The LOAD FUNCTION and LOAD COMMAND commands cannot be used in a program for obvious reasons, but they can be put in MM.STARTUP so that they are set up as part of boot sequence and are then immediately available for use. There is no performance impact of this approach ![]() ![]() |
||||
| seco61 Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 205 |
That solution works well (just tested it!). Looking forward to the manual update with the list of "optional" functions and commands. Will there still be limit of 127 functions/commands even with this approach? By that I mean are we only able to load an extra couple of commands/functions or is it able to support any number of extras? Regards Gerard (vk3cg/vk3grs) |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |