hey guys, i tried to interface adc 0809 to 8051 (at89s52). adc 0809 needs external clock, like adc 0808.
from my reference to generate clock it can be done using timer interrupt. the clock is 500 KHz.
the code is like this:
Code:
TMOD=0x02;
TH0=0xFD;
IE=0x82;
TR0=1;
so tmod set to timer interrupt 0, IE set to enable interrupt timer 0, and TR0 makes timer run/start. i dont get it, why there is no lower value (TL)? this is the initialization for timer interrupt 0. how this initialization can be 500KHz clock?
you r using mode 2 autoreload its a 8bit timer thats why it doesnt needs TL0 the value FD is stored in TL0 and when when TF flag sets that is TH value is increasing it autoreloads with FD