Medidor de Voltaje

download Medidor de Voltaje

of 3

Transcript of Medidor de Voltaje

  • 8/15/2019 Medidor de Voltaje

    1/3

    Microcontroladores

    Medidor de Voltaje

    #include #defne F_CPU 1000000UL#include

    #defne !"_LC P$"#defne C%"$L_LC P$"Cconst int &%'()const int $*'+)const int $,'-)char al"et)char "et_line1+2'3olta4e53)6oat te78)int ,ait_LC9:)int ;nit_LC9:)int Clear_LC9:)int ,rite_LC9:)

    int $eturn_L;%&9:)int !C_te789:)

    / Pro=ra7a Princi8al /int 7ain9void:

    int i)char "et_line11+2)$'0FF)$C'0FF)$!'0?00)

     _delay_7s900:)

    C%"$L_LC @'A_B9$,:);nit_LC9:)init_!C9:)Clear_LC9:)hile91:

    !C_te789:)int d1'te78)6oat D1'te78Ed1)int d'trunc9D1100:)s8rintD9"et_line13 Gd.G0dH3d1d:)

    Dor9i'0)i

  • 8/15/2019 Medidor de Voltaje

    2/3

    Microcontroladores

    $eturn_L;%&9:)Dor9i'0)i

  • 8/15/2019 Medidor de Voltaje

    3/3

    Microcontroladores

    / &scriNe en el LC /int ,rite_LC9:

    C%"$L_LC '_B9$*:)!"_LC'al"et)C%"$L_LC '_B9&%:)

    C%"$L_LC @'A_B9&%:),ait_LC9:)

    J

    / *alta de lOnea /int $eturn_L;%&9:

    C%"$L_LC @'A_B9$*:)!"_LC'0?C0)C%"$L_LC '_B9&%:)C%"$L_LC @'A_B9&%:),ait_LC9:)

    J

    void init_!C 9:

    !MU?'0N01000000) //()!C*$!'0N11011011)

    Jint !C_te78 9:

    !C*$! '91!C*$!'91te78'96oat:!C-/910Q:)J

    J

    !le7Rn LS8eT uan Carlos10(0Q1-

    &sVuivel MartOneT ;srael110(0Q1

    PWreT $eyes MarOa de esXs110(00

    RTVueT !ntonio %atanael110(1Q-1