Hi,
Yes, that's also been discussed in
another of the OP's threads.
What about the second point where PWM could be displayed on the editor Digital display simulator some way using colors or brightness.
Oh dear, where to start. I'm certainly not a Windows system programmer, so can't say if it would be even possible, but often the "Colour Palette" is quite limited. The PWM hardware output has 1024 possible "levels", so even if using a "logarithmic" brightness scale you'd need 10 levels (one for each significant bit). The Font Editor appears to have about 140 "arbitrary" colours, so I think you might struggle to find a logical sequence of even 10 "brightness" levels.
But controlling the brightness of a LED is only one (quite trivial) application of many that might use PWM. Fundamentally it's a
pulse output so the frequency might be just as important as the duty cycle (or more so), for example as an Audio (tone) generator if a loudspeaker were attached instead of a LED. Also, the "simulator" normally runs much slower than "real time", so it would be more logical for the pin to "flash" than to "dim". And of course the PICaxe
PIN (which is being simulated) doesn't itself emit light (just a voltage / current), it doesn't even output an analogue (variable) level, unless you add a low-pass filter.
Finally, the PWMOUT / DUTY commands set up a (background)
hardware function, which continues independently of the program itself, even after the program might have stopped (or perhaps crashed). However, the PE "Simulator" is a (program)
software emulator, AFAIK it doesn't simulate ANY of the Special Function Registers (SFRs) of which the PWM control registers are just a subset. But even if (some of) those registers were emulated in the software (and there are plenty that might be quite useful), that still would not affect how the pins are actually driven by any of the hardware modules on the chip.
Cheers, Alan.