m.naveed
Newbie level 6
- Joined
- Dec 16, 2012
- Messages
- 13
- Helped
- 2
- Reputation
- 4
- Reaction score
- 2
- Trophy points
- 1,283
- Location
- lahore
- Activity points
- 1,363
Hi,
Proteus gives error message
I removed all other components and jus MCU and an oscilloscope is present for simulation but same problem.
code is simple and no compiler error.
Proteus gives error message
but CPU is working at less then 50%."simulation not running in real time due to excessive CPU load"
I removed all other components and jus MCU and an oscilloscope is present for simulation but same problem.
code is simple and no compiler error.
Code:
while(1){
delay_ms(10);
if(amp!= amp_l){
if(amp<amp_l){
d = d + 1;
PWM1_Set_duty(d);
delay_ms(10);
amp = ADC_Read (1);
delay_ms(10);
amp_l = ADC_Read(0);
}
else{
d = d + 1;
PWM1_Set_Duty(d);
delay_ms(10);
amp = ADC_Read (1);
delay_ms(10);
amp_l = ADC_Read(0);
}
}
}