Discussion:
[PIC] Lost Souls--Pic Challenges
Bob LeDoux
2017-09-26 19:05:58 UTC
Permalink
Show me mind twisters that utilize assembler with minimal 8 bit PIC's.

Or as David Brown said: "One of the great pleasures of my retirement is solving difficult calculations in assembler for PIC16s."

My Conway's Game of Life was typical: Take a well defined algorithm, and create it in PIC assembler using minimal hardware.

Here is another example: I have a decimal value between 0 and 1. I need to generate two integers a and b, such that a/b closely approximates the decimal value. One algorithm is Jon Farey's best rational approximation. Here is a presentation:

https://www.johndcook.com/blog/2010/10/20/best-rational-approximation/

These are the kinds of exercises for me. But where do I find them?
--
Bob LeDoux <***@proaxis.com>



Date: Tue, 26 Sep 2017 16:00:31 +0100
From: David C Brown <***@gmail.com>
Subject: Re: [PIC] Lost Souls
To: "Microcontroller discussion list - Public." <***@mit.edu>
Message-ID:
<***@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

One of the great pleasures of my retirement is solving difficult
calculations in assembler or PIC16s. With all the pressures of deadlines
gone I can spend an entire day crafting an exquisite 10 lines of
assembler. Far more interesting and demanding as doing a suduko and, in
the greater scheme of things, equally futile.
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Marcel Duchamp
2017-09-26 20:06:01 UTC
Permalink
Thanks Bob!  John Cook's blog is now consuming the rest of today and
probably a lot of the week...

I'm also in that group who finds this math stuff along with Pics very
fun to think about.
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/
Wouter van Ooijen
2017-09-27 07:30:50 UTC
Permalink
Hi everyone

I waved PICs goodbye a long time ago, and switched mainly to ARM/Cortex
and C++ for micro-controller programming. A side-effects of this is that
I'll be doing the closing keynote on the Meeting C++ conference in
Berlin, november this year, on the subject of (C++ and) embedded. My
picture is up on the website, so I can't deny it any more..

Which leads me to my problem: the term "embedded" is often used for the
time/space/energy/cost/xxx-sensitive work done on micro-controllers.
(Roughly what was thye focus of this group in its big days.) But this
"embbeed" term was a problem from the beginning (embedded systems can
and do contain large computer systems, with a very different way of
programming), and is getting even more so these days (ESP8266 are
programmed in Lua and Python, and how long will it be before a
single-chip system will run a common Linux distro?).

Hence the term "embedded" is no longer sufficient to describe a
programming (and system design) style that is (very) sensitive to (code
and data) space and timing. So do you have a better (preferrably
one-word) term to describe this domain? The best I have so far is
probably "severly resource constrained", but that is not 100% accurate
and too long by two words . "small micro-controller" is another
candidate, but it is still one word too long, and feels negative.

A better term, anyone?
--
Wouter "Objects? No Thanks!" van Ooijen
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Sean Breheny
2017-09-27 08:12:47 UTC
Permalink
To me, embedded has always meant a computer system built for a specific
purpose where the user is very unlikely to run software of his own choosing
on it. It doesn't fundamentally have much to do with resource constraints.
Also the user interface of an embedded system is usually specialized for
its purpose - often having only a few buttons or a basic touchscreen with
no facility for a full keyboard.
Post by Wouter van Ooijen
Hi everyone
I waved PICs goodbye a long time ago, and switched mainly to ARM/Cortex
and C++ for micro-controller programming. A side-effects of this is that
I'll be doing the closing keynote on the Meeting C++ conference in
Berlin, november this year, on the subject of (C++ and) embedded. My
picture is up on the website, so I can't deny it any more..
Which leads me to my problem: the term "embedded" is often used for the
time/space/energy/cost/xxx-sensitive work done on micro-controllers.
(Roughly what was thye focus of this group in its big days.) But this
"embbeed" term was a problem from the beginning (embedded systems can
and do contain large computer systems, with a very different way of
programming), and is getting even more so these days (ESP8266 are
programmed in Lua and Python, and how long will it be before a
single-chip system will run a common Linux distro?).
Hence the term "embedded" is no longer sufficient to describe a
programming (and system design) style that is (very) sensitive to (code
and data) space and timing. So do you have a better (preferrably
one-word) term to describe this domain? The best I have so far is
probably "severly resource constrained", but that is not 100% accurate
and too long by two words . "small micro-controller" is another
candidate, but it is still one word too long, and feels negative.
A better term, anyone?
--
Wouter "Objects? No Thanks!" van Ooijen
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
James Cameron
2017-09-27 08:44:38 UTC
Permalink
Having heard Elecia White (@logicalelegance) http://embedded.fm/ ask
every guest what an embedded system is, I'm leaning toward what Sean
said, but I'd phrase it in reverse.

A general purpose computing system is what an embedded computing
system isn't.

Where an embedded computing system can be easily repurposed or
reprogrammed by the ordinary user, it leans toward not being
"embedded".

So generality is an attribute of a general purpose system, and
non-generality is an attribute of an embedded system.
--
James Cameron
http://quozl.netrek.org/
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
a***@stfc.ac.uk
2017-09-27 09:00:49 UTC
Permalink
To me 'embedded' is where the user has access to a system without (necessarily) realising there is a computer of some sort doing the hard graft behind the scenes - they are not programming it directly (by loading applications or programs, or generating programs) or using it to store or compute data (databases, accounting etc), but may be interacting with it through minimised (specialised) keyboard and display, such as coffee maker, microwave, toaster or flight simulator. Into this category could also go PVR, (modern) television sets, and so on where the use of a computer is not obvious to the user.

But to boil that down to a single word, the best I can think of is 'hidden', 'not obvious', 'behind the scenes'.
-----Original Message-----
Of Sean Breheny
Sent: 27 September 2017 09:13
Subject: Re: [OT] "embedded"
To me, embedded has always meant a computer system built for a specific
purpose where the user is very unlikely to run software of his own choosing
on it. It doesn't fundamentally have much to do with resource constraints.
Also the user interface of an embedded system is usually specialized for its
purpose - often having only a few buttons or a basic touchscreen with no
facility for a full keyboard.
Post by Wouter van Ooijen
Hi everyone
I waved PICs goodbye a long time ago, and switched mainly to
ARM/Cortex and C++ for micro-controller programming. A side-effects of
this is that I'll be doing the closing keynote on the Meeting C++
conference in Berlin, november this year, on the subject of (C++ and)
embedded. My picture is up on the website, so I can't deny it any more..
Which leads me to my problem: the term "embedded" is often used for
the time/space/energy/cost/xxx-sensitive work done on micro-controllers.
(Roughly what was thye focus of this group in its big days.) But this
"embbeed" term was a problem from the beginning (embedded systems
can
Post by Wouter van Ooijen
and do contain large computer systems, with a very different way of
programming), and is getting even more so these days (ESP8266 are
programmed in Lua and Python, and how long will it be before a
single-chip system will run a common Linux distro?).
Hence the term "embedded" is no longer sufficient to describe a
programming (and system design) style that is (very) sensitive to
(code and data) space and timing. So do you have a better (preferrably
one-word) term to describe this domain? The best I have so far is
probably "severly resource constrained", but that is not 100% accurate
and too long by two words . "small micro-controller" is another
candidate, but it is still one word too long, and feels negative.
A better term, anyone?
--
Wouter "Objects? No Thanks!" van Ooijen
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Bob Ammerman
2017-09-27 12:02:30 UTC
Permalink
Embedded: When there are less resources than you really need to get the job
done

