Em 20/10/2011 09:20, alan.b.pearce@stfc.ac.uk escreveu: >>> Err, yes, but you do need to appreciate the underlying architecture of = the chip, >> Why would you *need* to appreciate it? I don't think many PC users >> appreciate the finer details (or any details at all) of the x86 or x386 >> architecture (much less the horribly complex yet very successful >> siblings that we use today). >> >> I am now doing some work on a Cortex chip in C++. I am very familiar >> with the ARM architecture and instruction set, but I don't feel any need >> to dig into the Cortex instruction set. The authors of the GCC back-end >> have done that, so I can go on with my work very effectively without >> such knowledge. And later on I might switch to a PIC32, again without >> first digging into the instruction set architecture. >> >> I don't say that some knowledge of the asm level can't be beneficial, >> but say that you *need* it is ridiculous. > Um, not really, does the compiler automatically set the TRIS, LAT or PORT= registers for you? All the PIC C code I have seen manipulates these in som= e way that is set by the writer of the end application. The pitiful semi-professional compilers need help from the programmer. I use Hi-Tech PICC and it is plain standard ANSI C. > > Similar things happen with some of the config registers, Those you need to care of, but they have nothing to do with the instruction set and only a few with the memory organization. They are related to the peripherals. > and how they affect things like watchdog operation on some chip families= .. This varies on a part-by-part or group-by-group basis, it is not related to the PIC architecture itself. Other MCU manufacturers have much similar or much different approaches, but in the end you need to know your peripheral's requirements. No ASM required. > > Some of these things get ingrained in the mind better by using ASM level = code rather than going to the higher level where it gets abstracted somewha= t.=20 I can use things like "ClrWdt();" in C, or "INTCON =3D 0xc0;". Why would I need assembly? Note: I know and used to program very well in assembly (of a lot of architectures). I simply don't feel the need and the patience to created projects exclusively in assembly. Isaac --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .