READ_ADC:
 
         MOV TEMP,#08H      ;set the loop variable to 8

         CLR CS             ;activate the ADC
 
         SETB CLK           ;0 to 1 transition of CLK
         CLR CLK            ;1 to 0 transition of CLK
         SETB CLK           ;0 to 1 transition of CLK
         CLR CLK            ;1 to 0 transition of CLK,
                            ;this to insert two CLK periods
   
NO_DATA: SETB CLK           ;0 to 1 transition of CLK
         MOV C,ADCDO        ;read the data
         CLR CLK            ;1 to 0 transition of CLK
         RLC A              ;fabricate the ADC data byte
         DJNZ TEMP,NO_DATA  ;read all 8 bits

         SETB CS            ;deactivate the ADC

         RET                ;return from subroutine