~ Bob Ammerman
RAm Systems
-----Original Message-----
Of Sean Breheny
Sent: Wednesday, September 27, 2017 4:13 AM
Subject: Re: [OT] "embedded"
To me, embedded has always meant a computer system built for a specific
purpose where the user is very unlikely to run software of his own choosing
on it. It doesn't fundamentally have much to do with resource constraints.
Also the user interface of an embedded system is usually specialized for
its
purpose - often having only a few buttons or a basic touchscreen with no
facility for a full keyboard.
Post by Wouter van Ooijen
Hi everyone
I waved PICs goodbye a long time ago, and switched mainly to
ARM/Cortex and C++ for micro-controller programming. A side-effects of
this is that I'll be doing the closing keynote on the Meeting C++
conference in Berlin, november this year, on the subject of (C++ and)
embedded. My picture is up on the website, so I can't deny it any more..
Which leads me to my problem: the term "embedded" is often used for
the time/space/energy/cost/xxx-sensitive work done on micro-controllers.
(Roughly what was thye focus of this group in its big days.) But this
"embbeed" term was a problem from the beginning (embedded systems
can
Post by Wouter van Ooijen
and do contain large computer systems, with a very different way of
programming), and is getting even more so these days (ESP8266 are
programmed in Lua and Python, and how long will it be before a
single-chip system will run a common Linux distro?).
Hence the term "embedded" is no longer sufficient to describe a
programming (and system design) style that is (very) sensitive to
(code and data) space and timing. So do you have a better (preferrably
one-word) term to describe this domain? The best I have so far is
probably "severly resource constrained", but that is not 100% accurate
and too long by two words . "small micro-controller" is another
candidate, but it is still one word too long, and feels negative.
A better term, anyone?
--
Wouter "Objects? No Thanks!" van Ooijen
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
smplx
2017-09-28 11:43:12 UTC
Permalink
Post by Sean Breheny
To me, embedded has always meant a computer system built for a specific
purpose where the user is very unlikely to run software of his own choosing
on it. It doesn't fundamentally have much to do with resource constraints.
Also the user interface of an embedded system is usually specialized for
its purpose - often having only a few buttons or a basic touchscreen with
no facility for a full keyboard.
Many years ago I had to write a program for a "till" (point of sale
terminal). At its heart was a Z80, a mix of RAM / EPROM (upto 64k), a dot
matrix (plasma) display, a keyboard (a large array of mechanical switches)
a dot matrix printer (mechanical pin head), a magnetic stripe
reader/writer (on cardboard), a current loop serial interface and the draw
lock solonoid. Although this hardware was capable of running many
different kinds of programs it had one dedicated function. I consider the
program I wrote for this system to be truely embedded. There was a great
deal of hardware control going on.

Many years later I was part of a team writing code for another point of
sale terminal. Our software was highly abstracted and ran on OS/2. I
consider this program to be an application running on hardware with a
dedicated function.

Although both systems had cores capable of general purpose use the first
had a program that was tightly coupled to the hardware. The second had a
program sitting on top of an OS that provided services to it.

In my opinion, a product that has a computer inside it can be correctly
described as having an embedded computer but programming it should only be
described as embedded programming if the code does not rely on an
underlying OS. I would view such code as being an application even if it
does perform a little bit of hardware manipulation (e.g. flashing a LED,
controlling a servo or reading a switch).

So in my view I would consider that programming an embedded computer is
moving away from true embedded programming towards application
programming. Perhaps the term being sought is "embedded application
programming" - I know this isn't one word but these are the lemons I
have :-)

Regards
Sergio Masci
Post by Sean Breheny
Post by Wouter van Ooijen
Hi everyone
I waved PICs goodbye a long time ago, and switched mainly to ARM/Cortex
and C++ for micro-controller programming. A side-effects of this is that
I'll be doing the closing keynote on the Meeting C++ conference in
Berlin, november this year, on the subject of (C++ and) embedded. My
picture is up on the website, so I can't deny it any more..
Which leads me to my problem: the term "embedded" is often used for the
time/space/energy/cost/xxx-sensitive work done on micro-controllers.
(Roughly what was thye focus of this group in its big days.) But this
"embbeed" term was a problem from the beginning (embedded systems can
and do contain large computer systems, with a very different way of
programming), and is getting even more so these days (ESP8266 are
programmed in Lua and Python, and how long will it be before a
single-chip system will run a common Linux distro?).
Hence the term "embedded" is no longer sufficient to describe a
programming (and system design) style that is (very) sensitive to (code
and data) space and timing. So do you have a better (preferrably
one-word) term to describe this domain? The best I have so far is
probably "severly resource constrained", but that is not 100% accurate
and too long by two words . "small micro-controller" is another
candidate, but it is still one word too long, and feels negative.
A better term, anyone?
--
Wouter "Objects? No Thanks!" van Ooijen
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
David C Brown
2017-09-28 12:11:18 UTC
Permalink
Which is entirely consistent with the fact that embedded systems,
especially in domestic appliances, are becoming less reliable

So in my view I would consider that programming an embedded computer is
Post by smplx
moving away from true embedded programming towards application
programming. Perhaps the term being sought is "embedded application
programming" - I know this isn't one word but these are the lemons I
have :-)
Regards
Sergio Masci
Post by Bob LeDoux
Post by Wouter van Ooijen
Hi everyone
I waved PICs goodbye a long time ago, and switched mainly to ARM/Cortex
and C++ for micro-controller programming. A side-effects of this is that
I'll be doing the closing keynote on the Meeting C++ conference in
Berlin, november this year, on the subject of (C++ and) embedded. My
picture is up on the website, so I can't deny it any more..
Which leads me to my problem: the term "embedded" is often used for the
time/space/energy/cost/xxx-sensitive work done on micro-controllers.
(Roughly what was thye focus of this group in its big days.) But this
"embbeed" term was a problem from the beginning (embedded systems can
and do contain large computer systems, with a very different way of
programming), and is getting even more so these days (ESP8266 are
programmed in Lua and Python, and how long will it be before a
single-chip system will run a common Linux distro?).
Hence the term "embedded" is no longer sufficient to describe a
programming (and system design) style that is (very) sensitive to (code
and data) space and timing. So do you have a better (preferrably
one-word) term to describe this domain? The best I have so far is
probably "severly resource constrained", but that is not 100% accurate
and too long by two words . "small micro-controller" is another
candidate, but it is still one word too long, and feels negative.
A better term, anyone?
--
Wouter "Objects? No Thanks!" van Ooijen
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Chris McSweeny
2017-09-27 12:48:52 UTC
Permalink
Interesting topic - I still describe myself my specialism as embedded
systems on my CV (despite having not been paid to do that for a long time!)
though I've largely moved on from PICs and AVRs via more complex embedded
processors running RTOS (when I was still being paid to do it) to Raspberry
Pi and similar. I'd still think of most of my applications for a RPi being
embedded as they're controlling something else and the computing is hidden
from the end user.

I'm tempted to think that the correct term for what you want is
"microcontroller". I'm not sure you even need the "small" caveat - to me a
microcontroller is a good definition of the sort of thing you're thinking
of, when it gets bigger than that and you're running an OS I'd start
describing it as a microprocessor instead. At least that is how I tended to
describe the higher powered processors running RTOS I was developing for -
even though they shared a lot of characteristics with microcontrollers and
were effectively a single chip system on a custom board.

Chris
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Clint Jay
2017-09-27 13:03:27 UTC
Permalink
Microcontroller was usually defined as a chip that could have its own RAM
and ROM and could, given relevant voltages and a clock, operate
independently of external peripherals wasn't it?

I would consider an embedded system to be any system where an application
only is exposed to a user, doesn't matter what resources it has but it
would usually be self contained (usually, not always)
Post by Chris McSweeny
Interesting topic - I still describe myself my specialism as embedded
systems on my CV (despite having not been paid to do that for a long time!)
though I've largely moved on from PICs and AVRs via more complex embedded
processors running RTOS (when I was still being paid to do it) to Raspberry
Pi and similar. I'd still think of most of my applications for a RPi being
embedded as they're controlling something else and the computing is hidden
from the end user.
I'm tempted to think that the correct term for what you want is
"microcontroller". I'm not sure you even need the "small" caveat - to me a
microcontroller is a good definition of the sort of thing you're thinking
of, when it gets bigger than that and you're running an OS I'd start
describing it as a microprocessor instead. At least that is how I tended to
describe the higher powered processors running RTOS I was developing for -
even though they shared a lot of characteristics with microcontrollers and
were effectively a single chip system on a custom board.
Chris
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
Clint.

