PIC režim SLEEP

Diskuze a poradna o programátorech a programování různých obvodů

Moderátor: Moderátoři

Zpráva
Autor
Andrea
Příspěvky: 9340
Registrován: 07 zář 2007, 00:00

#16 Příspěvek od Andrea »

A co je na té instrukci špatně?
Uživatelský avatar
procesor
Příspěvky: 5286
Registrován: 02 říj 2009, 00:00
Bydliště: PO

#17 Příspěvek od procesor »

Lebo...RAIF nie je KO, ale výstup kombinačného obvodu (pri RBIF je to inak). Asi, že na tú inštrukciu program nezblbne.
Andrea
Příspěvky: 9340
Registrován: 07 zář 2007, 00:00

#18 Příspěvek od Andrea »

Takže podle tebe v datašítu kecají a ta instrukce je tam zbytečná?

Kód: Vybrat vše

For enabled interrupt-on-change pins, the values are
compared with the old value latched on the last read of
PORTA. The ‘mismatch’ outputs of the last read are
OR'd together to set,  the PORTA Change Interrupt flag
bit (RAIF) in the INTCON register.

This interrupt can wake the device from SLEEP. The
user, in the Interrupt Service Routine, can clear the
interrupt in the following manner:
a)Any read or write of PORTA. This will end the
mismatch condition.
b)Clear the flag bit RAIF.
A mismatch condition will continue to set flag bit RAIF.
Reading PORTA will end the mismatch condition and
allow flag bit RAIF to be cleared.
Uživatelský avatar
procesor
Příspěvky: 5286
Registrován: 02 říj 2009, 00:00
Bydliště: PO

#19 Příspěvek od procesor »

Po toto som sa nedostal, schéma v datasheet-e označuje "mišmaš" signál ako RAIF :oops:
Odpovědět

Zpět na „Programování PIC, ATMEL, EEPROM a dalších obvodů“