ATmega328P — Timer/Counter0 Explorer
8-bit timer · CTC / PWM / Normal / Fast PWM · 16 MHz
Click blocks to explore
Click any block to see its description and have the associated register highlighted on the right panel.
--OC0A freq
--Period
--Duty cycle
Timing diagram updates live as you change registers. Switch WGM mode, prescaler, and OCR0A/B values to see the effect on the waveforms.
Register Configuration
TCCR0A
0x44 (I/O: 0x24)
Hex: 0x00
COM0A[1:0] — OC0A output mode
COM0B[1:0] — OC0B output mode
WGM0[1:0] — Waveform gen. mode (bits 1:0)
TCCR0B
0x45 (I/O: 0x25)
Hex: 0x00
WGM02 — Waveform gen. mode (bit 2)
CS0[2:0] — Clock select / prescaler
FOC0A / FOC0B — Force output compare
TCNT0
0x46 (I/O: 0x26)
Hex: 0x00
TCNT0[7:0] — Counter value (read/write)
OCR0A
0x47 (I/O: 0x27)
Hex: 0x00
OCR0A[7:0] — Output compare register A
OCR0B
0x48 (I/O: 0x28)
Hex: 0x00
OCR0B[7:0] — Output compare register B
TIMSK0
0x6E
Hex: 0x00
Interrupt enables
TIFR0
0x35 (I/O: 0x15)
Hex: 0x00
Interrupt flags (write 1 to clear)
Tags:
ATmega328P