Searching \ for '[PIC] Programming for minimal energy consumption?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devprogs.htm?key=programming
Search entire site for: 'Programming for minimal energy consumption?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Programming for minimal energy consumption?'
2007\07\17@110431 by Matthew Rhys-Roberts

flavicon
face
Is anyone here interested in writing code that consumes the minimum
possible power? e.g. Variable clock speeds, making use of
wake-on-interrupt type features instead of endless loops waiting for an
event, etc.

I wonder how to get this sort of thing to catch on in popularity.

Matt



2007\07\17@113128 by Jan-Erik Soderholm

face picon face
Isn't it "popular", when needed ??

Jan-Erik.

Matthew Rhys-Roberts wrote:
{Quote hidden}

2007\07\17@114157 by Russell McMahon

face
flavicon
face
> Is anyone here interested in writing code that consumes the minimum
> possible power? e.g. Variable clock speeds, making use of
> wake-on-interrupt type features instead of endless loops waiting for
> an
> event, etc.

People are and people do, but unless being powerless gives you a
thrill, there's usually only a point to it in ultra long battery life
applications.

> I wonder how to get this sort of thing to catch on in popularity.

Promote more ultra long battery life applications :-)

Why would you wish to promote such perversity? :-)


       Russell

2007\07\17@175903 by Chris McSweeny

picon face
To what end? My code does do this where necessary - I use wake from sleep,
less than maximum clock speeds (using an AVR currently, where max clocks are
a lot higher than the equivalent PIC :-)) and even run the chip at a low
voltage in order to eke out my coulombs as I'm using battery power, and
worried about runtime (though most of the coulombs still get eaten by the
high power LEDs).

However the idea that it's something which should be encouraged in general
smells a bit like a carbon footprint crusade. In which case given the
generally minimal energy used by uCs anyway, maybe you should consider the
tradeoff between making the code more efficient against the time spent doing
so whilst sitting at a high power device like a PC!

2007\07\18@043924 by Matthew Rhys-Roberts

flavicon
face
Hi Chris,

Thanks for that perspective. I'm just interested in saving power at
every possible chance as a good habit, and am interested to learn more
about doing it with all sorts of different processors.

Sure, PCs are far too hot & hungry, I think we went wrong somewhere.

cheers
Matt

Chris McSweeny wrote:
{Quote hidden}

2007\07\18@091302 by Goflo

picon face

---- Matthew Rhys-Roberts <spam_OUTmattTakeThisOuTspamnu-ins.com> wrote:
> Thanks for that perspective. I'm just interested in saving power at
> every possible chance as a good habit, and am interested to learn more
> about doing it with all sorts of different processors.
>
> Sure, PCs are far too hot & hungry, I think we went wrong somewhere.

Additional perspective - 1st computer I got to play with, circa 1960,
occupied three large 3-story buildings, one of which was the power
supply and HVAC for untold thousands of vacuum tubes... (My Dad
took me to work).

This was at the the Bureau of Standards, NIST these days. It'd be
interesting to know how the power consumption of these monsters
compares to todays crunchers, say in watts per instruction cycle.
Bet there's a lot of zeros in front of the current figure.

regards, Jack

2007\07\18@092424 by Michael Rigby-Jones

picon face


>-----Original Message-----
>From: .....piclist-bouncesKILLspamspam@spam@mit.edu [piclist-bouncesspamKILLspammit.edu]
>On Behalf Of Matthew Rhys-Roberts
>Sent: 18 July 2007 09:37
>To: Microcontroller discussion list - Public.
>Subject: Re: [PIC] Programming for minimal energy consumption?
>
>
>Hi Chris,
>
>Thanks for that perspective. I'm just interested in saving power at
>every possible chance as a good habit, and am interested to learn more
>about doing it with all sorts of different processors.
>
>Sure, PCs are far too hot & hungry, I think we went wrong somewhere.

Unfortunately to get the processing power required for modern operating systems and applications, the resulting complexity and clock speeds inevitably mean high power consumption.

If we were still happy to run DOS/CPM on 8086 CPUs running at 4.77MHz, then undoubtedly a modern implementation could be run from a few pen cells.

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2007\07\18@101046 by David VanHorn

picon face
> If we were still happy to run DOS/CPM on 8086 CPUs running at 4.77MHz, then undoubtedly a modern implementation could be run from a few pen cells.


ZCPR!  :)

2007\07\18@101336 by Russell McMahon

face
flavicon
face
> Additional perspective - 1st computer I got to play with, circa
> 1960,
> occupied three large 3-story buildings, one of which was the power
> supply and HVAC for untold thousands of vacuum tubes... (My Dad
> took me to work).

I didn't get near anything "real" for almost  a decade after that, and
it was a lot less real than your father's one. I believe that history
now describes it as an IBM BCD mini-computer, type number lost to me
*The* university computer had so little memory that the FORTRAN
compiler (what else) had to be run in two passes with only half being
able to reside in memory at a time. I don't know how the functionality
of the two passes was partitioned.

Note that it does even addition by table lookup. That's dumb :-) -
even the most basic of uprocessors can add.

Gargoyles ...
Ah. IBM 1620

   "... IBM 1620 with all of 20k decimal digits of storage and a FP
multiply time of 10 ms. ..."

It looked remarkably modern considering

       http://others.servebeer.com/misc/IBM1620.jpg

I think the dial on the right controlled the rinse cycle.

____________

The 1620 is the first computer experience for a many students, as
witnessed at the above link. The minimum memory on a 1620 is 20000
digits. The maximum memory is 60000 digits. The 1620 takes two digits
to store one alphanumeric character. The 1620 machine is supported by
an arithmetic unit that uses a decimal table-look-up instead of binary
adders. Initially IBM intends to name the 1620 as the CADET, but when
this becomes translated into "Can't Add, Doesn't Even Try" and the
name is dropped soon after.(20)

_____________

Looks a bit less modern here with the wide view showing you the
accompanying typewriter (I'm sure they thought it was an operator's
console, but it';s definitely a typewriter :-) ).

If you think the 1st PICs were bad, read this :-)

       http://en.wikipedia.org/wiki/IBM_1620


      http://www.columbia.edu/acis/history/1620.html

IBM.
1959 - 1970
RIP

       http://www-03.ibm.com/ibm/history/exhibits/mainframe/mainframe_PP1620.html

Good

       http://foodman123.com/h1620.htm


       Russell












2007\07\18@102333 by Xiaofan Chen

face picon face
On 7/18/07, Michael Rigby-Jones <.....Michael.Rigby-JonesKILLspamspam.....bookham.com> wrote:
> Unfortunately to get the processing power required for modern
> operating systems and applications, the resulting complexity and
> clock speeds inevitably mean high power consumption.

That is very true.

> If we were still happy to run DOS/CPM on 8086 CPUs running at
> 4.77MHz, then undoubtedly a modern implementation could be run
> from a few pen cells.
>

The thing is that a full PC has other peripherals which consume power.

A full-blown PC XT which is the oldest modle I've ever seen contains
the monitor and a 10M Harddisk and two 5" Floppy drive and some other
peripherals like a keyboard. Even a modern implementation of these
things will consume more power than pen cells can provide.

On the other hand, a smart phone or PDA probably is more powerful
than many old PCs in terms of CPU processing power.

Xiaofan

2007\07\18@104330 by Kevin Timmerman

flavicon
face

>If we were still happy to run DOS/CPM on 8086 CPUs running at
>4.77MHz, then undoubtedly a modern implementation could be run from
>a few pen cells.


A 14 year old implementation can run on 2 AA batteries... The HP 100lx / 200lx

http://en.wikipedia.org/wiki/HP_200lx
http://www.daniel-hertrich.de/200lx/





2007\07\18@105315 by Russell McMahon

face
flavicon
face
>> If we were still happy to run DOS/CPM on 8086 CPUs running at
>> 4.77MHz, then undoubtedly a modern implementation could be run
>> from a few pen cells.

> The thing is that a full PC has other peripherals which consume
> power.

> A full-blown PC XT which is the oldest modle I've ever seen contains
> the monitor and a 10M Harddisk and two 5" Floppy drive and some
> other
> peripherals like a keyboard. Even a modern implementation of these
> things will consume more power than pen cells can provide.

Even an original "IBM PC" * was somewhat power hungry.
There were many low integration level IC's, many being standard power
TTL. The 8088 processor was not overly low power, although certainly
not in the same 'class' as the modern ampere guzzlers. There was still
a monitor and keyboard. No mouse at first, nor even a floppy drive.
The dynamic memory IC's (4116) - all 16 kB of them originally, were
also somewhat power hungry per byte. I think an original IBM power
supply would have been rated at approaching 100 Watts.

Add in cards such as a Hercules monochrome graphics card, which
provided an amazing super high resolution 640 x 480 display** , used
dozens of TTL ICs.

A set of 2 AH Alkaline or NimH pen cells would indeed have run the
system - but only for a few minutes. (2AH x 6V = 12 WH. 12/50W say ~=
15 minutes but capacity vastly derated due to high load so say about 5
minutes with a little luck.)


       Russell

* I have one in my "museum".

** Any colour you like, as long as it's green. (Although some did try
yellow!)



2007\07\18@105856 by Russell McMahon

face
flavicon
face
> ... The minimum memory on a 1620 is 20000
> digits. The maximum memory is 60000 digits. The 1620 takes two
> digits
> to store one alphanumeric character.


So, *the* university computer had 10 kB * of main (or any other)
memory.

Talk about uphill, both ways, in the snow, no shoes, bottom of a lake,
cardboard box, ...



       Russell



* 9.765 kB actually.


2007\07\18@110217 by Michael Rigby-Jones

picon face


>-----Original Message-----
>From: EraseMEpiclist-bouncesspam_OUTspamTakeThisOuTmit.edu [piclist-bouncesspamspam_OUTmit.edu]
>On Behalf Of Xiaofan Chen
>Sent: 18 July 2007 15:23
>To: Microcontroller discussion list - Public.
>Subject: Re: [PIC] Programming for minimal energy consumption?
>
>
>A full-blown PC XT which is the oldest modle I've ever seen
>contains the monitor and a 10M Harddisk and two 5" Floppy
>drive and some other peripherals like a keyboard. Even a
>modern implementation of these things will consume more power
>than pen cells can provide.

The modern implementaion of these things would surely be flash based given the very low memory requirements.  Good quality and low power display technology is still a problem of course, the larger TFT's still consume a fair bit of power, or at least the back lights do.

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2007\07\18@113307 by Alan B. Pearce

face picon face
>*The* university computer had so little memory that the FORTRAN
>compiler (what else) had to be run in two passes with only half
>being able to reside in memory at a time.

I remember a colleague describing how he made the Cross Assembler that RCA
provided, that was written in Fortran, for the CD1800 series micros, run on
a PDP11/34 with 8kB of memory, and 2 8" floppy drives. It read one character
from the source file, munched away with program overlays, decided if it
could proceed, munched away with program overlays, rinse and repeat until it
decided it had an assemblable instruction, munched away with overlays, wrote
something to destination file, rinse and repeat for next line ...

Apparently it took an age to assemble a file, but it may have been faster
than having the source on punched tape.

Later on the memory got increased to 16kB, and he could ease up on the
program overlays, and consequently ran much faster. I think the 8kB was also
core, and the 16kB was semiconductor memory, so somewhat faster cycle time.

2007\07\18@121013 by Goflo

picon face

---- Kevin Timmerman <@spam@listsKILLspamspampcmx.net> wrote:
> A 14 year old implementation can run on 2 AA batteries... The HP 100lx / 200lx
>
> http://en.wikipedia.org/wiki/HP_200lx
> http://www.daniel-hertrich.de/200lx/

