Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

#define f_cpu

#define F_CPU 1000000                   // We start with 8x prescaler on 8Mhz clock

#define delay_ms_1Mhz(x) (_delay_ms(x))   // Delay when prescaller set to 8x
#define delay_ms_8Mhz(x) (_delay_ms(x*8)) // Delay when prescaller set to 1x so we need to burn 8x as many cycles
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
3+1 =