počítací AD převodník v PIC16F18015
Jindrich Fucik
fulda na seznam.cz
Středa Únor 7 22:33:26 CET 2024
Přátelé a kamarádi,
zase jsem se pustil do něčeho, čemu moc nerozumím. Mám procesor
PIC16F18015 a mimo jiné potřebuji vyhodnotit polohu potenciometru.
Potenciometr je připojen mezi Vdd a Vss, má hodnotu 10kΩ a jezdec je
připojen na volný vstup procesoru. Chtěl bych přečíst polohu ve 128
krocích. Tedy nic zvláštního.
Jenže tenhle procesor je dvakrát chytřejší než já a klade mi otázky,
kterým nerozumím.
Moc nechápu precharge polarity a už vůbec nechápu guard ring polarity.
Trochu bych odhadl, že se mi snaží říci, že sample and hold připojí buď
proti Vdd, nebo proti Vss a že to zavede různou chybovost. Dokonce si
mohu vybrat double sample, kterej změří oba případy a vrátí mi průměr.
Tedy vlastně ani to nemusí být průměr, ale něco podle nastaveného módu.
A těm módům už vůbec nerozumím. Asi by se mi líbilo použití nějakého
průměrovacího módu, ale nechápu, za jaké období se dělají ty průměry.
• Basic: This is a Legacy mode. In this mode, ADC conversion occurs on
single (DSEN = 0) or double (DSEN = 1) samples. ADIF is set after each
conversion is complete. ADCHxIF is set according to the Calculation mode.
• Accumulate: With each trigger, the ADC conversion result is added to
the accumulator and ADCNT increments. ADIF is set after each conversion.
ADCHxIF is set according to the Calculation mode.
• Average: With each trigger, the ADC conversion result is added to the
accumulator. When the RPT number of samples have been accumulated, a
threshold test is performed. Upon the next trigger, the accumulator is
cleared. For the subsequent tests, additional RPT samples are required
to be accumulated.
• Burst Average: At the trigger, the accumulator is cleared. The ADC
conversion results are then collected repetitively until RPT samples are
accumulated and finally the threshold is tested.
• Low-Pass Filter (LPF): With each trigger, the ADC conversion result is
sent through a filter. When RPT samples have occurred, a threshold test
is performed. Every trigger after that, the ADC conversion result is
sent through the filter and another threshold test is performed.
Není mezi přítomnými někdo, kdo to chápe? a dokázal mi trochu naznačit o
co jde?
Díky
Další informace o konferenci Hw-list