PICs can be thought of as running 1/4 their rated speed correct? In other words, doesn't it take 4 CLK cycles = for a single PIC instruction cycle? Doesn't look like these guys are pipelined so I'm assuming this is correct.....
-Adam
PICs can be thought of as running 1/4 their rated speed correct? In other words, doesn't it take 4 CLK cycles = for a single PIC instruction cycle? Doesn't look like these guys are pipelined so I'm assuming this is correct.....
-Adam
"ajcrm125" schrieb im Newsbeitrag news: snipped-for-privacy@g47g2000cwa.googlegroups.com...
This is fully correct. However there is a pipelining between the instruction fetch and the 4-cycle instruction execute. This interleaves the ROM access time with the instruction execution time. Thats why it takes extra 4 clocks on jumps. Without this pipelining a PIC would need 8 cycles per instruction.
After all, a PIC executes read modify write cycles in its 4 cycle instructions. That was quite a nice architecture in the 70ties.
But it's not a RISC in the meaning of RISC nowadays.
MIKE
So beacuse of this.. would it be more beneficial to go with a different microcontroller family/vendor? (I guess the answer would be based on performance requirements eh?)
I used PICs fpr several years, but because of the availability of a free C compiler (gnu) and the better functionality and performance i decided to switch ti Atmel ATMega.
Regards, Kurt
-- Kurt Harders PiN -Präsenz im Netz GITmbH
Atmel CPUs are great for beginners because of several factors:
Although, PICs do have its own advantages for beginners:
PIC programmers are complicated beasts due to the need for controllable dual voltage source. Cheap ones tend to not be reliable and I've even had to debug a programmer a friend of mine bought once. I use the fairly expensive EPIC programmer (~ USD $100) which have't given much problems.
And this gcc fits into eclipse as ide.
Thats half the truth :-). One additinal reason for my switch from PIC to Atmel was the paging structure of PIC memory for both, code and data. With growing complexity and size of the program this became the favorite source for problems :-).
Regards, Kurt
-- Kurt Harders PiN -Präsenz im Netz GITmbH
You mean paged instruction memory and banked file registers? I use C compilers (HITECH & CC5X depending on app) so they don't bother me.
Adam, if you really want to go the PIC path (due to larger online comunity etc..) then I suggest you look at HITECH and CC5X for compilers. They are commercial but lite versions are free for non commercial use. HITECH C supports 3 of the most popular PICs including 16F877. It is limited to producing only 4k programs but then again that's how much memory these chips have anyway. CC5X supports everything in the 16C/F family. But it can only compile up to 1k. But it does compile into assembly. Larger code can be split up into multiple C files to gnenrate multiple assembly files and then use MPASM to assemble together.
Anyway, I think Kurt is right, there are far more compelling reasons to use AVR than PIC. The only reason to use PICs is the huge amount of code available online.
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.