NEC 8201a  laptop:

1983, 240X64 LCD, 8085 uP, 3 banks of 32k RAM + 128k external
expansion, 4 AAs will run it roughly 20 hours. Still works, and still
gets used for troubleshooting serial async projects (75-19200
baud serial port).

best regards, Jack  

2007\07\18@122839 by wouter van ooijen

face picon face
> I remember a colleague describing how he made the Cross
> Assembler that RCA
> provided, that was written in Fortran, for the CD1800 series
> micros, run on
> a PDP11/34 with 8kB of memory, and 2 8" floppy drives. It
> read one character
> from the source file, munched away with program overlays,
> decided if it
> could proceed, munched away with program overlays, rinse and
> repeat until it
> decided it had an assemblable instruction, munched away with
> overlays, wrote
> something to destination file, rinse and repeat for next line ...

Hmmm

8Kb is 4k PDP11 instructions and the CD1800 is no exactly a complex
instruction set.

I recall a 'dirty dog' Z80 assember (for the ZX81) that fitted in a 2732
(or it might even have been a 2716). Z80 is a much complexer isntruction
set!

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu



2007\07\18@130128 by Robert Rolf

picon face
wouter van ooijen wrote:
>>I remember a colleague describing how he made the Cross
>>Assembler that RCA
>>provided, that was written in Fortran, for the CD1800 series
>>micros, run on
>>a PDP11/34 with 8kB of memory, and 2 8" floppy drives. It
>>read one character

You probably meant 'line'.

>>from the source file, munched away with program overlays,
>>decided if it
>>could proceed, munched away with program overlays, rinse and
>>repeat until it
>>decided it had an assemblable instruction, munched away with
>>overlays, wrote
>>something to destination file, rinse and repeat for next line ...

More likely it was scanning the file for instructions/labels in the first pass,
then loading an overlay to handle the 'goto label' for the second.
But yeah, it was quite a pain as the O/S swapped in and out to make room
for the application program and it's scratch space.
Rewriting the application properly would have saved a HUGE amount of time
(been there, did that).
>
> Hmmm
>
> 8Kb is 4k PDP11 instructions and the CD1800 is no exactly a complex
> instruction set.
>
> I recall a 'dirty dog' Z80 assember (for the ZX81) that fitted in a 2732
> (or it might even have been a 2716). Z80 is a much complexer isntruction
> set!

Not surprising given that the PDP11 floppy drive controller (RX02) was pretty
brain dead and had a large binary driver instead.

OTOH the RT11 O/S was all of 3kW in total. And the instruction set was
pretty orthogonal (all instructions operated on all registers in all
addressing modes. You wiped ALL memory with ONE instruction placed at
the highest location. "Mov -(PC),-(PC)" =016767Q, copied the current instruction
to the previous location, and with the predecrement, the PC ended
up pointing to the new copy.)

Robert

2007\07\18@130340 by Walter Banks

picon face
Wow IBM 1620 and programming for minimal energy consumption
in the same message.

Sure brings back memories. The IBM Fortran compiler was a
beast. We mostly used QueensTran written  at Queen's
University (Kingston Ontario) It was a pass and a half sort of.
The fortran compiler was on cards and loaded followed by the
user fortran program (separated with a coloured card). The
compiler pass translated  the Fortran source into punched card
deck in IBM1620 machine code. The "compiled" program was
loaded into the computer followed by a library deck. The loader
was a linking loader that was selective about what was actually
loaded from the library deck as it was all read.

The IBM 1620 was not reliable it was very noisy and hot. The
typewriter on the model I (in many cases used as a printer)
was a standard typewriter with solenoids to pull the keys in
computer output mode.

It had lots of lights (Hot incandescent lights) on the front panel.
You typed the binary card bootstrap directly in with the console
typewriter.

