| Electronic Components Datasheet Search |
|
AN1711 Datasheet(PDF) 19 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1711 Datasheet(HTML) 19 Page - STMicroelectronics |
|
19 / 40 page ![]() 19/40 SOFTWARE TECHNIQUES FOR COMPENSATING ST7 ADC ERRORS 3 REDUCING SYSTEM NOISE ADC conversion results are the ratio of the input voltage to the reference voltage. If there is noise in the reference voltage, then the results may be not be accurate. Both hardware and software design are responsible for reducing the noise. The execution of code generates some non-negligible noise on the internal power supply net- work of the microcontroller. To filter this noise, the VDDA (or VAREF) and VSSA analog supply pins are available on the microcontroller package so you can connect a capacitor filter to these power supply pins to filter high frequency noise. Sometimes these power supply pins may not be available on the package with low pin count. In any case, you can reduce the generation of internal noise by applying some software tech- niques and making use of the microcontroller’s power saving modes. Here are some general software design tips for reducing system noise: – Do not start transmission on any communication peripheral just before starting the ADC con- version. The toggling of I/Os may create some noise in the supply voltage. – Do not toggle high-sink I/Os connected to relay coils etc., which cause noise ripples in the power supply. – Use power saving modes like “Slow” mode and “Wait for Interrupt” mode. 3.1 INSERT “NOP” WHILE CHECKING FOR EOC Do not execute a lot of instructions while ADC conversion is in progress. Execution of instruc- tions may generate some noise in the power supply. Try to insert the NOP instruction when polling the EOC bit. This reduces the number of “jump” instructions required but it uses up some extra program memory to store the NOP op-codes. In the software example, we used 4 NOP instructions before checking the EOC. It can be cal- culated from the execution time (NOP=2 cycles, BTJF = 5 Cycles) that once the ADC is put ON and EOC is set, the execution of the code takes a minimum of 4 cycles to execute the BTJF instruction with 4 NOP instructions. Similarly if 1 NOP is used, it will take 9 executions of the loop before the routine exits. Code in “C” Corresponding assembled code in assembly ADC_SET_START; do { asm Nop; asm Nop; asm Nop; }while (!(isADC_EOC_SET)); BSET ADCCSR,#5 NOP ; 2 cyc NOP ; 2 cyc NOP ; 2 cyc BTJF ADCCSR,#7,*-3 ; 5 cyc |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |