Re: I say it is spinach . . .
John Nall email (remove spam text)
I'm through with the original thread, having gotten it off my chest.
But did want to follow up on one aspect:
> James Newton, Host wrote:
>> I guess my question would be how you would propose to bridge the gap
>> between the sort of IO, memory, etc... that C was designed for and
>> the sort of IO,memory, etc.. that the average PIC has?
It would be difficult, if not impossible, IMHO. But C most likely is
the best starting point for such a task. The real problem is that the
PIC programmer is not sufficiently shielded from the hardware. And this
is a relatively easy problem to solve. We solve it the way it has
always been solved -- by putting an interface between the programmer and
No matter what your opinion of DOS might be, it was an operating system
and ran well on some pretty insignificant chips. The original Unix
operating system was very basic. Andy Tanenbaum wrote a version of Unix
(which he called Minix) that supported multiple users on a 286 system.
Linux Torvald's original Linux kernel was pretty elementary. So for a
single user system, such as a PIC, a very elementary operating system
would not be a difficult thing to write. A user would write his code,
link it with the OS, and load it into the PIC. Reset would turn control
over to the OS, which would do the necessaries, and then turn control
over to the user program. Interrupts would interrupt to the OS. The
user would only make standard function calls in order to communicate
Designing the system calls and hardware drivers would be the challenging
part of writing such an OS, but it does not seem like it would be all
that difficult, given a set of assumptions about what a programmer needs
to be able to do. Someone who wanted to do something outside those
parameters could always go into machine language and do it, just as a
programmer is welcome (well, maybe not welcome, but allowed anyway) to
drive his own peripherals in Unix.
Once this was accomplished, then I think that a C-like language would be
a lot more feasible. It still would not be C, but it could be very close.
See also: www.piclist.com/techref/io/serial/spis.htm?key=spi
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the