[sdiy] FW: PIC Programming

cheater cheater cheater00 at gmail.com
Wed Apr 28 14:03:07 CEST 2010


On Wed, Apr 28, 2010 at 05:43, Ian Smith <taciturn_unquiet at hotmail.com> wrote:
> It's really kinda fascinating in my opinion.. being able to do so much with just 35 basic commands. Very shiny stuff. A good read if nothing else.
>
> http://www.mstracey.btinternet.co.uk/index.htm

Then you might really enjoy reading this:
http://en.wikipedia.org/wiki/One_instruction_set_computer

as well as installing an interpreter for br**nfuck (also known as b****fuck):
http://en.wikipedia.org/wiki/Brainfuck - it's available on many linux
distributions as a package, too

Also check out befunge.

And generally the #esolang irc channel on Freenode, it's got many
people who can tell you lots of interesting things about what you're
learning right now (and some people who can't!).

Marc,
> if you are used to assembler , the code you can write with [it]
> will always be better/faster than the C/C++ equivalent.

only if by 'better' you mean 'less instructions used to achieve result
in the program'. There are other, more important ways of telling code
is better:
- orders of magnitude less time spent on development. This means 10,
100x faster with the right language. Sometimes ASM is the right
language, most often it's not (a sentiment Antti and Colin touched on
while I was writing this, heheh)
- ease of use
- ease of altering the program 1, 2, 5 years into the future: decrease
in time required to achieve a certain task, such as e.g. a new element
of functionality or a new interface for existing functionality (see
Colin's example)

> C/C++ and basic compilers do not produce an optimised code to go fast enough

I always saw the most basic PICs as chips that were made for blinking
a single diode, and other simple tasks like that. In fact, blinking a
diode is already a higher level than the most basic, since it requires
a timer! I never understood people who want to do e.g. Fourier
analysis on those things, it seems like a big waste of big effort.
Personally I have better things to do than to learn how to achieve
supersonic speeds on a children's trike, but I'm sure there are people
out there who see the value in this approach.

It is my prediction, Ian, that by spending money on a 32 bit dev board
with good C support you will save more time(=money) in the first
half-year of intensive use than the board itself cost. On the other
hand if you want to do simple things like blinking diodes, front panel
control, and other things like that, then a PIC is simple. But I wager
to say that if you feel you have to learn all the instructions in the
PIC's instruction set to achieve your objective, then you should
fundamentally change the platform you're working on.

HTH
D.



More information about the Synth-diy mailing list