I regularly program both 65C02 applications and PICs as well in my work. Microchip claims their PIC microcontrollers are so screaming fast and efficient. But in my experience of developing several products, I have to say that the nice things about the PICs are that they have a nice set of I/O options, good on-board uP support, free macro assembler and simulator, the PICs are available in a lot of versions from many different stocking distributors, and they can easily be programmed at the workbench.
However, I can also tell you from experience that the processor core in a PIC microcontroller is miserably primitive compared to the 65c02. Even though both are available in 20MHz, the PIC will generally take twice as many cycles to do a job, and it's only suitable for very small jobs.
If you have an iterrupt where W (the working register, like 65c02's accumulator) and status register must be saved, you're looking at 30 clocks to do what the 65c02 does in 11.
Implementing look-up tables with the PIC are mickey-mouse at best, and if you end up having to cross page boundaries, a simple indexed look-up that takes one instruction and 4 or 5 clocks on the 65c02 may take 9 instructions and a subroutine level in the return stack on the PIC, and a very long 48 clocks!
PICs' lack of stack access and shallow stack depth are very limiting. Page- and bank-switching time waste memory and execution time, and make the code more unreadable. Some basic operations, like rotating, cannot be done in PICs' working register. If you want to test a processor status flag and conditionally branch, the 65c02 will use one instruction and 2-3 clocks, while the PIC takes two instructions and 8-12 clocks (2 or 3 "cycles", at 4 clocks per cycle).
I could make a dissertation out of this (with plenty of proofs), but my point is that the 65c02 is not some obsolete thing that should have been thrown away years ago. It has a very high power-to-complexity ratio, and Microchip would do well to scrap their decrepid RISC core and replace it with a 65c02 core for their microcontrollers. As we all know however, what's sensible is not what drives a market.
Garth Wilson
_________________ http://WilsonMinesCo.com/ lots of 6502 resources The "second front page" is http://wilsonminesco.com/links.html . What's an additional VIA among friends, anyhow?
|