Proteus Watchpoint tip

Status
Not open for further replies.

Mosaic

Well-Known Member
HOW to use Watchpoint on a byte value.
This is easy, just use the watchpoint condition logic, Equals, not equal, greater

than etc. and place the decimal value of the desired condition. 'On change' is for

ANY change at all in the BYTE value.


HOW to use the watchpoint condition to trip on a single bit or bit combo.

Bitmasking does not seem to work with the ' On change' watchpoint condition

here. So we use another method.

First for the condtion, make it "EQUALs" the total value of the bits u want to

trigger on.

Then create a bitmask using the AND and the hexadecimal bitvalue # to mask

out the other bits.

eg.
U want to watch bit 4, and stop the code when it goes to a 1.
XXX?XXXX
Bit 4 is valued at 2^4 = 16 = 10h
So your AND mask value = 10h
But your EQUALS # is 16. ( decimal, not hex)
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…