Why analogRead() is not showing

Proteus 7.7 SP2

Following is the arduino is the program

void setup() {


void loop() {

No output is shown in CRO.

Expected square waveform of 5V with 50% duty cycle.

Any help appreciated.

Proteus 7.7 SP2

What about it? It is a silly simulator - NOT the real thing.

If your problem is ONLY with Proteous, you are in the wrong place.

what do you have in settings(System->set animation options)? did you mess with that?

which Arduino board/lib did you pick? (Older Arduino boards with an ATmega8 only support analogWrite() on pins 9, 10, and 11)

does the behavior change if you use pin 9 instead of 3?

(and of course, get the real thing to get the real behavior)

Arduino Uno R3 ATMega 328P

I did not mess up with settings

I am slowly picking up to simulate a boost (power electronics) converter, but still the question is why no output?

Does not improve with pin9.

(shows zero CRO)

but still the question is why no output?

Get an LED. Connect it to the real thing. If the LED glows at half brightness, the real thing works.

If the simulator does not, you are still in the wrong place.

Probably because you restart the PWM with each call to analogWrite.

Try moving the analog write to setup, leaving loop empty.


This solved this issue. Super!