timer nicht in ordnung

Gast #125260
Lesenswert?

glaub nicht, das wird doch automatisch überschrieben (?).
Auf den 1.Blick würde ich sagen: du willst mit OCR1B den Pin toggeln,
CTC (clear on compare) geht aber nur mit OCRA, das initialisierst du
gar nicht. Was er nun macht, weiss ich auch nicht so genau, müsste man
mal simulieren (oder genau lesen).
Gast #125262
Lesenswert?

Seite 107 vom complete datasheet:
The general I/O port function is overridden by the Output Compare
(OC1x) from the
Waveform Generator if either of the COM1x1:0 bits are set. However, the
OC1x pin
direction (input or output) is still controlled by the Data Direction
Register (DDR) for the
port pin. The Data Direction Register bit for the OC1x pin (DDR_OC1x)
must be set as
output before the OC1x value is visible on the pin. The port override
function is generally
independent of the waveform generation mode, but there are some
exceptions. Refer to
Table 50, Table 51, and Table 52 for details.

grüsse leo9

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren