Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define F_CPU 8000000
- #include <avr/io.h>
- #include <util/delay.h>
- #include <stdlib.h>
- void init(void){
- DDRB=0xff;
- PORTB=0x00;
- }
- double times;
- int main(void)
- {
- init();
- while(1){
- times=1000+rand()%50;
- PORTB=0xff;
- _delay_loop_1(times);
- PORTB=0x00;
- times=1000+rand()%50;
- _delay_loop_1(times);
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement