Not logged in. · Lost password · Register
Forum: Grundstudium 2. Semester Informatik (GDI II) SPiC RSS
Gspic 2. Aufgabe (Juli 2009)
Page:  previous  1  2 
Stefan #16 -- for 2 months · 31 posts
Show profile · Link to this post
also hab des oben geändert
Vitali #17 -- for a month · 7 posts
Show profile · Link to this post
Ach, jetzt hab ich mein Pullup entfernt :P
(ich meine am Ausgang)

Braucht man das oder nicht??
Weil in der Aufgabenstellung steht nichts darüber...
This post was edited on 2010-07-29, 15:49 by Vitali.
morty (Administrator) #18 -- since Sep 2003 · 730 posts · Location: Erlangen
Show profile · Link to this post
@Stefan: Finde auf die schnelle keinen Fehler.
@Vitali: "Taster verbindet den Pin mit Masse, es muss der interne Pullup-Widerstand verwendet werden"
Vitali #19 -- for a month · 7 posts
Show profile · Link to this post
Ich steh immer noch a weng auf dem Schlauch:
Pull-up bedeutet immer das Gegenteil vom DDRD ins PORT-Register schreiben, um einen Kurzschluss zu vermeiden?!?  /*SCHWACHSINN*/

Ist es so richtig:

DDRD |= (1<<PD0);     /*Ausgang*/

DDRD &= ~(1<<PD2);    /*Eingänge*/
DDRD &= ~(1<<PD3);
PORTD |= (1<<PD2);
PORTD |= (1<<PD3);

GICR |= (1<<INT0);    /*Interrupts Aktivieren*/
GICR |= (1<<INT1);

MCUCR &= ~(1<<ISC01); /*Interruptquellen Konfiguration*/
MCUCR |=  (1<<ISC00);
MCUCR |= (1<<ISC11);
MCUCR &= ~(1<<ISC10);
This post was edited 2 times, last on 2010-07-29, 16:19 by Vitali.
morty (Administrator) #20 -- since Sep 2003 · 730 posts · Location: Erlangen
Show profile · Link to this post
U4.7: http://www4.informatik.uni-erlangen.de//Lehre/SS10/V_SPIC/…
Panos #21 -- for 2 months · 18 posts
Show profile · Link to this post
while(ventil){
            int i;
            cli();
            fill++;
            if(fill>=60000){
              
                PORTD=|1;
                                                }
            sei();

In deiner if müsste ein break; sein oder? Wenns 60000 wird wird der Zufluss gesperrt, also kein Füllen mehr.
This post was edited on 2010-07-29, 16:05 by Panos.
Vitali #22 -- for a month · 7 posts
Show profile · Link to this post
ok, sorry dass ich dich so gelangweilt habe....
Jetzt stimmt der code. (=Beitrag #14)
Denn Ausgang muss man in der init gar nicht setzten :P
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please note the verification code from the picture into the text field next to it.
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  previous  1  2 
Go to forum
Unclassified NewsBoard 1.6.4 © 2003-5 by Yves Goergen
Page created in 427.8 ms (219.6 ms) · 87 database queries in 76.1 ms
Current time: 2010-09-10, 04:27:28 (UTC +02:00)