solarwind escreveu: > Also, another advantage to using HI-TECH or Microchip C compilers is > that their headers are almost, if not completely identical to the > MPASM headers. That means you can use the address constants just as > you were using ASM. Example, if you want to access PORTC, just use > PORTC. If you want RCREG, just use RCREG. If you want AD1ON (a bit in > ADCON1 I believe), just use it like that with its actual name. Also, > they have some nice delay stuff there too where you just specify your > clock frequency in your code and call delay_us or something like that. > Even still, to use the high level functions like printf, all you need > to do is impliment putch(unsigned char); in your code and you can use > pretty much the full functionality of printf in your microcontroller > code. > > Use C. > = I agree. Years ago, I used to program PICs in assembly only, because of the lack of good C compilers. I created a library of macros for easing things (I don't know Olin's library but I think mine should be somewhat equivalent, although I didn't create a preprocessor). Now I prefer to program in C. After everything is working I rewrite the speed/timing/space critical modules in assembly, usually using the compiler generated code as a start. I always keep the C modules in sync with their assembly counterparts, so when I need to port the project to another architecture most of the work is already done. For big projects I use cross-development. I create functions for the PC that are a direct port or emulate/simulate their counterparts in the PIC. The application modules I write to compile both in the PIC and in the PC (sometimes with some #ifdef). This way I can run my application natively in the PC also. That is great for debugging and accelerates the development cycle. Regards, Isaac __________________________________________________ Fa=E7a liga=E7=F5es para outros computadores com o novo Yahoo! Messenger = http://br.beta.messenger.yahoo.com/ = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist