Re: what's wrong with a pic ?
- From: Chris Hills <chris@xxxxxxxxxxxx>
- Date: Mon, 29 May 2006 11:42:46 +0100
In article <aNoeg.108454$Fs1.80448@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Neil <NeilKurzm@xxxxxxxxxxxxxxxx> writes
Hans-Bernhard Broeker wrote:
Neil <NeilKurzm@xxxxxxxxxxxxxxxx> wrote:My issue was that his point seemed to be if you can not support the full
CBFalconer wrote:
Don't believe it. That pic is incapable of providing the
elementary requirements of the C language, such as recursion. That
compiler may handle a language with superficial resemblance to C,
however.
REQUIREMENT?
It is a microcontroller not a PC. No project for it should require
recursion.
Erm, Neil, next time, before you get all heated up about a single word
you find in a posting, please try to read it in context. Chuck was
talking about requirements of the C language, not requirements of some
project. And he mentioned recursion as an *example*, not as the only
issue.
A PIC is objectively too small to fulfill the requirements laid out by
the definition of the language. And the one about recursion isn't the
only roadblock, either. 32-bit int arithmetic, floating-point
support, sizes of variables and functions that must be supported are
only the first couple other constraints that come to mind which most
versions of the PIC architecture can't expect to meet. FWIW, a large
fraction of actual '51 family MCUs can't meet those requirements
either.
Yes, there is are programs that claim to be C compilers for the PIC16
architecture. The problem is that the "C" they actually can cope with
has not much more resemblance to the well-defined standard programming
language C, than the language in the manual of your average 10$ radio
alarm clock has with actual English.
spec you might as well program in asm. That is not my opinion.
The Keil 8052 compiler supports recursion function pointers and malloc.
because the standard says so. using the is usually a bad idea.
Recursion has to be explicitly specified for any functions you want as
recursive. By default is it switched of.
Hi-Tech PICC supports floats and and 32 bit math.
I was able to copy code from another project that used a real (x86) CPU.
May people assume that if it supports C I should be able to copy my PC
code to it and go.
I have come across this many times when doing tech support. :-(
You end up with questions like"can I run Linux on a
PIC", "can I decode Video on a PIC", "How do I get some widows call to
compile on my PIC".
I have often see can "can I run Linux on a PIC" Or 8051 etc. Also
requests for a full TCP/IP stack for a PIC.
I would never choose to program a PIC in ASM. The available compiler is
good enough to acomplish the tsak my company wants. If not I would tell
them "I need more power Scotty".
I would prefer to program in C but on a PIC asm is also sensible.
Is the PIC a lame CPU, sure. But it works very well for tasks it is
suited for. Cheap, low power small size. And reasonable C support.
Agreed.
--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ chris@xxxxxxxxxxxx www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
.
- References:
- what's wrong with a pic ?
- From: purple_stars
- Re: what's wrong with a pic ?
- From: Damir
- Re: what's wrong with a pic ?
- From: CBFalconer
- Re: what's wrong with a pic ?
- From: Neil
- Re: what's wrong with a pic ?
- From: CBFalconer
- Re: what's wrong with a pic ?
- From: Neil
- Re: what's wrong with a pic ?
- From: Hans-Bernhard Broeker
- Re: what's wrong with a pic ?
- From: Neil
- what's wrong with a pic ?
- Prev by Date: Re: 68hc08 and CAN bus
- Next by Date: Re: what's wrong with a pic ?
- Previous by thread: Re: what's wrong with a pic ?
- Next by thread: Re: what's wrong with a pic ?
- Index(es):
Relevant Pages
|