Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I'd like to simulate an analog sinusoidal input on a pin; can it be done with MPLAB Simulator, or anyother FREE simulator?
It's a 440Hz sinusoid.
Because simulation is to the register level, and not the pin level, bit/pin names will be read as `0', as required for analog, although injected stimulus may have actually changed the value to `1'.A/D Converter (Limited)
All the registers, timing function and interrupt generation are implemented. The simulator, however, does not load any meaningful value into the A/D result register (ADRES) at the end of a conversion.To load meaningful data, use an injection file (see Register Injection). A read of the A/D register will load this data into the register.
Note: If you have trouble with I/O pins on processors that have A/D, make certain that the ADCON registers are configuring those pins for digital I/O rather than for analog input. For most processors, these default to analog inputs and the associated pins cannot be used for I/O until the ADCON (or ADCON1) register is set properly.
Is this what you are trying to do? Note it's 2.6mS (will give 192Hz). For 440Hz it should be 2.2mS overall - 1.1mS each half cycle.
Mike.
restart at 5200?Yes, my mistake, they are absolute. In that case I would put in 1300,3900 and restart at 5200.
Mike.
maybe...Sorry, mixed my boxes up. It should be repeat after 5200 and restart at zero. Does that make more sense?
Mike.