# Counter

From CANNY Wiki

Appearance | |
---|---|

Symbol | |

COUNT | |

Group | |

Counters and Edge Detectors | |

Inputs | |

Increment: | Logical |

Decrement: | Logical |

Reset: | Logical |

Outputs | |

Result: | Integer |

Version CANNY Lab | |

from 0.6b |

At zero value on input "Reset": on each rising edge (change in values from zero to non-zero) on the input "increment" is adding 1 to the "Result" value, and on each rising edge (change in values from zero to non-zero) at the input to "Decrement" is subtracted 1 from the output.

At non-zero value on input "Reset", sets the output value to zero.

## Features[edit]

The output value is 16-bit, with the overflow. In other words, the result can not exceed 65535. In case of increasing output value over 65535, the result will be zero, and in case of reducing output value below zero, the result will be 65535.