*No trees were harmed in the sending of this mail. However, a large number
of electrons were greatly inconvenienced.*
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Denny Esterline
2017-09-27 14:52:51 UTC
Permalink
My two cents...
"Embedded" is part of something greater. A consumer never goes to the store
and buys an "embedded computer". They buy a *product* that happens to have
an embedded computer in it.
It might be the smallest 10F/ATtiny as an LED flasher in a toothbrush
handle or it might be as complex as a car. Consumers don't go to the car
dealer and ask to see the newest models because they heard the engine
control module is built with an octo-core super processor now with 17 TB of
RAM.

Cell phones are an interesting example here. A decade or so ago (perhaps
two, time flies), people bought devices that could make a phone call. The
internal architecture was largely irrelevant and mostly ignored. Now
they're buying something that is a more general purpose computing platform
with the intent of running far more diverse programs. As such the internal
architecture is more involved in the discussion.


I think the idea of working in a "resource constrained" system is a natural
outgrowth of the business of volume production of products. Unless it's a
high-volume product, saving a penny per unit at the expense of another
month of engineering time is never going to be profitable. "Resource
constrained" is a math problem: [DevCost + (UnitCost * Quantity)] With the
drop in cost of more capable silicon and the improvement in development
tools, that math changes all the time.


So, I think "embedded" is the right term, but the definition may have been
a bit mangled through the years.
Post by Clint Jay
Microcontroller was usually defined as a chip that could have its own RAM
and ROM and could, given relevant voltages and a clock, operate
independently of external peripherals wasn't it?
I would consider an embedded system to be any system where an application
only is exposed to a user, doesn't matter what resources it has but it
would usually be self contained (usually, not always)
Post by Chris McSweeny
Interesting topic - I still describe myself my specialism as embedded
systems on my CV (despite having not been paid to do that for a long
time!)
Post by Chris McSweeny
though I've largely moved on from PICs and AVRs via more complex embedded
processors running RTOS (when I was still being paid to do it) to
Raspberry
Post by Chris McSweeny
Pi and similar. I'd still think of most of my applications for a RPi
being
Post by Chris McSweeny
embedded as they're controlling something else and the computing is
hidden
Post by Chris McSweeny
from the end user.
I'm tempted to think that the correct term for what you want is
"microcontroller". I'm not sure you even need the "small" caveat - to me
a
Post by Chris McSweeny
microcontroller is a good definition of the sort of thing you're thinking
of, when it gets bigger than that and you're running an OS I'd start
describing it as a microprocessor instead. At least that is how I tended
to
Post by Chris McSweeny
describe the higher powered processors running RTOS I was developing for
-
Post by Chris McSweeny
even though they shared a lot of characteristics with microcontrollers
and
Post by Chris McSweeny
were effectively a single chip system on a custom board.
Chris
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
Clint.
*No trees were harmed in the sending of this mail. However, a large number
of electrons were greatly inconvenienced.*
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Chris McSweeny
2017-09-27 16:02:09 UTC
Permalink
Post by Denny Esterline
So, I think "embedded" is the right term, but the definition may have been
a bit mangled through the years.
It's not so much mangled as that computing has got so much cheaper and
smaller and single board computers have become available, so that now it's
perfectly feasible to put a RPi Zero in a lot of things, and it's still
perfectly reasonable to call that an embedded system. The issue being that
an RPi is a proper computer capable of running a desktop OS, so is
completely different to what Wouter wants to refer to.

Chris
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
RussellMc
2017-09-28 08:15:29 UTC
Permalink
​... ​
So do you have a better (preferrably
one-word) term to describe this domain? The best I have so far is
probably "severly resource constrained", but that is not 100% accurate
and too long by two words . "small micro-controller" is another
candidate, but it is still one word too long, and feels negative.
A better term, anyone?
​Not ideal, but the classic "black-box" (blackbox?, black box?) ​concept
overlaps with much of what has been said so far.
Maybe "embedded or blackbox" system :-).
Maybe that the first time then use either term thereafter.

Fall0ver-alone system?


Russell


Garglabet: Results will contain other variants

blackbox 44 M
black-box 101 M
black box 97 M

Verbatim: Tools, All Results / Verbatim

blackbox 2.12 M
black-box 12.9 m
black box 15.2 M
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
htt
Loading...