| ??? 12/15/03 14:05 Read: times |
#60615 - RE: prior art Responding to: ???'s previous message |
i wrote the assembly code for counting the no. of pulses from the reflective targets.i would like you all to give suggestions on that
START: mov TMOD, #01100000B ; counter 1, mode 2, C/T=1 mov TH1, #0 ;count from 0x00 to 0xFF setb P3.5 ;configure P3.5 as input AGAIN: setb TR1 ;enable counter BACK: mov A, TL1 ;read TL1 value mov P2, A ;display it on P2 jnb TF1, back ;poll for TF1, could use INT1 also clr TR1 ;stop counter clr TF1 ;clear TF1 flag sjmp AGAIN ;while(1) |



