Did you see the message below? It was lost the day before yesterday and did not come back home. Its family is very worried, any clue is welcome. -------- Mensagem encaminhada -------- Assunto: Re: [PIC ] PIC Assembler Data: Thu, 25 Aug 2016 23:35:40 -0300 De: Isaac M. Bavaresco Para: Microcontroller discussion list - Public. The most important benefit of using C (or other high-level language, although only C is available for virtually every existing architecture) is portability. I write my code as hardware-independent as possible, keeping all the hardware-dependent routines in separated files. When porting some application to a different platform, I just need to rewrite a few source files. I would say that 80% of my code is shared unmodified across platforms (PIC16F, PIC18F, PIC24, dsPIC, PIC32, Cortex M3, 8051, AVR, etc.), while the remaining 20% is platform-specific. That would not be possible if I used assembly. I have a large library of functions, that I use almost unmodified, such as bit-banged I2C (I prefer using bit-banged because I don't need to worry about dealing with different hardware implementations, and some platforms don't have the peripheral anyway), AES encryption/decryption, HD44780 LCD, graphical LCD, RTOS, keyboard decoding, and much more. For instance, my keyboard routines use only two hardware-specific routines: void SelectColumn( int column ); and unsigned char ReadRows( void ); Those two routines are kept in a separated source file and must be ported. In that file also is implemented the timer ISR that calls regularly the routine void KeyboardScan( void ), which is kept in the file common to all architectures, together with all the rest (decoding, buffering, reading, etc.) . Cheers, Isaac Em 25/08/2016 22:28, David Duffy (AVD) escreveu: > I also write code for Atmel (MEGA and XMEGA) chips as well as other=20 > devices that use C. > > Letting the compiler deal with RAM allocation, arrays allows me to=20 > concentrate more on the functionality of the code instead of the raw=20 > instructions. > David... > > On 26/08/2016 11:21 AM, Richard Pope wrote: >> David, >> I find that it is much easier for me to use. The projects that I >> build for our model railroad just don't require the raw speed. --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .