Figure 4a—Data is acquired by an interrupt-driven routine that runs during the time indicated by the shaded diamond. Note that the code between the points labeled A and B must execute in less than 1 ms to maintain the 1-kHz data-acquisition rate. b—In this flowchart of the interrupt-driven data acquisition routine, timer 0 sets the sampling period. Each time the routine is called, one A/D conversion is performed and the data byte is stored in the RAM buffer.

a)consi-f4a.gif (18306 bytes)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

b)consi-f4b.gif (5450 bytes)