Fragrance
Advanced Member level 4
- Joined
- Jul 26, 2002
- Messages
- 1,190
- Helped
- 248
- Reputation
- 496
- Reaction score
- 202
- Trophy points
- 1,343
- Location
- East Of Earth
- Activity points
- 8,933
is the pic youre using have a 10 bit ACD or a 12 bit ADC???
How did you get that high of a voltage reading (12.31)with a 10 bit adc???
I was playing around with the routine and was wondering what files hold the MSB and LSB? I'm thinking it would be OutBuff and OutBuff1 but wich ones are msb and lsb???ADmain ;main loop for ADC
clrf OutBuff
clrf OutBuff1
clrf cnt
movlw 0x40 ;set counter to 64
movwf cnt
st
decf cnt
bsf ADCON0,GO ;start A/D
l3
btfsc ADCON0,GO ;A/D conversion done
goto l3
bsf STATUS,RP0 ;select bank 1
movfw ADRESL
bcf STATUS,RP0 ;select bank 0
addwf OutBuff1
btfsc STATUS,C
incf OutBuff
movfw ADRESH
addwf OutBuff
movf cnt
btfss STATUS,Z
goto st
return
HEY WIZPIC!!!! Youre not gonna believe This!! I got her working and It incriments in 10ths of a volt just like it sould!!! Now I just got to figure out the current side
The trick was the routine you gave me. Took alittle tweaking but it works! Thanks again!!!!
I know how to do it in basic but noy ASM i havr started to learn ASM but not that good yet, may be one day i wilOkay next question.... How would you multiply the adc result and divide that result to get actual Voltage??? Right now Im just displaying the adc result and its not very accruate....
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?