[Comparison] PIC vs 8051

For someone eventually migrating to ARM based architectures - which of these, 8051 or PIC16, resembles ARM more closely from programmer point of view - memory structure/model, assembly etc.

Cheers

Reply to
sukrit.mehra
Loading thread data ...

The comparison is a bit like wanting to be a truck driver when you grow up, and asking if it is best to start learning with a wheelbarrow or a bicycle. The wheelbarrow and the bicycle are useful tools, but bear little resemblance to a truck (especially as you are asking specifically about the cpu architecture).

In other words, neither the 8051 nor the PIC16 are remotely close to the ARM in terms of the architecture (and not very close in hardware or peripherals either). If you are looking to learn about microcontrollers, look elsewhere - the 8051 and PIC16 are way outdated, and are of primary interest for specialist applications, where backwards compatibility with outdated hardware or software is important, or (for the 8051) where the range of suppliers is important.

If you are starting from scratch, and are sure you want to end up with the ARM (there are other choices, you know), you are probably best off going straight to the ARM. If you want to start with something smaller and simpler, but a little closer to the ARM architecture, you are probably best with the msp430 (not quite as RISCy, but flat memory model) or the AVR (more RISCy, but more complex memory model).

Reply to
David Brown

The MSP430 won't teach you too many bad habits and it's a nice clean instruction set. (It'll also give you a good heads-up should you ever fall back through a timewarp and need to program PDP-11s).

pete

--
pete@fenelon.com [Support no2id.net: working to destroy Blair's ID card fraud]
Reply to
Pete Fenelon

The Motorola 68xx family is a lot closer to the PDP-11.

Reply to
Everett M. Greene

My homework detector just went off...

The 8051 has registers, and has register pointer operations on two of them. The PIC16 has no registers - so the answer is, of the two distant stars, the 80C51 is closer to the ARM. [but both stars are a long way away..]

-jg

Reply to
Jim Granville

Whaddaya mean? The PIC has _lots_ of registers. It just has no RAM...

And you can have indirect access to registers though the FSR and INDF. Woo-hoo!

Regards, -=Dave

--
Change is inevitable, progress is not.
Reply to
Dave Hansen

Neither. They are completely different to the ARM

Ian

Reply to
Ian Bell

No, the PIC is really weird. What everyone else calls registers the PIC doesn't have. The PIC calls its internal RAM registers.

Ian

Reply to
Ian Bell

Yes exactly, that always messed with my brain cause not all of the "registers" are accessible anyway. Touching them can cause trouble, plus you got the:

bsf STATUS,RP0 bcf STATUS,RP1

With the annoying banking to get at some registers (particularly the port direction registers).

Out of the two I would take the 8051 though, since it is a more logical architecture. But I find with PIC's at really low clock speeds (say slowing down the 16F628's internal 4MHz osc to 37kHz), you can't beat their power consumption. They draw current in the microamps range, making it a nice choice for battery operated devices.

Anyway's to answer the OPs question. The ARM has no resemblance to those two 8-bit MCU's. I think it is much closer to a conventional microprocessor than the 8051 and PIC are.

Reply to
Isaac Bosompem

I always thought the PIC might be a handy device. But I have used micros (4,

8 and 16 bit) professionally for over 20 years and the stupidly odd terminology the PIC uses for things known commonly by other names simply alienates me from the parts.

Ian

Reply to
Ian Bell

I think you need to increase the gain on your sarcasm detector...

Just to muddy the waters further, consider that the 8051 has _no_ general purpose registers. Well, other than A and B, I suppose, but I don't consider those "general purpose." R0 through R7 are all in RAM.

Regards, -=Dave

--
Change is inevitable, progress is not.
Reply to
Dave Hansen

You need to study the 80C51 opcode encoding, and read the data sheets.

What matters is what Intel called Registers, not what someone else thinks Registers might be...

-jg

Reply to
Jim Granville

Would it be safe to say that registers are locations that are addressed by one or more bits in an opcode while a memory location is a location that is addressed by an operand (address byte/word) to an opcode?

In that case, some 8051 registers are both....

Meindert

Reply to
Meindert Sprang

68xxx maybe; 68xx doesn't have enough registers or addressing modes to feel like a PDP-11 -- at least not to me ;)

pete

--
pete@fenelon.com [Support no2id.net: working to destroy Blair's ID card fraud]
Reply to
Pete Fenelon

I always thought the PIC might be a handy device. But I have used micros (4,

8 and 16 bit) professionally for over 20 years and the stupidly odd terminology the PIC uses for things known commonly by other names simply alienates me from the parts.

Ian

Reply to
Ian Bell

The PIC is a pile of I/O lines and some peripherals with just enough glue in the middle to hold it together as a CPU. Nobody chooses one because of the instruction set or architectre... For a long time I reckoned the only thing that kept Microchip going was Keeloq.

Every time Microchip have tried to make a "more modern PIC" they've hit the wall - PIC17 was a monstrosity which even the firm's own engineers don't like to talk about; PIC18 is less gruesome but still too expensive and unpleasant to program; PIC30 has a (relatively) nice architecture but was too little, too late - conventional micros and cheap fixed-point DSPs outperform it for less money.

I've often expressed the opinion that the best thing Microchip could do is license the ARM7 core and mix that with their expertise in packaging and peripherals. As CPU designers, they can't keep up.

pete

--
pete@fenelon.com [Support no2id.net: working to destroy Blair's ID card fraud]
Reply to
Pete Fenelon

I do know of other volume applications. They are very aggressive on price for high volume applications. I found one once in a hair dryer, one in an electric toothbrush and we actually used one once in a CO2 detector design.

But I agree, they are crap devices.

Ian

Reply to
Ian Bell

6800 is kinda correct: It was all of PDP-11 Motorola could squeeze on the silicon of that day. Motorola was using PDP-11's for their system products, and the resemblance is not accidental.

Of course, most of the good ideas of PDP are missing:

- multiple general registers, - homogenous addressing modes, - subroutine call with register linkage

The worst property of a 6800 is the bottleneck created by the accumulators and a single addressing register (X).

There are other PDP-like architectures: M68k and Hitachi H8. IMHO, both have lost some of the beautiful simple completeness of the genuine PDP-11.

--

Tauno Voipio
tauno voipio (at) iki fi
Reply to
Tauno Voipio

I don't doubt that there are *many* ultra-low-margin applications that use PICs (and many of them could probably get by with a 555 timer and no micro, but everything's got to have a micro in it these days, right?!) but Keeloq seems to be the one truly profitable line of business Microchip have. Then again they have some good points; sitting right next door to Intel's fabs in Chandler basically means that as Intel scrap one line Microchip can take it over ;)

I'm not quite sure what they're trying to achieve with PIC24, either - cutting the fixed-point DSP end off PIC30 doesn't seem to be much of a saving?

pete

--
pete@fenelon.com [Support no2id.net: working to destroy Blair's ID card fraud]
Reply to
Pete Fenelon

[...]

In the applications where I've used them, they were chosen for their mix of I/O and their environmental specifications. And their price. As the software guy, I was always looking for better alternatives, but everything cheaper didn't have the I/O we needed, and everything that did was _way_ more expensive. I remember one project I asked purchasing to get a quote for a Cygnal (now SiLabs) part (F300 IIRC). They came back with about $6.50 at 10k quantities, which was about 5x the Microchip part.

I've always had good luck with their support as well.

Actually, I never used that.

Actually, they're good, solid, reliable devices with a hideous programming architecture. Cheap doesn't hurt either, especially in high-volume applications that can tolerate a little extra NRE.

Regards, -=Dave

--
Change is inevitable, progress is not.
Reply to
Dave Hansen

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.