[sdiy] FW: PIC Programming

m.bareille at free.fr m.bareille at free.fr
Wed Apr 28 09:16:25 CEST 2010


Hello,

I have a little experience with PIC programming . I  know C/C++ , Assembler and
some other languages too...

With small PIC ( 10F,12F, 16F, and even 18F series)  and to code a firmware
where the speed is very important, like  a MIDI application ,  the assembler is
the only realistic solution ,imho.

C/C++ is more interesting with bigger ,more complex chips like DSP PIC or real
16/32 bits  cpus, but if you are used to assembler , the code you can write with
will always be better/faster than the C/C++ equivalent.

C/C++ and basic compilers do not produce an optimised code to go fast enough
Most of the time compilers use relative adress methods who require more lines
than simple adressing modes like absolute code or short jumps instructions...
for a 100n sec per instructions computer with limited ressources it is a,
incredible waste of time and memory ...

The PIC assembler is also one of the simplest assembler i know : 35 or 75
instructions to do everything and you can write structured code in assembler
exacly like with C , but a much more optimsed way ! So it woth to lern it !
There is no reason to not use it . PIC based MIDI applications  or other
synthesis applications won't let you a lot of other alternate choices...

Thanks

Marc B.

PAPAREIL SYNTH LABS
http://m.bareille.free.fr




Selon Ian Smith <taciturn_unquiet at hotmail.com>:

>
>
> > Sorry to present a contrry position. I much prefer the 8051 and/or Motorola
> > 68xx family derivatives to the PIC any day. There is no denying the PIC is
> > popular, but I think I will go the other direction (ARM) before heading
> back
> > into PIC hell. Just one person's opinion of course, but I found the limited
> > number of CPU registers and addressing modes painful. Normally I work in C
> > anyway and I don't have to look at the registers, but it hurts my feelings
> > just thinking about how many instructions are needed for even the simplest
> C
> > expressions.
>
> Don't be sorry. I like contrary positions. I'm really new to digital stuff
> and I see a lot of PICs wandering around. It's nice to hear from someone that
> likes a different platform.
>
> Now reading the assembly code stuff, I can personally visualise things a
> little better where I was having a bit of trouble with some of the C code.
> But who knows, maybe I'll find something useful and easier in the 8051 or the
> 68xx family.
>
> More opinions!
>
> -Ian
>
>
> _________________________________________________________________
> The New Busy is not the too busy. Combine all your e-mail accounts with
> Hotmail.
>
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>





More information about the Synth-diy mailing list