Slide 1 Slide 2 Slide 3 Slide 4 Slide 5 Slide 6 Slide 7 Slide 8 Slide 9 Slide 10 Slide 11 Slide 12 Slide 13 Slide 14 Slide 15 Slide 16 Slide 17 Slide 18 Slide 19 Slide 20 Slide 21 Slide 22 Slide 23 Slide 24 Slide 25 Slide 26 Slide 27 Slide 28 Slide 29 Slide 30 Product List
Pt1-Slide8

On dsPIC33 devices, it is much easier to detect and recover from a mathematical error trap. There are six additional status bits within the INTCON1 register to provide details of a math error. These six new bits are highlighted in green in the slide. The OVA and OVB bits indicate an overflow condition in either accumulator a or b, respectively. These bits differ subtly from the OA and OB bits within the SR status register. When an accumulator overflows, accumulator A for example, the OA and OVA bits will be set at the same time. However, the OA bit will be cleared if a subsequent accumulator instruction does not result in an overflow. The OVA bit will only be cleared when the user clears the MATHERR trap status flag.

PTM Published on: 2011-11-07