| PRG_setStart | Function (Macro)

intr.h

void PRG_setStart (unsigned char val);

Specifies the starting value of the variable incremented by the programmable rate generator.

PRG_setStart sets the starting value of the variable incremented by the programmable rate generator. This variable is incremented by 1 every time the programmable rate generator is triggered (at a speed which can be set using PRG_setRate). When it overflows from 0xFF to 0x00, auto interrupt 5 is triggered, and it is reset to val. To conclude, the way the value of this variable changes is shown here:
`..., val, val+1, ..., 0xFF, 0x00, (auto interrupt 5), val, val+1, ...`
Note: If a program uses this function, it should restore the previous value before the end of the program, as determined by PRG_getStart.

See also: PRG_getStart, PRG_setRate