![]() |
Forum Index : Microcontroller and PC projects : New PicoMiteVGA design
Page 1 of 3 ![]() ![]() |
|||||
Author | Message | ||||
al18 Senior Member ![]() Joined: 06/07/2019 Location: United StatesPosts: 228 |
Yesterday a new PicoMiteVGA design popped up on my YouTube feed. This design includes a MCP23017 for 16 pin I/O at http://land-boards.com/blwiki/index.php?title=PiPicoMite01#Assembly_Sheet The bare board is on sale on Www.Tindie.com |
||||
panky![]() Guru ![]() Joined: 02/10/2012 Location: AustraliaPosts: 1114 |
Very interesting and detailed information. The MMBasic v uPython is perhaps a little midleading - the Basic code example (with respect) is pretty clunky - if you use a for/next loop, the speed at the default 133MHz comes down to a bit over 1 second, less than twice that of uPython. Nice catch, Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
That's a very nice design, although I always feel that the SDcard should be easily accessible. It's a pointless feeling really, as how often do we want to remove or insert an SD card while the board is running? It's great to see the design so well documented too - I highly approve. I'm not one to judge the merits or otherwise of the software, being such a terrible programmer myself. :) The price of $12 + postage for a bare board feels a little steep to me, but I've no idea what's involved in selling on Tindie - there are probably charges. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
No mention at all of Geoff or Peter, who came up with and designed the original. The page almost makes it sound like they came up with the entire concept and the code. Perhaps I missed something, perhaps they did mention it, but I did not see it. I just like to give credit where credit is due, and I hate it when people DON'T. Smoke makes things work. When the smoke gets out, it stops! |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
True - I didn't see anything either. I didn't follow any of the links on the page so there may be something there, but it would have been nice to give credit on the main page. EDIT - I've added credits now. :) Geoff has already had problems with others monetizing his designs and it's not fair. Edited 2022-06-05 18:22 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Tinine Guru ![]() Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
Where is this comparison? I don't see it ![]() Craig |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
It's a video. Closer to the Python code: a=timer do while i<100000 inc i loop ? timer-a runs in 3732ms on a standard PicoMite VGA. It's not a very fair test. a=timer label: inc i if i<100000 then goto label ? timer-a runs in 7149ms That i=i+1 is a bummer. :) Edited 2022-06-05 21:41 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Tinine Guru ![]() Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
You beat me to it ![]() Just reading the uPython docs. Pretty cool how it can use the 2nd processor to run a thread ![]() Craig |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 633 |
you can also use integers for x, which gains a bit, also run at 252Mhz, which gains a lot. :-) Dim Integer x Dim Float a a=Timer Do While x<100000 Inc x Loop Print Timer-a Which gives 1668.3 mS The obvious thing to do is use a For loop. Dim Integer x,y Dim Float a a=Timer For x=0 To 100000 Inc y Next Print Timer-a Which gives 748.9 mS presumably because For loops are well optimised for the purpose. As you say though a very silly speed test. ' ' Edited 2022-06-05 22:43 by Bleep |
||||
Tinine Guru ![]() Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
I fail to see the "silly" bit. Two scripted languages. I didn't expect such a huge difference, TBH. Craig |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 633 |
Silly, because it is only testing a minuscule part of both languages! |
||||
Tinine Guru ![]() Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
Before I ever make those kind of statements, I usually have an example to back it up. Craig |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
I'd have been happier if he'd used as close as possible to the same construct in both languages. He's got MMBasic having to do a compare and a mathematical increment inside the loop and a conditional jump to a label to close it, whereas he has Python using a While loop and an inc (no compare and the loop is automatic). On the PicoMite it gives a difference of 3.7s against 10s. It would be difficult to write the MMBasic less efficiently or the Python more efficiently. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
FYI the GOTO command is not locked in RAM so has to go to flash to read the firmware. The fastest construct in Basic is the for LOOP as the 100000 is only read once whereas on a do while it is read each time through the loop The fastest do loop I can find is x%=100000 do inc x%,-1 loop while x% |
||||
Tinine Guru ![]() Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
It's irritating that these people are ignorant of the fact that BASIC has moved on. I wouldn't have used the goto/label cr@p back in the 80s, even. QuickBasic did away with the need for this. Craig |
||||
Michal Senior Member ![]() Joined: 02/02/2022 Location: PolandPosts: 125 |
It's worth trying something less trivial: PRINT "START" T=TIMER A=1.0 B=0.0 L=0 FOR I=0 TO 99 FOR J=0 TO 999 A=A+0.000001 B=B+SIN(A!) inc L NEXT J NEXT I PRINT "A ";A PRINT "B ";B PRINT "L ";L PRINT"Time MMBASIC=";TIMER-T;" msec" ======================================== START A 1.1 B 86706.20931 L 100000 Time MMBASIC= 10579.187 msec and: import math,time print("START") i: int j: int l: int t=time.ticks_ms() a = 1.0 b = 0.0 l = 0 for i in range(0, 100): for j in range(0, 1000): a=a+0.000001 b=b+math.sin(a) l=l+1 print("a ",a); print("b ",b); print("l ",l); print("Time MicroPython",time.ticks_ms()-t," msec"); ====================================================== START a 1.095367 b 86606.32 l 100000 Time MicroPython 4449 msec And see the results Michal |
||||
Michal Senior Member ![]() Joined: 02/02/2022 Location: PolandPosts: 125 |
duplicate Edited 2022-06-06 22:53 by Michal |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
It's what I love about benchmarks. You can design a compiler or interpreter to run benchmarks really well - and sacrifice real world performance in the process. How often would anyone actually run anything like any of these examples in the real world? You very often find that actual differences are virtually meaningless - especially if you have to wait for interaction with a user. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
Note that python appears to only be using single precision FP and the answer is therefore wrong/less accurate. (0.000001 * 100000 = This is slightly faster by the way Print "START" Dim integer i,j,l T=Timer A=1.0 B=0.0 L=0 For I=0 To 99 For J=0 To 999 Inc a,0.000001 Inc b,Sin(A) Inc L Next Next Print "A ";A Print "B ";B Print "L ";L Print "Time MMBASIC=";Timer-T;" msec" Edited 2022-06-06 23:12 by matherp |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5089 |
Amazing that uPython does not give a correct result for A. 100x1000x0.000001 = 0.1, so A should be exactly 1.1. Not 1.095. I would not design a bridge using uPyton... autch... Unless I am mistaken of coarse...? VGApicomite running at 252MHz solves this in 4.947 seconds. VGApicomite running at 126MHz solves this in 10.028 seconds. I have used integers for l,i and j (just as uPython) l%,i%,j% Volhout PicomiteVGA PETSCII ROBOTS |
||||
Page 1 of 3 ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |