Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
8XC196Kx,8XC196Jx,87C196CA microcontroller family user's manual.1995.pdf
Скачиваний:
72
Добавлен:
23.08.2013
Размер:
4 Мб
Скачать

8XC196Kx, Jx, CA USER’S MANUAL

version. Step 4 updates PTSPTR1 (PTSPTR1 now points to 3004H) and step 5 decrements PTSCOUNT to 3. The next cycle begins by storing the channel 5 command in the temporary location. During the last cycle (PTSCOUNT = 1), the dummy command is loaded into the AD_COMMAND register and no conversion is performed. PTSCOUNT is decremented to zero and the end-of-PTS interrupt is requested.

Table 5-8. Command/Data Table (Example 1)

Address

Contents

 

 

300EH

AD_RESULT for ACH4

 

 

300CH

0000H (Dummy command)

 

 

300AH

AD_RESULT for ACH5

 

 

3008H

AD_COMMAND for ACH4

 

 

3006H

AD_RESULT for ACH6

 

 

3004H

AD_COMMAND for ACH5

 

 

3002H

AD_RESULT for ACH7

 

 

3000H

AD_COMMAND for ACH6

 

 

Table 5-9. A/D Scan Mode PTSCB (Example 1)

Unused

Unused

PTSPTR2 (HI) = 1FH

PTSPTR2 (LO) = AAH

PTSPTR1 (HI) = 30H

PTSPTR1 (LO) = 00H

PTSCON = CBH (Mode = 110, UPDT = 1)

PTSCOUNT = 04H

5.6.5.3A/D Scan Mode Example 2

Table 5-11 sets up a series of ten PTS cycles, each of which reads a single A/D channel and stores the result in a single location (3002H). The UPDT bit (PTSCON.3) is cleared so that original contents of PTSPTR1 are restored after the cycle. The command/data table is shown in Table 5-10.

Table 5-10. Command/Data Table (Example 2)

Address

Contents

 

 

3002H

AD_RESULT for ACHx

 

 

3000H

AD_COMMAND for ACHx

 

 

5-30

Соседние файлы в предмете Электротехника