merzouk
Newbie level 4
- Joined
- Sep 20, 2014
- Messages
- 6
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 32
need help to explain a code
but d't found a function: ADC_Read();
thank you very much:bang:
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 unsigned int measure_temp(void) { unsigned int read_value=0; ADCON0&=0; ADCON0|=1|(1<<7)|(1<<6); wait(); ADCON0|=(1<<2); while(ADCON0&0x04); read_value=ADRESH; read_value<<=8; read_value+=ADRESL; read_value*=196; read_value>>=2; ADCON0&=0XFE; return read_value/100; }
thank you very much:bang:
Last edited by a moderator: