wokwi / avr8js

Arduino (8-bit AVR) simulator, written in JavaScript and runs in the browser / Node.js
https://blog.wokwi.com/avr8js-simulate-arduino-in-javascript/
MIT License
462 stars 73 forks source link

Timer Output Compare does not work when set to 0 #74

Closed urish closed 3 years ago

urish commented 3 years ago

Per the datasheet (Section 14.7.2):

The waveform generated will have a maximum frequency of fOC0 = fclk_I/O/2 when OCR0A is set to zero (0x00)

However, the current implementation disables the Output Compare unit when OCR0A/OCR0B are set to zero, so no waveform is generated at all.