prosze o dopisanie procedury na AT89C4051

Loading thread data ...

to moja procedurka w AVR-GCC, ale zobaczysz na czym idea polega to sam sobie napiszesz w asm.

/* porowanie czasow ON/OFF z aktualnym czasem jezeli ON=OFF zwraca 0 jezeli poza przedzialem od ON do OFF zwraca -1 jezeli w przedziale zwraca 1

*/ s08 CompareTimes ( Time_t t_on, Time_t t_off, Time_t t_real ) { if ( t_on.hour > t_off.hour && CompareTimes ( t_off, t_on, t_real ) == -1 ) return (1); //jezlie t_on > t_off to wywolaj funkcje z zamiana argumentow if ( t_on.hour == t_off.hour && t_on.min == t_off.min && t_on.sec == t_off.sec ) return (0); else if (( t_real.hour > t_on.hour || ( t_real.hour == t_on.hour && t_real.min > t_on.min ) || ( t_real.hour == t_on.hour && t_real.min == t_on.min && t_real.sec >= t_on.sec ) ) && ( t_real.hour < t_off.hour || ( t_real.hour == t_off.hour && t_real.min < t_off.min ) || ( t_real.hour == t_off.hour && t_real.min == t_off.min && t_real.sec < t_off.sec ) ) ) return (1); else return (-1); }
Reply to
Pawel Kurzawa

przeciez juz pisales w jednym watku kilka dni temu o tym i dostales pelna pomoc po co piszesz drugi raz ???

Tomek

Reply to
tomm

a nie to samo przeczytaj w czym problem ...

Reply to
Pawel Kurzawa

to narazie uzyj jakis zmiennych jak chcesz

Reply to
Rafal

problem rozwiazany ale nie do konca

Reply to
Rafal

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.