??? 08/30/06 16:26 Read: times |
#123393 - True Responding to: ???'s previous message |
Saif Ullah Khalid said:
the very architecture of pic is not so straight forward as its a perception that many hobbyists will get on it easily,their are chores like bank switching,banked ram etc etc,... I agree 100%. The 8052 assembly language and architecture is much easier to understand and use than the PIC. It has to be marketing--from a hobbyist standpoint where the only concern really is ease-of-use, you'd think the 8052 would win hands down. so if u are programming them in c then its not that painfull,but what really appeals is vast variety of peripheral integration +cost.in my experience c compiler from HI-tech (PICC)is really a wonderfull compiler when working with Midrange pic micros like 16fxx.The code generated by this compiler is highly optimised in both code and execution that in 90% of cases its comprable to assembly code. Interesting. I'd be very skeptical of using 'C' on the PIC just because there's relatively little memory and things require so many instructions to accomplish. Even if 'C' is optimized, you still have the libraries and all the sloppy techniques you can use when you have them available. For example, code to output a byte as two hex digits to the serial port might take around 10 instructions on the 8052. But if you're working in 'C' and you use printf, you immediately add a LOT of library baggage. That code might be optimized, but it's still there. I would just think that 'C' programs on the PIC would have to be very small. The PIC I'm working with now has 2k. I can't imagine doing any real 'C' programming that required any libraries and having much of any code space left over for the actual program. Then again, I might give it a quick shot. If the code is as optimized as you say it is and I just stay away from using any 'C' libraries, maybe I can get this thing working without actually having to suffer through the PIC's instruction set. Regards, Craig Steiner |