Надеюсь этого достаточно ?
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)

миниатюрный аудио-видеорекордер mAVR

Отправлено Kuka 27 октября 2004 г. 11:05
В ответ на: 2бЯКА -> AT89S8252 Догадайтесь с трех раз, чем отличается datasheet на сабж 1997 года от издания 2003 года ? отправлено Kuka 27 октября 2004 г. 10:50

IMPORTANT: The state of DPS affects ALL accesses to the data pointer SFRs (82H, 83H, 84H, 85H). Any machine instruction whose operand is one of the data pointer SFRs may produce unexpected results, as shown below.

Examples:
; Define the new data pointer SFRs for a generic 8051 assembler.
DP0L DATA 82h ; data pointer 0
DP0H DATA 83h ;
DP1L DATA 84h ; data pointer 1
DP1H DATA 85h ;

orl WMCON, #DPS ; set DPS
push DP0L ; PUSHES DP1L!!!
mov 83h, a ; COPIES ACCUMULATOR TO 85H!!!
xrl WMCON, #DPS ; clear DPS
push DP1H ; PUSHES DP0H!!!
mov 84h, a ; COPIES ACCUMULATOR TO 82H!!!

The user must exercise caution to avoid accessing the wrong SFRs. The solution to the problem demonstrated above is to clear DPS before any accesses to SFRs 82H and 83H and to set DPS before any accesses to SFRs 84H and 85H.



Составить ответ  |||  Конференция  |||  Архив

Ответы



Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru