Apr 21, 2015 #1 D Deexith Hasan Advanced Member level 4 Joined Oct 24, 2014 Messages 111 Helped 4 Reputation 8 Reaction score 3 Trophy points 18 Activity points 740 Code: #include <avr/io.h> #include<util/delay.h> void delay() { _delay_ms(500); } int main(void) { DDRB=0xFF; while(1) { PORTB=0XFF; delay(); PORTB=0X00; delay(); } return 0; } a simple blink program compiled in WINAVR and created hex file..... when i simulate in protues i got 800ms delay at 40MHZ external crystal...... how to set clock fuses for 10Mhz crystal...in WINAVR to create 500ms delay and how to simulate the same
Code: #include <avr/io.h> #include<util/delay.h> void delay() { _delay_ms(500); } int main(void) { DDRB=0xFF; while(1) { PORTB=0XFF; delay(); PORTB=0X00; delay(); } return 0; } a simple blink program compiled in WINAVR and created hex file..... when i simulate in protues i got 800ms delay at 40MHZ external crystal...... how to set clock fuses for 10Mhz crystal...in WINAVR to create 500ms delay and how to simulate the same
Apr 21, 2015 #2 Easyrider83 Advanced Member level 5 Joined Oct 11, 2011 Messages 1,608 Helped 374 Reputation 748 Reaction score 363 Trophy points 1,363 Location Tallinn, Estonia Activity points 8,575 Proteus does not simulate crystal oscillators. Clock specified in properties.
Apr 22, 2015 #3 D Deexith Hasan Advanced Member level 4 Joined Oct 24, 2014 Messages 111 Helped 4 Reputation 8 Reaction score 3 Trophy points 18 Activity points 740 yup i mentioned 40Mhz in ATMEGA328 properties