Toggle search
Search
Toggle menu
notifications
Toggle personal menu
Editing
C++ AVR
(section)
From Chaosdorf Wiki
Views
Read
Edit with form
Edit
Edit source
View history
associated-pages
Page
Discussion
More actions
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Progamm erstellen === Mit dem Editor ein C-Programm schreiben, als Test kann das ''flash1.c'' im Listing weiter unten dienen, das eine LED zum Blinken bringt. Die Datei muß die Endung .c haben. Beispielcode flash1.c (freundlicherweise von penma zur Verfügung gestellt) <pre> #include <avr/io.h> #include <stdlib.h> int main (void) { uint32_t cnt = 0; DDRD = (1 << PD5) | (1 << PD6); while (1) { cnt++; cnt &= (1 << 15) - 1; if (cnt & (1 << 14)) { PORTD = 1 << PD5; } else { PORTD = 0 << PD5; } } return 0; } </pre>
Summary:
Please note that all contributions to Chaosdorf Wiki are considered to be released under the Attribution 3.0 Unported (see
Chaosdorf Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)