Forum: Mikrocontroller und Digitale Elektronik Mir ist das AVR Datenblatt unklar


von ghgas (Gast)


Lesenswert?

Mich verwirrt das es im Datenblatt bei den Registern heißt das wenn 
"When this bit is set" steht, das ich nie weiß ob das jetzt eine 0 oder 
eine 1 im Register bedeutet. Wo steht das?

von Project HC (Gast)


Lesenswert?

Das ist Grundlage. 1 = Set, 0 = Reset

von ghgas (Gast)


Lesenswert?

Warum steht dann manchmal im Datenblatt in klammer ..bit is set(one)?
Das macht es doch überflüssig, oder etwa bei manchen Registern ist es 
umgekehrt?

Auszug: attiny45

Bit 7 – CTC1 : Clear Timer/Counter on Compare Match
When the CTC1 control bit is set (one), Timer/Counter1 is reset to $00 
in the CPU clock cycle after a compare
match with OCR1A register. If the control bit is cleared, Timer/Counter1 
continues counting and is unaffected by a
compare match.

von jojo (Gast)


Lesenswert?

Project HC schrieb:
> Das ist Grundlage. 1 = Set, 0 = Reset

0 = cleared. Grundlage.

von Jörg W. (dl8dtl) (Moderator) Benutzerseite


Lesenswert?

ghgas schrieb:
> Das macht es doch überflüssig

Ja.

jojo schrieb:
> 0 = cleared.

Oder auch einfach “the bit is clear”.

von Cyblord -. (cyblord)


Lesenswert?

ghgas schrieb:
> Warum steht dann manchmal im Datenblatt in klammer ..bit is set(one)?
> Das macht es doch überflüssig, oder etwa bei manchen Registern ist es
> umgekehrt?

Warum auch immer. Das (one) ändert an der Tatsache set=1 nichts.

>
> Auszug: attiny45
>
> Bit 7 – CTC1 : Clear Timer/Counter on Compare Match
> When the CTC1 control bit is set (one), Timer/Counter1 is reset to $00
> in the CPU clock cycle after a compare
> match with OCR1A register. If the control bit is cleared, Timer/Counter1
> continues counting and is unaffected by a
> compare match.

von Route_66 H. (route_66)


Lesenswert?

Hallo!
Du musst nur bei den Fusebits aufpassen:
programmed=low
unprogrammed=high
!!!

von Blaurock (Gast)


Lesenswert?

Route 66 schrieb:
> Hallo!
> Du musst nur bei den Fusebits aufpassen:
> programmed=low
> unprogrammed=high

Wer PROMs kennt, versteht das. Unprogrammiert ist der Inhalt immer 0xFF.
Beim Programmieren "brennt" man die Bits (Fuses) einfach durch - also 
LOW.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.