![]() |
Forum Index : Microcontroller and PC projects : MCU speed - is it THAT important?
![]() ![]() |
|||||
Author | Message | ||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
I think perhaps I've muddied up the MCU's execution speed with the language's execution speed. An interpreted language will always be slower than a compiled language's speed which will always be slower than assembler's speed. This matters because if a language's speed can approach that of Assembler, then there is the option to slow down the CPU clock and thus save precious power, eg if the uMite could handle a Rotary Encoder and do all the DDS calcs at 5MHz rather than 48 MHz, then the current(Power) would drop acordingly, Microchip claim that the 150MX uses approx 0.5 mA/MHz dynamic current (typical), so at 5 MHz, that's 2.5 mA, and at 48MHz, that's 24 mA, in practice I've seen DOUBLE these values, ie 5 mA at 5 MHz. So if the s/w is efficient, then the clock could be slowed down reducing the current consumption. So, for the best green option, use Assembler ! else use a compiled language. Peter The only Konstant is Change |
||||
plasma Guru ![]() Joined: 08/04/2012 Location: GermanyPosts: 437 |
Btw if you need a fast routine so write your own and include it. dont forget the development time , this is much moore important for me. I have no application which needs to be faster , only some functions which i wrote in C. |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
@plasma The question is about should be about what is most Green. Development effort is dependant, and hence Joules spent in the development phase, on the knowledge and skills of the developer(s). But, assuming that all developers are are equally skilled, (a hugely optimistic assumption when research has shown a 1000:1 difference), then it is the quality of the code which they produce which matters. Short development time, but inefficient run-time over the life time of the product is great news for the developer but not good news for the environment of the planet. A few mA here, a few more mA there when multiplied by billions of devices is a significant impact on the planet's CO2 footprint. Quick development time is not always beneficial for the Green life of the planet, IMHO. Peter The only Konstant is Change |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
@ plasma please explain how to do that in mmBasic. I'd really like to know how I can achieve a real performance boost. Many thanks Peter The only Konstant is Change |
||||
Goeytex Regular Member ![]() Joined: 12/05/2014 Location: United StatesPosts: 74 |
Absolutely! If we are not careful with the programming language we choose, or spend too much time in development, WE could be responsible for enough CO2 to tip the scale, causing the polar ice to melt and the seas to rise. As the seas rise, the pressure on the tectonic plates will cause huge shifts, releasing billions and billions of tons of magma. The magma will be concentrated in the western hemisphere causing the earth to tilt on its axis and begin to wobble. The wobble will increase in intensity and in speed, with the earth eventually wobbling so fast that it is slung out of orbit directly into the sun at tremendous speed. This will causes such a massive implosion that the sun will collapse upon itself and form a black hole that sucks up the rest of solar system. The density of the black hole will increase to the point that it swallows up the whole Galaxy and eventually the entire universe, ending existence itself ! Choose your programming language and chip platform very carefully ... |
||||
vasi![]() Guru ![]() Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
This is scary! ![]() Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9588 |
@ Goeytex - ![]() ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
Lou![]() Senior Member ![]() Joined: 01/02/2014 Location: United StatesPosts: 229 |
Goey, I like the way you think..... Lou Microcontrollers - the other white meat |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4036 |
Good grief, that must be the most unlikely scenario I've ever read!! Maybe you could lobby the German government to reverse its daft decision to burn so much extra fossil fuel (mainly coal)? Or the "green" organisations (Greenpeace & FoE) to stop being anti-science. John |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Hey John, Haven't you heard about the recent earthquake in China? All because Memberx is using ByPic, and Vasi using Pascal. Stick with MicroMite and MMBasic and we will survive as a human race!! ![]() |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9588 |
@ WW: ![]() ![]() ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4036 |
Good grief, that must be the most unlikely scenario I've ever read!! John Hey John, Haven't you heard about the recent earthquake in China? All because Memberx is using ByPic, and Vasi using Pascal. Stick with MicroMite and MMBasic and we will survive as a human race!! ![]() I don't read the Daily Mail or Socialist Worker Party News :) John |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2170 |
A few mA here, a few more mA there when multiplied by billions of devices is a significant impact on the planet's CO2 footprint. Quick development time is not always beneficial for the Green life of the planet, IMHO. I'll worry about a few milliamps when you can get my kids to turn lights off after them ![]() Yes we shouldn't waste energy and yes we should all have a fire in our bellies to get our projects to be as frugal as possible... but I won't be losing any sleep over a system that runs all year at a few hundred mA. The majority of kids today don't give a damn and leave the lights on everywhere and a good proportion are the un-educatable X Factor generation who will undo all yours and my good work in a single night. |
||||
isochronic Guru ![]() Joined: 21/01/2012 Location: AustraliaPosts: 689 |
er, what is the other thread ? |
||||
Tinine Guru ![]() Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
I have many servo motors running at up to 6,000RPM, fitted with 4096-line rotary encoders. That's 16,384 quadrature counts/rev @ 6,000 RPM (100 revs/sec)= 1,638,400 quadrature counts/sec. The PIC18F2331 features a hardware "QEI" (quadrature encoder interface) that is rated at 2.5M quadrature counts/sec. I have the ByPic 170(40MHz)and also the discontinued 370(80MHz). In both cases, I get more like 100,000 "lines/sec"...dunno if I'm doing something wrong, here. |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |