logo elektroda
logo elektroda
X
logo elektroda
REKLAMA
REKLAMA
Adblock/uBlockOrigin/AdGuard mogą powodować znikanie niektórych postów z powodu nowej reguły.

Atmega 8L bit ACBG ( ACSR.6)

DJOstry 07 Lis 2011 21:52 1003 2
REKLAMA
  • #1 10114486
    DJOstry
    Poziom 25  
    Hej !

    Ustawiam bit ACSR.6 i wejście nieodwracalne w kompaktorze ma swoje napięcie odniesienia 2.56V. Ale bit ACO (ACSR.5)z rejestru ACSR mi się ustawia/zeruje jak przekroczę na drugim wejściu kompaktora około 1.325 V, właśnie, dlaczego na 1.325V a nie na 2.56 ?

    pozdr.
  • REKLAMA
  • #2 10114586
    y0yster
    Poziom 19  
    A czy chociaż jedna z tych trzech rzeczy jest spełniona w uC:

    Cytat:
    1. When the BOD is enabled (by programming the BODEN Fuse).
    2. When the bandgap reference is connected to the Analog Comparator (by setting the
    ACBG bit in ACSR).
    3. When the ADC is enabled.


    Lub druga możliwośc, gdy nie masz włączonego BOD'a to musisz odczekać:

    Cytat:
    Thus, when the BOD is not enabled, after setting the ACBG bit or enabling the ADC, the user
    must always allow the reference to start up before the output from the Analog Comparator or
    ADC is used. To reduce power consumption in Power-down mode, the user can avoid the three
    conditions above to ensure that the reference is turned off before entering Power-down mode.
  • #3 10115527
    DJOstry
    Poziom 25  
    Kod: text
    Zaloguj się, aby zobaczyć kod


    $regfile = "m8def.dat"
    $crystal = 8000000
    Config Pinb.1 = Output
    Config Aci = On , Compare = Off , Trigger = Rising


    Wyjscie Alias Portb.1
    Kompaktor Alias Acsr.5

    Acsr.6 = 1

    Do

    Wyjscie = Kompaktor





    Loop
    End
    Kod: text
    Zaloguj się, aby zobaczyć kod


    fuse BODEN jest włączony (3,7 - 4,5 V )
    ADC jest włączony w instrukcji config
    bit ACBG jest włączony

    no coś mam nie tak, ale nie mogę wykminić.
REKLAMA