Searching \ for '[PIC:] dsPIC, to use C or ASM ?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=spi
Search entire site for: 'dsPIC, to use C or ASM ?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC:] dsPIC, to use C or ASM ?'
2004\10\25@061509 by Jan-Erik Soderholm

face picon face
Hi !
On this terrible gray and raining day, I though of
trying to spring some "life" into my PIC30F2010 samples.

Now, when beginning with the older PIC series, one is often
told to begin with ASM to "learn the chip". Then go on to some
"higher level" language (if at all).

With the dsPIC's, there seems to be qute a lot of talk about
the C30 compiler.

What does those of you that already have done some work
with these ds-things say ? Is the instruction set to complex
to use (begin with) ASM ? Or is the old "begin with ASM"
mantra still valid ?

And finaly, I probably need to wait for a reply on the
"[PIC] WISP628 with dsPIC" thread also :-) :-)

Best Regards,
Jan-Erik.
____________________________________________

2004\10\25@063005 by Peter Moreton

flavicon
face
I have to say that I have used the C30 compiler (which BTW is the GNU GCC
compiler) and found the whole product frankly hopeless. I decided to wait
until the dsPIC / C30 product matures a little, and then try again.

There is a reasonable amount of dsPIC assembler code avaialable for
download.

Peter Moreton


{Original Message removed}

2004\10\25@064157 by Ake Hedman

flavicon
face
Peter Moreton wrote:

>I have to say that I have used the C30 compiler (which BTW is the GNU GCC
>compiler) and found the whole product frankly hopeless. I decided to wait
>until the dsPIC / C30 product matures a little, and then try again.
>
>There is a reasonable amount of dsPIC assembler code avaialable for
>download.
>
>Peter Moreton
>
>
>  
>
In what way did you find it hopeless?

/Ake

--  ---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se      Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org


___________________________________________

2004\10\25@070338 by Wouter van Ooijen

face picon face
> And finaly, I probably need to wait for a reply on the
> "[PIC] WISP628 with dsPIC" thread also :-) :-)

The answer is: I am working on a big (firmware) update. Better not hold
your breath, I need my customers alive :)

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


____________________________________________

2004\10\25@082832 by olin_piclist

face picon face
Jan-Erik Soderholm wrote:
> On this terrible gray and raining day, I though of
> trying to spring some "life" into my PIC30F2010 samples.
>
> Now, when beginning with the older PIC series, one is often
> told to begin with ASM to "learn the chip". Then go on to some
> "higher level" language (if at all).
>
> With the dsPIC's, there seems to be qute a lot of talk about
> the C30 compiler.
>
> What does those of you that already have done some work
> with these ds-things say ? Is the instruction set to complex
> to use (begin with) ASM ? Or is the old "begin with ASM"
> mantra still valid ?

It's still a microcontroller and you're still not that far from the
hardware.  That means you will need to understand the machine no matter what
language you end up using.  I therefore suggest to start in assembler.  I've
done several dsPIC projects, all so far in assembler.  I've probably written
about 15K lines of dsPIC assembler so far.  Looking back, one of the
projects could have been about 1/2 in C, but at the time I was very worried
about performance.  This thing had to render vector fonts into pixels on the
fly.  I'm about to start a 30F4011 project which I'm planning substantial
parts in C with low level and bit twiddling modules in assembler.

Don't let the complexity of the chip fool you.  The instruction set does
take a bit longer to get familiar with because there are more instructions
and more options, but I find it easier to write dsPIC assembler than PIC 16
or PIC 18 assembler now that I'm used to it.  There is no banking or paging
to worry about, 16 bits is much less of a limitation for numeric quantities
than 8 bits, you have a real stack and 15 general registers, etc.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
____________________________________________

2004\10\25@084306 by Peter Moreton

flavicon
face
Perhaps I'm being unfair, but I tend to need to see worked examples; the C30
product includes a user manual, library manual, and that’s about it. Sure, I
have written some C30 to flash LEDS, write data to an LCD panel on the
dsPICDEM 1.1 board, but if you want to actually do any Digital Signal
Processing, you have to do this entirely from first principles. This might
be OK if you are a hardened DSP-hack, but for me, the learning curve was too
great. So I retreated back to my cosy C18/PIC18F environment to lick my
wounds!

I'll tackle C30 again, when I have some time.

Peter Moreton  
{Original Message removed}

2004\10\25@085631 by Herbert Graf

flavicon
face
On Mon, 2004-10-25 at 06:30, Peter Moreton wrote:
> I have to say that I have used the C30 compiler (which BTW is the GNU GCC
> compiler) and found the whole product frankly hopeless. I decided to wait
> until the dsPIC / C30 product matures a little, and then try again.
>
> There is a reasonable amount of dsPIC assembler code avaialable for
> download.
>
> Peter Moreton

Please define "hopeless", I've so far been very happy with the compiler.
Only thing it doesn't yet fully support is the filtering stuff, for that
you still need the ASM routines, but that can be explained by them
simply being more efficient in ASM, for the moment. TTYL

-----------------------------
Herbert's PIC Stuff:
http://repatch.dyndns.org:8383/pic_stuff/

____________________________________________

