If you are using the dsPIC, then the path of least resistance is C. The C30
Student Edition is free, and as far as i can tell, the advantages of the
paid version are pretty small.
There is no such thing as "very low latency", it depends on your
application. You might talk a little more about what you are doing but from
your descriptions it sounds as if even the slowest of the PICs will be
adequate, but maybe not.
The problem with "Assembly language (I have now knowledge about it)" is that
for ANY embedded application you need to get pretty intimate with the
hardware, and assembler makes that easier than C. Indeed, knowing C up
front might be something of a disadvantage, because much of what an
experienced C programmer would do as second nature is very bad in an
embedded application. If your application is simple enough, the 8 bit parts
are very simple, and the assembly language is simple enough that anyone can
learn it easily. Personally (and many will disagree with me), I think it is
a mistake to try to mess with C on the 8 bit PICs unless you are very
experienced.
That being said, the 16 bit PICs are complex enough, and the C
implementation good enough, that I would suggest C as the way to get started
on the dsPIC. You can shoot yourself in the foot, but it isn't the
minefield it is on the 8 bit parts.
Perhaps as a level set, it is quite simple to get a very good sample of an
audio waveform on the dsPIC using C and without resorting to the automatic
sampling provided by the (very fancy) dsPIC A/D. I have an application
using the PIC24 and Microchip's QVGA display where I can update the screen
dozens of times a second. The 16 bit PICs are quite capable, even with C,
and when the "trial period" expires on the C compiler you only loose some
optimizations which don't seem to be a big deal for a lot of applications
anyway.
By the way, the PIC24's have a number of advantages over the dsPICs. But if
you need very good A/D or the DSP engine then obviously the dsPIC is the way
to go. Also, the dsPIC30's are 5 volts which could be an advantage in your
design. But some of the peripherals on the PIC24s are quite a bit more
capable than the dsPICs, and the ability to reassign I/O pins can mean you
end up with a smaller pin count part (cheaper). Generally you can manage
power consumption a little better with the PIC24s. The instruction set,
aside from the DSP instructions, is identical.
--McD
----- Original Message -----
From: ray xu
To: p...@yahoogroups.com
Sent: Monday, September 08, 2008 5:46 PM
Subject: RE: [piclist] Re: Pic vs. other MCU
So, if C/C++ is not the best choice, then does that mean I have to use
Assembly language (I have now knowledge about it)? The programmable delay
part will be set through an 8-bit bus, much like a DIP switch. The
important thing is that the language/PIC needs to have very low latency
(that's why I'm using a dsPIC30), high speed, small program, and fast
execution (I heard somewhere ASM executes faster than high-level languages,
is that true?). I have most of the tools right now (buying the mini-ICD2
from sparkfun later), but I'm missing the knowledge of Assembly language,
and past experience with PICs. I cannot find any very helpful information
on programming in Assembly for the PIC on the web; are there some good sites
out there? Thanks.
___________________
Ray Xu
r...@tx.rr.com
DPRG member
OOPic group member
Seattle Robotics group member
My Blog
-----Original Message-----
From: p...@yahoogroups.com [mailto:p...@yahoogroups.com] On Behalf Of
jvoytovich
Sent: Monday, September 08, 2008 1:16 PM
To: p...@yahoogroups.com
Subject: [piclist] Re: Pic vs. other MCU
One area that I look at when evaluating micros is the software tools
available. Microchip seems to excel in this area - devoting a large
area on their web site, and offering most of the tools for free
download. You can't program if you can't find the tools!! Some of the
other vendors rely on open source code, and while it may be fairly
reliable and free, you get less support from the vendor on software
issues.
>>...but I'm not sure if the compiler supports C/C++ syntax.<<
Hmm...the topic of using C++ has come up quite a bit with me in the
past. Seems that most people hear a lot about C++ and assume that it's
just the next logical step up from C. The one problem here is code
size - C++ has larger libraries to support functions such as object
memory allocation (for a more complete discussion, see
http://www.linuxdevices.com/eljonline/issue07/4870s1.html).
C++ would have a less deterministic runtime due to its inherent
features, which would NOT be very funny when running a prototype and
getting the "now it works, now it doesn't" result.
C has been referred to as a high-level assembly language. It's a good
compromise between assembly for speed and size, and the abstraction of
high-level language. If you have the CPU speed and memory size, C++
would probably work,
So...no C++ for the PICs!!
>> What I'm trying to do is to use the PIC as a programmable delay
chip. Any suggestions? <<
How are you "programming" it? Will this be hard-coded into the chip
when it is burned, or will the time be fed into it via switches or
some external communication?
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )