This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi, as you can see in the schematic, the Schmitt Trigger is disabled when INCHx = y or ADC10AE0:
And when the schmitt trigger is disabled, we can expect that the entry in red does not influence the PxIN.
I made a program to test this, is as follows:
#include "msp430g2452.h"
RSEG CSTACK ; Define stack segment
RSEG CODE ; Assemble to Flash memory
;-------------------------------------------------------------------------------
RESET mov.w #SFE(CSTACK),SP ; Initialize stackpointer
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop WDT
SetupP1
; Selecionando Ax
; bis.w #0x0100, &ADC10CTL1 ; INCHx = 1
; Configuracao das portas
bis.b #0x08, &P2DIR ; P2.3 output
; Configuracao da função da porta
;bis.b #01h,&ADC10AE0 ; P1.0 ADC enable
bis.w #0x0010, &ADC10CTL0 ; ativando o ON
bis.w #ENC+ADC10SC,&ADC10CTL0 ; Start sampling/conversion
Mainloop
jmp Mainloop ;
;-------------------------------------------------------------------------------
COMMON INTVEC ; Interrupt Vectors
;-------------------------------------------------------------------------------
ORG RESET_VECTOR ; POR, ext. Reset
DW RESET
END
The schematics follows:
I made a video for test: https://vimeo.com/49796805
1-First step check that the Schmitt Trigger is actually enabled. Surprise!
2-Second step, I uncomment the line ---> bis.b # 01h, & ADC10AE0 <--- and then the Schmitt trigger is disabled.
3-Third step, showing that INCHx not need to be selected properly.
This is a bug? According to the schematic, the INCHx should disable Schmitt Trigger (have initial value 0). Why did this not happen?
INCHx is only true during the samplign time of an ongoing conversion. It is not active during conversion or when no conversion is active.
ADC10AE, however, permanently disables the digital part, even if this input is not currently sampled.
Personally, I dislike the funciton of INCHx, as it makes it impossible to monitor the digital activity (e.g. voltage drop due to output current). ADC10AE already does the job fine if you want it.
**Attention** This is a public forum