I did this:
code section
;
ORG ROMStart
_Startup:
LDHX #RAMEnd+1 ; initialize the stack pointer
TXS
JSR confADC
MOV #$E0,PTADD
MOV #$FF,PTBDD
CLI ; enable interrupts
fin:
feed_watchdog
BRA fin
confADC:
LDA #$60
STA ADCCFG
STA ADCSC1
RTS
intADC:
LDA ADCRL
CBEQA #$00, OFF_PTA7
CBEQA #$64, OFF_PTA7
CBEQA #$93, ON_PTA7
CBEQA #$FF, ON_PTA7
RTI
ON_PTA7: BSET 7, $0000
RTI
OFF_PTA7: BCLR 7, $0000
RTI
The first led turns on at a certain voltaje and then it turns off at a certain voltaje, I did some calculations and at my opinion It turns on at 1.9 V and it turns off at 1.3 volts (#$93 and #$64)
any opinions?????