Page 1 of 1

interruption INT sur PIC18F2550 RESOLU

Posted: Wed Sep 03, 2014 3:10 pm
by pilou8830
Bonjour,
j'aimerai utiliser l'interruption INT sur PIC18F2550.
Si pas d'erreur il y a 3 entrées qui offrent cette possibilité : RB0/INT0, RB1/INT1 et RB2/INT2.
Mais voilà mon circuit imprimé est déjà fait, les composants sont soudés et les broches RB0, RB1 et RB2 sont déjà pris par le LCD. :?
Peut-on changer par programmation l'emplacement d'un INT sur broche RB6 ou RB7 ou RC6 ou RC7 restées libres? :roll: :roll:

J'ai la version Flowcode v4.5
bien à vous

Re: interruption INT sur PIC18F2550

Posted: Wed Sep 03, 2014 4:15 pm
by Benj
Bonjour,

Vous ne pouvez pas déplacer l'emplacement des broches INT mais vous pourrez peut-être utiliser l'interruption de type de port. Ce sera le feu lorsque l'une des broches état ​​de changement RB4 - RB7 . Vous aurez besoin de collecter l'état des broches dans la macro d'interruption pour déterminer si la broche dont vous avez besoin a changé d'état ou si elle a été l'un des autres axes de changement d'état qui a déclenché l'alarme .

Voici un exemple pour masquer l'orifice B bit 7 et de tester si la valeur a changé d'état .

Icône d'entrée: le mode binaire unique configuré pour RB7 , stockée dans la variable var

Décision : var = oldvar
oui : broche a changé d'état , insérer le code ici selon les besoins
pas : broche hasnt changé d'état , insérer le code ici selon les besoins

Calcul : oldvar = var




Hello,

You cannot move the location of the INT pins but you may be able to use the PORT type interrupt. This will fire when any of the pins RB4-RB7 change state. You will need to collect the state of the pins in the interrupt macro to determine if the pin you need has changed state or if it was one of the other pins changing state that triggered the interrupt.

Here is an example to mask off port B bit 7 and test if the value has changed state.

Input Icon: single bit mode configured to RB7, stored in variable var

Decision: var != oldvar
yes: pin has changed state, insert code here as needed
no: pin hasnt changed state, insert code here as needed

Calculation: oldvar = var

Re: interruption INT sur PIC18F2550

Posted: Thu Sep 04, 2014 8:50 am
by pilou8830
Merci Benj
Cela fonctionne très bien :D :D