I wrote a couple compilers for the IBM1620. One was a
load and go fortran that worked quite well for small projects.
because the compiler stayed in memory and compiled to memory
and ran. The compiler and application used the same libraries.
(Do that in 20,000 digits :) Created a variation on this compiler
that was a primitive interpreted basic.

The fad thing to do at the time was to create an analog computer
replacement simulator that ran on a digital computer (that used
analog gates). The one I wrote was implemented as a compiler
that emitted Fortran (want to count the passes and card decks
on this one )  A few years later we did some serious work using
this as an analog simulator. It was being used on Byte Craft's
PDP11 up to the late 80's when PC's took over.

The core memory in the IBM1620 had about the volume of a
basketball (20k digits)

The IBM1620 actually had quite a good instruction set and
was easy to write code for. Its variable length numerical fields
were especially fun. I once wrote a fibonacci evaluator, a smart
one that periodically checked and made the numerical fields
longer as needed. (major speed up) It took most of a weekend
to evaluate 2100 terms. fib(2100)

You could rent the monster for $60/hour at a time that
construction workers were making $1.35 / hour

Thanks for the memories

Walter..





Russell McMahon wrote:

{Quote hidden}

> -

2007\07\18@134015 by alan smith

picon face
I've done it already.....typically you do this when you have a battery operated device

Jan-Erik Soderholm <KILLspamjan-erik.soderholmKILLspamspamtelia.com> wrote:  Isn't it "popular", when needed ??

Jan-Erik.

Matthew Rhys-Roberts wrote:
{Quote hidden}

2007\07\23@204028 by Peter Todd

picon face
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Jul 17, 2007 at 03:58:49PM +0100, Matthew Rhys-Roberts wrote:
> Is anyone here interested in writing code that consumes the minimum
> possible power? e.g. Variable clock speeds, making use of
> wake-on-interrupt type features instead of endless loops waiting for an
> event, etc.
>
> I wonder how to get this sort of thing to catch on in popularity.

I've done a decent amount of that stuff, but usally it's nothing more
than sleeping and wait for an interrupt, otherwise I don't use, or know
of, any tricks to keep power down. Only thing is I've heard running at
high speed, IE 8mhz, and doing whatever task quickly is better than
running at low speed, never measured it myself though.

I did once have to run a PIC at 1mhz rather than 8mhz to save power, but
that was primarily because I messed up on my power dissipation
calculations for my 7805 and it was getting too hot. Easier to just slow
down the oscillator than change the code to use sleeps and what not.

- --
http://petertodd.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGpUhd3bMhDbI9xWQRAqhJAJ4qgU4yaEicb4FA3Q3gdB1kfPaY5wCgmFZ6
SxiUSqSrMhmhlebMuqj8dog=
=d1N2
-----END PGP SIGNATURE-----

2007\07\24@024702 by Maarten Hofman

face picon face
> On Tue, Jul 17, 2007 at 03:58:49PM +0100, Matthew Rhys-Roberts wrote:
> > Is anyone here interested in writing code that consumes the minimum
> > possible power? e.g. Variable clock speeds, making use of
> > wake-on-interrupt type features instead of endless loops waiting for an
> > event, etc.
> >
> > I wonder how to get this sort of thing to catch on in popularity.


I actually enjoy using external timer chips for this purpose. A supercap and
a DS1302. I believe the DS1307 can even send an interrupt to the PIC to wake
it up every so often, if that is needed (sadly, it can't charge the
supercap, so you'll need a lithium battery as backup).

Greetings,
Maarten Hofman.

2007\07\30@011625 by William \Chops\ Westfield

face picon face

On Jul 18, 2007, at 6:26 AM, Michael Rigby-Jones wrote:

> If we were still happy to run DOS/CPM on 8086 CPUs running at 4.77MHz,
> then undoubtedly a modern implementation could be run from a few  
> pen cells.

When I bought my first palmtop (a Palm 3xe, dragonball processor 8M  
memory
plus OS and apps in ROM), I was struck by it's similarity (cpu &  
memory) to
the original 1984 Macintosh...

BillW

More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...