2004\10\25@095501 by Wouter van Ooijen

face picon face
> So I retreated back to my cosy C18/PIC18F environment
> to lick my wounds!

So you are not realy dissatisfied with the 30F/C30 but ('only') with the
difficulty of DSP?

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


____________________________________________

2004\10\25@104819 by WH Tan

flavicon
face
Hi Jan-Erik,

When I started my journal in PIC16, I used ASM. There are many reasons why I
made this decision. Anyway came out the top is that I wanted to try
something differently. I had writing programs in C/C++ (Windows
program). I recall that you had asked me why choose to start with PIC16
series instead of PIC18 long time ago. I'm not very sure if I answered you:
only 35 instructions feature really attracts me. About 1 year+ later, I
purchased C18. I think the reason for most peoples who choose to work with
compiler is the convenience of library.


This is why I started dsPIC with C30. Here are some more reasons and I'm
not sure this time which one comes out to be top.

1)  dsPIC seems loose "only 35 instructions" feature
2)  Microchip did offer 60-days trial version (nice)
3)  I want to jump-start :-)

>Is the instruction set to complex to use (begin with) ASM

Not sure at this point. However I'm not scared if I have to learn it. And I
decided that I have to learn it anyway (still on the progress). This is
because when I worked with dsPIC30F2010, I found that it loose (again) "the
convenience of library" a bit. With only 512 bytes of RAM, you will find
that many of the pre-compile library useless since you will soon discover
that you are running out of memory for software stack, heap etc.


Here is the conclusion that apply to me:

When working with high resources devices like dsPIC30F6014, I wouldn't deny
the compiler. When working with the like of dsPIC30F2010, I will try to
stick with ASM.

Best regards,
WH Tan



{Original Message removed}

2004\10\25@110245 by Herbert Graf

flavicon
face
On Mon, 2004-10-25 at 08:43, Peter Moreton wrote:
> Perhaps I'm being unfair, but I tend to need to see worked examples; the C30
> product includes a user manual, library manual, and thats about it. Sure, I
> have written some C30 to flash LEDS, write data to an LCD panel on the
> dsPICDEM 1.1 board, but if you want to actually do any Digital Signal
> Processing, you have to do this entirely from first principles.

Not true, MChip has tools that generate the needed code and quite a few
examples of how to put filters together. I used that info at Masters to
play with some filters.

That said, there is no support in C30 for ANY of that stuff, yet. For
the moment you have to use ASM if you want to do DSP stuff beyond what's
in the libraries (which contain most of what most people would want
anyways).

> This might
> be OK if you are a hardened DSP-hack,

I'm far from a DSP hack, in fact I've never actually taken a course in
DSP. My first contact with DSP was Masters, and I'd say from that
experience that MChip has done a VERY good job of "insulating"
developers from the nitty gritty. Their routines are VERY simple to use
(basically just pass a table of constants, which are generated by an
MChip app, and your buffer, and poof, out comes the filtered result).

> but for me, the learning curve was too
> great. So I retreated back to my cosy C18/PIC18F environment to lick my
> wounds!
>
> I'll tackle C30 again, when I have some time.
>
> Peter Moreton  

I actually have ended up skipping the 18F series, went straight to the
30F from the 16F series. I'm sure I'll "go back" to the 18F eventually,
but since I do this stuff mostly as a hobbyist the few extra dollars for
a 30F part vs. an 18F part is a non issue. TTYL

-----------------------------
Herbert's PIC Stuff:
http://repatch.dyndns.org:8383/pic_stuff/

____________________________________________

2004\10\25@112000 by Bill & Pookie

picon face
When I started programming the PIC's in asm, had to change thinking from
bytes to bits.

Bill

----- Original Message -----
From: "WH Tan" <spam_OUTwhsiungTakeThisOuTspamtm.net.my>
To: "Microcontroller discussion list - Public." <.....piclistKILLspamspam@spam@mit.edu>
Sent: Monday, October 25, 2004 7:48 AM
Subject: Re: [PIC:] dsPIC, to use C or ASM ?


> Hi Jan-Erik,
>
> When I started my journal in PIC16, I used ASM. There are many reasons why
I
> made this decision. Anyway came out the top is that I wanted to try
> something differently. I had writing programs in C/C++ (Windows
> program). I recall that you had asked me why choose to start with PIC16
> series instead of PIC18 long time ago. I'm not very sure if I answered
you:
{Quote hidden}

"the
> convenience of library" a bit. With only 512 bytes of RAM, you will find
> that many of the pre-compile library useless since you will soon discover
> that you are running out of memory for software stack, heap etc.
>
>
> Here is the conclusion that apply to me:
>
> When working with high resources devices like dsPIC30F6014, I wouldn't
deny
{Quote hidden}

____________________________________________

2004\10\25@124115 by Brian Aase

picon face
"Peter Moreton" <EraseMEpeter.moretonspam_OUTspamTakeThisOuTvirgin.net> wrote:
<snip>
> There is a reasonable amount of dsPIC assembler code avaialable for
> download.

Where can I find these examples?

Brian Aase

____________________________________________

More... (looser matching)
- Last day of these posts
- In 2004 , 2005 only
- Today
- New search...