source: projects/magnetic-tape-show/Magnetic-Tape-Show.c @ 81

Last change on this file since 81 was 81, checked in by heribert-pc, 11 years ago

Bugfixes; delay_ms erwartet auch Compile-Time-Konstante.

File size: 738 bytes
RevLine 
[79]1/*
2 * Magnetic_Tape_Show.c
3 *
4 * Created: 10.08.2013 13:52:32
5 *  Author: Sven
6 */ 
7
8#include <avr/io.h>
9#include "wiring.h"
10#include "pseudosprache.h"
11
12void Initialize() {
13        // Ports einrichten
14        // PORTxn setzten DDRxn Pull-Up-Widerstaende
15        PORTA = 0x00;
16        PORTB = 0x01; // LED Pull up
17        PORTC = 0x00; // Daten als offene kollektoren?
18        PORTD = 0x00;
19       
20        DDRA = 0xFF; // Relais 1-8, Register voll belegt als Output
21        DDRB = 0x00 | (1 << DDB0); // LED Output
22        DDRC = 0xFF; // Relais 9-13, Register nicht voll belegt *TODO*
23        DDRD = 0xFF; // ungenutzt
[81]24       
25        // jetzt mit werten belegen
26        PORTA = 0xFF;
27        PORTC = 0xFF;
28       
[79]29}
30
31int main(void) {
32        Initialize();
33        while(1) {
[81]34                        if(is_button()) {
35                                abspielen();
36                        }
[79]37        }
38}
Note: See TracBrowser for help on using the repository browser.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License