It is usually a good idea to following some sort of programming template as well, i tend (not always) to follow the MISRA C programming guidelines as to structure and technique, it enforces good programming techniques amd just as importantly design methodology and documentation. It is difficult to read and follow at first but you get used to it. Loops can get stuck and there should always be a "supervisor" module to help the software out if it does i.e a watchdog timer, often used and often abused but if used in the correct manner can save lock up and headaches. regards --- On Tue, 5/7/11, Cat C <catalin_cluj@hotmail.com> wrote: From: Cat C <catalin_cluj@hotmail.com> Subject: RE: [AVR-Chat] Delay functions and "__builtin_avr_delay_cycles". To: avr-chat@yahoogroups.com Date: Tuesday, 5 July, 2011, 16:35 Thank you all for input,There is sooth in what you all say and I tend to agree. However, where does it stop?If it takes longer to write something because I don't trust any libraries I waste time writing my own. If I trust them, I may need to spend time fixing IF they break (and I know that's likely at some point). I've done just NOP loops sometimes but it's not as nice as being able to specify number of microseconds directly. I'm using my timers for other things and I don't want to add ifs when triggered either in or outside ISRs. I found that the compiler does support "__builtin_avr_delay_cycles" but the 20100110 delay.h doesn't use it; there is a new delay.h that uses it here: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=100131&postdays=0&postorder=asc&sid=ea59a79d21c3eae4542bb467153721df I think some faith can work sometime :-) Thanks again, Cat [Non-text portions of this message have been removed] [Non-text portions of this message have been removed]
Message
RE: [AVR-Chat] Delay functions and "__builtin_avr_delay_cycles".
2011-07-05 by STEVEN HOLDER
Attachments
- No local attachments were found for this message.