Prev: 1000V high side gate drive
Next: Micpre of Graham
From: Anthony Fremont on 16 Mar 2007 15:26 Tim Wescott wrote: > John E. wrote: > >>> I will mention that for most microprocessors the verb is "use", but >>> for PIC it's "suck it up and use" -- Microchip does a sterling job >>> with peripherals, pin drive and features, but gawd I hate their >>> architecture. >> >> >> Which just *begs* the question: whose architecture do you consider >> to be the antithesis of the PIC's? (ie, less obtuse, resulting in >> your being more productive?) > > Almost anything but an 8051? I heard that. That is truly the ugliest archetecture. > Actually, just about anything that has a stack-oriented architecture, > or a register-oriented architecture with an orthogonal instruction > set and decent indexing. If I can, with confidence, slam a bunch of > parameters onto the stack or into some registers and call a function > without worry, then I'm happy. But but but an 8052 has a stack and an available stack pointer. Don't you like it? > The PIC (and the 8051, and some others) are so poor at stack usage and > pointer manipulation that unless one wants severely inefficient code > one pretty much has to define all the program data as a bunch of > globals. If you try to make your life more efficient by programming > in C, you'll find that the C compilers for the PIC and 8051 give you > a choice between something that isn't quite C, or C code that's > _really_, _really_ inefficient. If you want to write assembly using > C calling conventions -- well, find another processor, because you > can't. The Keil compiler generates nice dense code on the 8052, but it costs a fortune too. At the other end of the spectrum you have SDCC, ha ha ha. I'd rather have a sharp stick in the eye. ;-) Have you looked at the 18F pics? They added some things that make it much more friendly to C compilers. Tripple data pointers (FSRs), auto increment/decrement, bigger stack, W is a real SFR, LAT registers to eliminate RMW issues for people too lazy to use a shadow register, etc. Nice chip, I'll have to try one sometime. ;-)
From: Anthony Fremont on 16 Mar 2007 15:34 TT_Man wrote: >> As you said, PIC is king and it is for a reason, they work. >> > Only if you can get to grips with the appalling op code set..... OK > if you can program in C , I suppose.I can't/won't I only do assembler on the PIC too. What's wrong with the op-code set? It's RISC, it has 35 instructions, it's not supposed to be luxurious. It's supposed to be functional and fast....it succeeds. ;-) Just for background reference, I came from being a mainframe assembler programmer on a processor with a 10 bit op-code. I know it's tedious sometimes, but when you only have one working register it's going to be that way no matter what.
From: Homer J Simpson on 16 Mar 2007 16:00 "Anthony Fremont" <spam-not(a)nowhere.com> wrote in message news:12vlsaujevici3d(a)news.supernews.com... > I only do assembler on the PIC too. What's wrong with the op-code set? > It's RISC, it has 35 instructions, it's not supposed to be luxurious. > It's supposed to be functional and fast....it succeeds. ;-) Just for > background reference, I came from being a mainframe assembler programmer > on a processor with a 10 bit op-code. > > I know it's tedious sometimes, but when you only have one working register > it's going to be that way no matter what. I don't think C is a great choice for small processors like the PIC. I wonder if a version of Tiny Pascal might not work better.
From: John E. on 16 Mar 2007 16:57 > What you're seeing here is an unfair attack on PICs Let me ask that we not take an attack on a particular microcontroller as an attack on one's person. Or one's child. (c: There are preferences, always will be whether we're talking about cars, chips, or... well, tortilla chips. Tell me what you like and don't, and why. I'm all ears. -- John English
From: bungalow_steve on 16 Mar 2007 18:21
On Mar 15, 4:52 pm, John E. <incogn...(a)yahoo.com> wrote: > PIC is king, I'm sure. But I'd like to hear from those who are using all > brands. Whichever you use, what do you like about it? What don't you like > about others? Suggestions re. learning? > > I've programmed 68000 assembly and some higher-level languages (FORTRAN; some > BASIC; COBOL if forced to admit it), so no stranger to programming, per se. > > Thanks, > -- > John English 32 bit ARM's are nice, you can get them in small 4x5 mm packages up to huge floating point versions with 256K of RAM, the small ones are a few bucks. They work very well with high level languages and the assembly is easy, you spend more time doing stuff rather then fighting with the limitations of smaller PIC's, AVR's and 8051's (bank switching, multi word math, accessing 16 bit hardware with double reads that have to be done in a certain order, etc,etc,etc all that weird goofy stuff goes away). About C, you have to realize that the majority of example code out there is in C, I hate the language myself, but I use it because it is so easy to pick up someone's elses C code and start working with that. I bought an ARM development kit recently and was up and running in a few hours (blinking LEDS, reading A/D's, and sending the data to the PC via the UART), cause they had C examples of everything, converting the A/D inputs, UART utilities, start up files etc. You have to remember the actual number of C features actually needed in a small embedded processor is very little... learn a couple while/ for loops, if statement, how to set/clear a bit and how to call a routine and what else is there? not much |