EmbeddedRelated.com
Forums

C18 Compiler again

Started by Meindert Sprang June 7, 2010
On Thu, 10 Jun 2010 08:57:56 +0200, "Meindert Sprang"
<ms@NOJUNKcustomORSPAMware.nl> wrote:

>"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.
I think I went a similar route, though my first consulting work was on an 8080A, then 8085 and Z80, then 6502, then 8088, then I think HC11 and 8051 were nearby each other in time, then more 8088 stuff, then 68332, then MIPS R2000, then 88k, and so on. The AVR as part of a real instrument and a commercial product came perhaps around 1998, for me. The AT90S2313.
>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.
Worked like a charm for me, too. I've no complaints on that score.
>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.
I have zero problem with the PIC. I can switch from it to a parallel DSP, to an out-of-order execution P4, then to an RS08, then to a nice clean 88k, and then to a MIPS R2k, one week to the next without feeling out of sorts about any of it. I haven't encountered an instruction set hard to grapple with, except some truly non-standard, arcane stuff that never really went anywhere. Like I said, instruction set is usually at the bottom of the pile of my concerns unless the customer places it elsewhere.
>Reading AVR assembler to me is so much more 'logical' than PIC assembly.
Hehe. Well, okay. One could just as well argue that the PIC is more like _exposed_ logic, which technically makes it "more logical" in another sense. It's more like what you'd do if you only had 7400 series SSI to work with. And it is quite logical from that standpoint. But yes, I enjoyed AVR assembly just fine. A few gripes made me wonder "why?," though.
>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!!
It's been awhile for me with assembly on the PIC18F, but I seem to recall that there are FSRs which can access all of the memory address space (which isn't that much, really.) Or banking. And all of the instructions can use bank 0, directly, I seem to recall too. I don't know anything about the 8720, though. Jon
On Thu, 10 Jun 2010 08:55:11 +0200, David Brown
<david@westcontrol.removethisbit.com> wrote:

>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.
Okay. So you are arguing that uninformed design engineers are like windows computer buyers? I can't go there. I am tempted, at times. But no.
>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.
Well, I think we agree on the "keep" part, of course. But the rest doesn't really dispute what I was addressing. The person I was writing to was summing up Microchip in a Microsoft comparison, implying that it's all just marketing. And I know Microchip's success is not _all_ marketing or even half marketing. I'll leave it there, though. Jon
On Thu, 10 Jun 2010 02:01:49 -0700, I wrote:

>I think I went a similar route, though my first consulting >work was on an 8080A,
Earlier unpaid experiences (at university) were with IBM 1130 (asm and FORTRAN II), IBM 360 (BAL), PDP-8 (assembler), PDP-10 (FORTRAN and ALGOL-68), PDP-11 (assembler and later in 1977/78 in c), and HP 2116 and 2114 (all assembler.) There was a Bouroughs thing in there somewhere and an IBM System 3 and RPG II, as well, which was paid work. Starting in 1979, I was paid to work on the VAX-11/780 in MACRO-32, BLISS-32, C, BASIC, and COBOL. That would have been around the time when I also began using the 6502. Jon
On 10/06/2010 11:05, Jon Kirwan wrote:
> On Thu, 10 Jun 2010 08:55:11 +0200, David Brown > <david@westcontrol.removethisbit.com> wrote: > >> 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. > > Okay. So you are arguing that uninformed design engineers > are like windows computer buyers? >
No, I am arguing that people with little or no experience of microcontrollers are likely to pick a device that appears popular. PICs turn up pretty quickly in any search on the web, or "learn to use microcontrollers" books. Whenever someone starts looking at a new topic, they are "uninformed" by definition. Microchip targets this area very successfully. I have no facts or figures to back this up, but I would expect that most PIC users used PICs as their first microcontroller. Relatively few will have switched from other devices to PICs.
> I can't go there. I am tempted, at times. But no. > >> 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. > > Well, I think we agree on the "keep" part, of course. But > the rest doesn't really dispute what I was addressing. The > person I was writing to was summing up Microchip in a > Microsoft comparison, implying that it's all just marketing. > And I know Microchip's success is not _all_ marketing or even > half marketing. I'll leave it there, though. >
I certainly agree that Microchip's popularity is not all marketing - I just think that their marketing strategy of targeting small users is a big contributor to their popularity. This is in no way a bad thing or a derogatory comment - good marketing is important to businesses. It is not remotely like Microsoft's business practices. But even their success is not all due to marketing - some of it is due to coercion, bribery, and other illegal or unethical business practices.
On 10/06/2010 11:01, Jon Kirwan wrote:
> On Thu, 10 Jun 2010 08:57:56 +0200, "Meindert Sprang" > <ms@NOJUNKcustomORSPAMware.nl> wrote:
>> Reading AVR assembler to me is so much more 'logical' than PIC assembly. > > Hehe. Well, okay. One could just as well argue that the PIC > is more like _exposed_ logic, which technically makes it > "more logical" in another sense. It's more like what you'd > do if you only had 7400 series SSI to work with. And it is > quite logical from that standpoint. But yes, I enjoyed AVR > assembly just fine. A few gripes made me wonder "why?," > though.
The key to understanding Microchip PIC assembly is to view it as lower-level than "normal" assembly language - it's closer to a sort of microcode. If you view the "w" register as a sort of internal temporary storage within an ALU, rather than a "normal" register, then it all makes more sense. At least, it did to me when I worked with it about ten years ago.

David Brown wrote:

> > Microchip simply supports their customers well and that > > counts for something with engineers in the end. > > > > . . . > > 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.
This says it all. In practice Microchip has done a good job at every customer level. A lot of silicon companies could learn a lot about the way Microchip deals with their customers when they meet them at trade shows and promotional events and annual user conferences. All of these meetings have substance backed by user notes, reference designs and hard information. Microchip's after sales support is second to none. They know better than most companies how their product can be used competitively and aggressively go after that market. Regards, w.. -- Walter Banks Byte Craft Limited http://www.bytecraft.com

-jg wrote:

> Does anyone know someone who actually _used_ that one-bit ICU ? > [MC14500B]
It was used as far as I know for essential one application area low speed switching and sequential applications. The only application I know for sure was traffic light control. At the time it was a low cost solution replacing mechanic timers and relay sequencers. Regards, w.. -- Walter Banks Byte Craft Limited http://www.bytecraft.com
On 2010-06-10, David Brown <david@westcontrol.removethisbit.com> wrote:
> 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. >
Exactly. [To everyone: don't forget that unlike most people in this newsgroup, I am a hobbyist when it comes to embedded work so the issues which matter to me are very different from those which matter to you. You are looking for support for your commercial product; I am more concerned with been able to use the devices in a home development environment.] When I started out, I didn't really have an opinion about which then current microcontroller to choose. I did however see PIC been pushed to the hobbyist in places like Maplin and I saw that Microchip had a lot of support in various ways for the hobbyist user. The comparison to Microsoft is because I realised that Microchip knew, like Microsoft, that if you spent time and money targeting the hobbyist, you stood a higher chance of the hobbyist recommending your products when they got into a work environment. Support for the hobbyist user, even when it costs money, can be regarded as a form of marketing as you are using that support as a way of trying to draw new people into using your products in the future. However, I made sure I evaluated all the architectures which met my needs at the time so I ended up rejecting PIC in favour of the HC08 and then the AVR. (So I did make an engineering type choice instead of a "what's popular" choice after all. :-)) Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980's technology to a 21st century world
On Thu, 10 Jun 2010 12:21:13 +0200, David Brown
<david@westcontrol.removethisbit.com> wrote:

>On 10/06/2010 11:01, Jon Kirwan wrote: >> On Thu, 10 Jun 2010 08:57:56 +0200, "Meindert Sprang" >> <ms@NOJUNKcustomORSPAMware.nl> wrote: > >>> Reading AVR assembler to me is so much more 'logical' than PIC assembly. >> >> Hehe. Well, okay. One could just as well argue that the PIC >> is more like _exposed_ logic, which technically makes it >> "more logical" in another sense. It's more like what you'd >> do if you only had 7400 series SSI to work with. And it is >> quite logical from that standpoint. But yes, I enjoyed AVR >> assembly just fine. A few gripes made me wonder "why?," >> though. > >The key to understanding Microchip PIC assembly is to view it as >lower-level than "normal" assembly language - it's closer to a sort of >microcode. If you view the "w" register as a sort of internal temporary >storage within an ALU, rather than a "normal" register, then it all >makes more sense. At least, it did to me when I worked with it about >ten years ago.
Since I've actually designed ONE actual, functional micro with logic gates and actually ran programs on it with a display and had it work (after much wrangling to fix my errors), I can with some modest authority generally agree with that. And I don't find it a problem. It works well enough. Jon
On Thu, 10 Jun 2010 12:14:10 +0200, David Brown
<david@westcontrol.removethisbit.com> wrote:

><snip> >Whenever someone starts looking at a new topic, they are "uninformed" by >definition. Microchip targets this area very successfully. > >I have no facts or figures to back this up,
I was going to ask, "How so?" to the first paragraph and then read this. So I guess I can't ask that question, now. It's seems now apocryphal and must simply be left there.
>but I would expect that most >PIC users used PICs as their first microcontroller.
I certainly don't help you there. I have had long, long experience with other micros before using PIC micros.. going back to the MITS ALTAIR 8800 I built circa 1975.
>Relatively few will >have switched from other devices to PICs.
Again, I guess I'm a data point of one against your point. Jon