Well firstly, most higher level languages directed to the PIC will have library routines which will handle bit banging where hardware is unavailable. The second source would be the current user community who may well have developed library routines to undertake your function. If it's timing critical and nothing's available you'll have to write in assembler in whatever form the compiler accepts. Even with all optimization= s turned off calculating delay routines in a high level language is a nightmare. Finally you could ask your compiler supplier - if sufficient interest exist= s they may add it for you ! Regards, Robin Abbott Forest Electronics The home of WIZ-C ANSI C RAD development for the PIC ! www.fored.co.uk 07801 718136 (+44-7801-718136) -----Original Message----- From: PICdude [mailto:picdude3@narwani.org]=20 Sent: 12 September 2010 16:18 To: piclist@mit.edu Subject: [PIC] Bit-banging in C I'm finally going to start really using a higher (than 8-bit) PIC and =20 also looking into Atmels and C instead of assembly (for the PIC too). =20 Since there will be optimizations, how would timing-specific code =20 (such as bit-banging) be done? Are these pieces put into inline =20 assembly, or is there a way to use C code with known timing? Cheers, -Neil. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .