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.
I just went down to Jaycar yesterday and picked up the mini Maximite kit. Fascinating little thing, I use to program Apple][ in BASIC, it takes me back! First thing I noticed was the PIC32 chip runs quite hot to touch even when just sitting there not running anything other than at the MMBASIC prompt. Running the Vcc off at 2.96volt power supply. Is there a way to get at one of the lower power modes that PIC32 supports via MMBASIC?
I also observed a slight slowdown in execution speed when I did the upgrade from MMBASIC version 2.7 to version 3.1.
A simple test loop I ran to toggle the I/O pins, went from about 1640ms under 2.7 to 1738ms on 3.1, so I though it worth a mention.
This is the code:
10 Timer=0
100 For i = 0 To 999
200 For x = 1 To 20: Pin(x)=1:Pin(x)=0:Next x
300 Next i
500 Print Timer "ms for " (i) " iterations"
djuqa Guru Joined: 23/11/2011 Location: AustraliaPosts: 447
Posted: 11:31am 18 Mar 2012
Copy link to clipboard
Print this post
Welcome to this forum and the exciting world of 32bit Basic microcomputers.
1/ 2.96v for the 3.3v VCC is a little so PIC32 will run hotter than normal, but PIC32 can still function at quite high temps.
2/The low power modes are not currently accessible via MMBasic.
Edited by djuqa 2012-03-19VK4MU MicroController Units
BobD Guru Joined: 07/12/2011 Location: AustraliaPosts: 935
Posted: 05:50pm 18 Mar 2012
Copy link to clipboard
Print this post
a 6% decrease in speed but v3.1 gives you a lot more capability if you can manage to remove the line numbers from your programs. They are optional in V3.1 and you may even get back the decrease in speed without them.
Try this:
Timer=0
For i = 0 To 999
For x = 1 To 20: Pin(x)=1:Pin(x)=0:Next x
Next i
Print Timer "ms for " (i) " iterations"
I tried without line numbers, exactly the same execution time as with line numbers, I expect as you say, that the introduction of more functionality in 3.1 has caused a small speed reduction.
I noticed it because I am interesting in receiving data from an RC 2.4Ghz receiver, manipulating the data, and controlling outrunner motors with Electronic Speed Controllers, that need short pulses between 1-2ms as often as 50 to 400Hz. I know that it can be done in C or assembler pretty easily, but I was curious how fast the I/O in MMBASIC was.