Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 00:40 06 Jul 2025 Privacy Policy
Jump to

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 : MCU speed - is it THAT important?

     Page 2 of 2    
Author Message
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 03:06pm 02 Aug 2014
Copy link to clipboard 
Print this post

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: Germany
Posts: 437
Posted: 04:05pm 02 Aug 2014
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 676
Posted: 05:03pm 02 Aug 2014
Copy link to clipboard 
Print this post

@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 Kingdom
Posts: 676
Posted: 05:44pm 02 Aug 2014
Copy link to clipboard 
Print this post

@ plasma

  Quote  
Btw if you need a fast routine so write your own and include it.


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 States
Posts: 74
Posted: 02:27am 03 Aug 2014
Copy link to clipboard 
Print this post

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: Romania
Posts: 1697
Posted: 03:11am 03 Aug 2014
Copy link to clipboard 
Print this post

  Goeytex said   Absolutely!...


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 Zealand
Posts: 9588
Posted: 01:28pm 03 Aug 2014
Copy link to clipboard 
Print this post

@ Goeytex -
Smoke makes things work. When the smoke gets out, it stops!
 
Lou

Senior Member

Joined: 01/02/2014
Location: United States
Posts: 229
Posted: 06:08am 04 Aug 2014
Copy link to clipboard 
Print this post

Goey,

I like the way you think.....

Lou
Microcontrollers - the other white meat
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4036
Posted: 12:26pm 04 Aug 2014
Copy link to clipboard 
Print this post

  Goeytex said   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 !

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 Kingdom
Posts: 2932
Posted: 01:24pm 04 Aug 2014
Copy link to clipboard 
Print this post

  JohnS said  
  Goeytex said  . . . the pressure on the tectonic plates will cause huge shift. . .

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!!

 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9588
Posted: 01:59pm 04 Aug 2014
Copy link to clipboard 
Print this post

@ WW:
Smoke makes things work. When the smoke gets out, it stops!
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4036
Posted: 09:24pm 04 Aug 2014
Copy link to clipboard 
Print this post

  WhiteWizzard said  
  JohnS said  
  Goeytex said  . . . the pressure on the tectonic plates will cause huge shift. . .

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 Kingdom
Posts: 2170
Posted: 12:49am 30 Nov 2016
Copy link to clipboard 
Print this post

  G8JCF said  
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.

Edited by CaptainBoing 2016-12-01
 
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 11:04pm 30 Nov 2016
Copy link to clipboard 
Print this post

  Quote  ..I've been reading the other thread about the bypic..


er, what is the other thread ?
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 11:31pm 30 Nov 2016
Copy link to clipboard 
Print this post

  Grogster said   Why do rotary encoders need speed?


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.Edited by Tinine 2016-12-02
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025