Data Sheet
Proteus VSM
199
You can change the display format of the items to binary if you find it easier to understand the
results. You would do this by right clicking on each item in the watch window and changing the
display format to binary.
Since this is 10-bit ADC we would expect the maximum value to be 1023 or 0x03FF and we
should see this value when the POT is fully ramped up.
Now let’s assume that we needed to catch the midpoint on the way back down. We know that
the midpoint value result should be around 0x1FF so we can set conditions on the watch items
to trigger a breakpoint. We do this by right clicking on a watch item and selecting watchpoint
condition from the context menu. In our case we would want to stop when both ADRESH is
equal to 0x01 and when ADRESL is less than or equal to 0xFF. This will work as the first time
we hit this value on the way down from the maximum will be at the midpoint voltage.