EmbeddedRelated.com
Forums

C18 Compiler again

Started by Meindert Sprang June 7, 2010
On 2010-06-09, hamilton <hamilton@nothere.com> wrote:
> On 6/9/2010 12:51 AM, Meindert Sprang wrote: >> "Grant Edwards"<invalid@invalid.invalid> wrote in message >> news:huljbj$aft$2@reader1.panix.com... >>> In my experience, "yuck!" is what anybody trying to use C on a PIC >>> ought to expect. [IMO, "yuck!" is what you get using asm on a PIC as >>> well, but that's probably a little more subjective.] >> >> "Yuck" is what you get when using a PIC at all..... >> Whoever designed this architecture should be crucified!! > > Yes, and they are laughing all the way to the bank. > > Not bad for a "Yuck" design. > > hamilton >
PIC: The Microsoft of the embedded world. (eg: great marketing, lousy architecture :-)) Even as a hobbyist I rejected it in favour of the HC08 when I started out (I was looking for something with USB device in a PDIP when I started), even though I knew the PIC to be more popular for hobbyist work. (For the record, I outgrew the HC08 and moved to AVRs which is a move I have not regretted, but it would be nice to have USB device in a AVR PDIP). Years later, I cannot remember what I disliked most about the PIC; my lasting memory is more of coming away from reviewing it and never wanting to go near it again. :-) Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980's technology to a 21st century world
On Wed, 9 Jun 2010 18:46:50 +0000 (UTC), Simon Clubley
<clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:

>PIC: The Microsoft of the embedded world. > >(eg: great marketing, lousy architecture :-)) > >Even as a hobbyist I rejected it in favour of the HC08 when I started >out (I was looking for something with USB device in a PDIP when I started), >even though I knew the PIC to be more popular for hobbyist work. > >(For the record, I outgrew the HC08 and moved to AVRs which is a move I >have not regretted, but it would be nice to have USB device in a AVR PDIP). > >Years later, I cannot remember what I disliked most about the PIC; my >lasting memory is more of coming away from reviewing it and never wanting >to go near it again. :-)
http://groups.google.com/group/comp.arch.embedded/msg/c8480f9711574df7%3E is an excellent summary. Shorter version "In spite of its numerous shortcomings a PIC is a remarkably useful tool for certain tasks. But then, so is a sharp stick." -- Rich Webb Norfolk, VA

Simon Clubley wrote:

> PIC: The Microsoft of the embedded world. > > (eg: great marketing, lousy architecture :-))
Great customer support. Microchip has consistently supported their customers. A couple phone calls and even when parts are in short supply they will find some. w..
In article <4C0FF87C.5C39B6C4@bytecraft.com>, walter@bytecraft.com 
says...
> > > Simon Clubley wrote: > > > PIC: The Microsoft of the embedded world. > > > > (eg: great marketing, lousy architecture :-)) > > Great customer support. Microchip has consistently supported their customers. > A couple phone calls and even when parts are in short supply they will > find some. > > w..
I agree, Microchip wasn't my first choice for the architecture, the 18 series and up are better, but you can't deny the availability of tools and I have to say that Microchip has been very responsive when I have a problem. Motorola/Freescale on the other hand was a NIGHTMARE to deal with and we bought a butt load of 6805/68HC05 and HC11 stuff from them. A good cross compiler hides a LOT of the PIC uglies. :) Jim
On Wed, 9 Jun 2010 18:46:50 +0000 (UTC), Simon Clubley
<clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:

>PIC: The Microsoft of the embedded world. > >(eg: great marketing, lousy architecture :-))
It is about great support not great marketing. Engineers doing design aren't long fooled by marketing. Microsoft worked hard (and illegally, it turned out) to control market channels and sells into what is basically a broad-based, largely ignorant marketplace. Microchip sells to well-informed engineers and so far as I'm aware hasn't acted to force illegal contract terms onto distributers. Microchip simply supports their customers well and that counts for something with engineers in the end.
>Even as a hobbyist I rejected it in favour of the HC08 when I started >out (I was looking for something with USB device in a PDIP when I started), >even though I knew the PIC to be more popular for hobbyist work.
You reminded me that I started out with the Hitatchi H8/300 before I even saw a PIC. One thing I really liked about it was the ability to custom wire a socket up so that I could drop the part into a bog standard EPROM writer socket and program the code into it. Besides a great instruction set, it was wonderful that way for me. No specialized hardware that I couldn't afford, that way, so I was able to cheaply program it. Nice. Still.... Microchip supports their customers.
>(For the record, I outgrew the HC08 and moved to AVRs which is a move I >have not regretted, but it would be nice to have USB device in a AVR PDIP).
Use what works for you. I have to say that I found the AVR both excellent to work with on the first instrument I ever developed (it used the AT90S2313 (memory serving).) But the instruction set isn't by any means 'wonderful.' (I coded the application entirely in assembly.) There are some design decisions there that I considered 'poor,' even under the circumstances. Extra work to carefully craft around them, but the chip worked extremely well so I really had no complaints at all about the experience. More, I actually wrote quite a glowing report about the project here in this group at the time because the documentation and chip worked as advertised. The support from Atmel was far, far inferior to what I later received from Microchip, though. Microchip's support is so much better that they aren't even in the same universe. And so long as they field parts meeting needs, I use them. I'm NOT using them in a current project and the part I am using comes from a company that doesn't support it's products nearly as well. But that's because Microchip's parts don't qualify here and the other company's does extremely well for the purpose.
>Years later, I cannot remember what I disliked most about the PIC; my >lasting memory is more of coming away from reviewing it and never wanting >to go near it again. :-)
Have you programmed an 8051 core? Anyway, the business of selecting parts is a lot more than some instruction set. In fact, to me the instruction set counts for roughly zero of my consideration. So long as it includes the basics required for doing computations and conditional code, I don't look much further there. And customer requirements never seem to impose instruction set considerations so that is that. Jon
On Jun 10, 4:44=A0am, D Yuniskis > Had you seen the *original* PICs
(General Instruments) *and*
> compared them to what was available from other vendors at > the time, you would have found it amusing: > =A0 =A0"Is this a joke? =A0You know, one of those April Fool's Day > =A0 =A0bogus advertisements?" > (I had a similar reaction when Motogorilla later introduced > their *one* bit "ICU")
Does anyone know someone who actually _used_ that one-bit ICU ? [MC14500B] I remember doing a CPLD version, as a teaching exercise. I see there is even an opencores page (no code yet) http://opencores.org/project,icu -jg
Hi Jim,

-jg wrote:
> On Jun 10, 4:44 am, D Yuniskis > Had you seen the *original* PICs > (General Instruments) *and* >> compared them to what was available from other vendors at >> the time, you would have found it amusing: >> "Is this a joke? You know, one of those April Fool's Day >> bogus advertisements?" >> (I had a similar reaction when Motogorilla later introduced >> their *one* bit "ICU") > > Does anyone know someone who actually _used_ that one-bit ICU ? > [MC14500B]
Dunno. I recall the small *red* pamphlet. Looked like someone had invested *just* enough effort to make a good April Fool's Joke out of the thing (like Signetics' WOM... I particularly liked the 2% tolerance on Vdd :> ) (sigh) No more clever hackers. :<
> I remember doing a CPLD version, as a teaching exercise. > > I see there is even an opencores page (no code yet) > http://opencores.org/project,icu
On Wed, 09 Jun 2010 07:37:07 -0600, hamilton wrote:

> On 6/9/2010 12:51 AM, Meindert Sprang wrote: >> "Grant Edwards"<invalid@invalid.invalid> wrote in message >> news:huljbj$aft$2@reader1.panix.com... >>> In my experience, "yuck!" is what anybody trying to use C on a PIC >>> ought to expect. [IMO, "yuck!" is what you get using asm on a PIC as >>> well, but that's probably a little more subjective.] >> >> "Yuck" is what you get when using a PIC at all..... Whoever designed >> this architecture should be crucified!! > > Yes, and they are laughing all the way to the bank. > > Not bad for a "Yuck" design. > > hamilton > > > >> Meindert >> >>
Not bad indeed. 6 billion microcontrollers shipped. The latest financial report says they are close to 950K development systems. They shipped 45,000 this last quarter alone. Record revenues and dividend increased to 34.2c/share. Plus now I can order small qty parts pre-programmed. One time setup fee of $60 and something like 10 or 20 cents per part to program. Just like any other microcontroller the PIC series have a sweet spot for solving particular problems. If your requirements are to run a full blow RTOS or Linux then dont spec a PIC. Frankly I dont worry too much about the compiler. I can spend my time in better ways. If I'm so code size constrained that I'm worried about the compiler using 8 instructions instead of 4, or performance constrained that looping 16 times is a killer, then code the function in asm, spend the big bucks for a different compiler or choose a different microcontroller. Hell, the X86 architecture sucks but it aint going away any time soon. I've done several projects using a PIC. My current project wont be a PIC, the PIC is not a correct fit for the problem set. The next project on the horizon probably will be a PIC, different set of requirements. -- Joe Chisolm Marble Falls, Tx.
On 10/06/2010 00:15, Jon Kirwan wrote:
> On Wed, 9 Jun 2010 18:46:50 +0000 (UTC), Simon Clubley > <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote: > >> PIC: The Microsoft of the embedded world. >> >> (eg: great marketing, lousy architecture :-)) > > It is about great support not great marketing. Engineers > doing design aren't long fooled by marketing. > > Microsoft worked hard (and illegally, it turned out) to > control market channels and sells into what is basically a > broad-based, largely ignorant marketplace. Microchip sells > to well-informed engineers and so far as I'm aware hasn't > acted to force illegal contract terms onto distributers. > > Microchip simply supports their customers well and that > counts for something with engineers in the end. >
I'm not sure I agree here. A huge percentage of Microchip's user base are /uninformed/ engineers. People pick Microchip and PICs because that's the microcontroller they've heard of. When you are looking for your first microcontroller, you don't know much about a company's support - you probably don't even /think/ about support until later on when you are having problems. Microchip have made a very strong commitment to marketing their devices to small users - hobby users, students, small companies, and other first-time microcontroller users. That's how they get their customers - companies pick them because their developers are already familiar with the devices from their hobby days. Great support is how Microchip /keep/ their customers. Great marketing, especially aimed at small users, is how they get the customers in the first place.
"Jon Kirwan" <jonk@infinitefactors.org> wrote in message
news:vh4016t265upie4f0k1q0s28phj5gu6jh2@4ax.com...
> Use what works for you. I have to say that I found the AVR > both excellent to work with on the first instrument I ever > developed (it used the AT90S2313 (memory serving).) But the > instruction set isn't by any means 'wonderful.' (I coded the > application entirely in assembly.) There are some design > decisions there that I considered 'poor,' even under the > circumstances.
My first commercial product was based on the Z80. After that I did a lot of stuff with 8051's and at a certain point I needed something faster and explored the AVR. The instruction set gave me a dej&#4294967295; vu feeling of the Z80 era and I like it. Part of that project was done in assembly for speed reasons and it worked like a charm. When I now look at the assembly of the PIC, I just can't get my head around it to understand what is happening, the acronyms used are so far off of my 'gut feeling' and that is important to me. Reading AVR assembler to me is so much more 'logical' than PIC assembly. Though my first commercial PIC project was built around a 12C508 and it comprised a whopping 25 words of assemly code. For that project, I loved that PIC! But looking at an 18F8720 capable of addressing 2M of program memory, I simply cannot understand why RAM is stil accessed in 256 byte banks.... Yuck again!! Meindert