Jan-Erik Soderholm wrote: > You're sure that "int" is a 16-bit type in your C compiler ? If it is HiTech PICC (which the OP seems to imply), it is. I use an include file with something like typedef unsigned char u8; typedef signed char i8; typedef unsigned int u16; typedef signed int i16; typedef unsigned long u32; typedef signed long i32; (This works with HiTech PICC.) Makes these things more obvious when reading the code, and simplifies switching between compilers. > Isn't there a better way to code delays (like some built-in "delay" > routines) on your C compiler then to code your own software loops ? They > will of course have different timings depending on how fast you "run" > your PIC. Again, if it is HiTech PICC, there are delay routines in the samples/delay directory. They require XTAL_FREQ to be defined and adapt accordingly. Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist