Probleme de gestion d'interruption pic18
Répondre à la discussion
Affichage des résultats 1 à 12 sur 12

Probleme de gestion d'interruption pic18



  1. #1
    extremgear

    Probleme de gestion d'interruption pic18


    ------

    Bonjour,

    Je ne comprend pas la page 314 de ce datasheet :
    http://ww1.microchip.com/downloads/e...Doc/41412F.pdf

    Je cherche à obtenir une interruption à chaque changement d'état de C1OUT mais j'ai un fonctionnement aléatoire des interruptions , je pense que je configure mal quelque chose , mais je ne comprend pas ce paragraphe :

    18.4 Comparator Interrupt Operation
    The comparator interrupt flag will be set whenever
    there is a change in the output value of the comparator.
    Changes are recognized by means of a mismatch
    circuit which consists of two latches and an exclusiveor
    gate (see Figure 18-2). The first latch is updated with
    the comparator output value, when the CMxCON0
    register is read or written. The value is latched on the
    third cycle of the system clock, also known as Q3. This
    first latch retains the comparator value until another
    read or write of the CMxCON0 register occurs or a
    Reset takes place. The second latch is updated with
    the comparator output value on every first cycle of the
    system clock, also known as Q1. When the output
    value of the comparator changes, the second latch is
    updated and the output values of both latches no
    longer match one another, resulting in a mismatch
    condition. The latch outputs are fed directly into the
    inputs of an exclusive-or gate. This mismatch condition
    is detected by the exclusive-or gate and sent to the
    interrupt circuitry. The mismatch condition will persist
    until the first latch value is updated by performing a
    read of the CMxCON0 register or the comparator
    output returns to the previous state.
    When the mismatch condition occurs, the comparator
    interrupt flag is set. The interrupt flag is triggered by the
    edge of the changing value coming from the exclusiveor
    gate. This means that the interrupt flag can be reset
    once it is triggered without the additional step of reading
    or writing the CMxCON0 register to clear the mismatch
    latches. When the mismatch registers are
    cleared, an interrupt will occur upon the comparator’s
    return to the previous state, otherwise no interrupt will
    be generated.
    Software will need to maintain information about the
    status of the comparator output, as read from the
    CMxCON0 register, or CM2CON1 register, to determine
    the actual change that has occurred. See Figures 18-3
    and 18-4.
    The CxIF bit of the PIR2 register is the comparator
    interrupt flag. This bit must be reset by software by
    clearing it to ‘0’. Since it is also possible to write a ‘1’ to
    this register, an interrupt can be generated.
    In mid-range Compatibility mode the CxIE bit of the
    PIE2 register and the PEIE/GIEL and GIE/GIEH bits of
    the INTCON register must all be set to enable comparator
    interrupts. If any of these bits are cleared, the interrupt
    is not enabled, although the CxIF bit of the PIR2
    register will still be set if an interrupt condition occurs.
    Par avance merci pour votre aide.

    -----

  2. #2
    MicZ

    Re : Aide à l'anglais technique (Datasheets particulièrement)

    Bonjour,
    voici 2 datasheet en Français qui peuvent t'intéresser,
    ils datent mais sont bien traduit
    A+
    Fichiers attachés Fichiers attachés

  3. #3
    JPL
    Responsable des forums

    Re : paragraphe en anglais

    Ces documents sont-ils librement diffusables ? Celui intitulé Les fusibles est marqué Copyright 2004 - Tous droits réservés.
    Rien ne sert de penser, il faut réfléchir avant - Pierre Dac

  4. #4
    extremgear

    Re : paragraphe en anglais

    Merci pour l'aide.

    j'ai finalement réussi à me débrouiller , il me fallait lire un registre (CxMCON0) pendant l'interruption , même si je suis loin de tout comprendre.

    Habituellement je trouve les datasheets microchip compréhensible et bien foutu mais la je sèche un peu.

  5. A voir en vidéo sur Futura
  6. #5
    MicZ

    Re : Aide à l'anglais technique (Datasheets particulièrement)

    pour les fusibles Copyright 2004,
    c'est une copie d'écran que je gardais pour mon utilisation personnelle mais comme le site n'existe plus depuis de 2 ans, ça ne doit pas poser de problème
    Dernière modification par MicZ ; 07/02/2015 à 20h49.

  7. #6
    gienas
    Modérateur

    Re : Aide à l'anglais technique (Datasheets particulièrement)

    Bonsoir à tous

    Ce fil a été détaché depuis l'aide à la traduction anglaise, car il est avant tout un problème technique de fond plus que de traduction à proprement parler.

    Il a davantage sa place dans le forum traditionnel.

  8. #7
    MicZ

    Re : Aide à l'anglais technique (Datasheets particulièrement)

    Bonjour,
    Il est ou ce forum de traduction ?

  9. #8
    invite03481543


  10. #9
    invite03481543

    Re : Aide à l'anglais technique (Datasheets particulièrement)


  11. #10
    extremgear

    Re : Aide à l'anglais technique (Datasheets particulièrement)

    Citation Envoyé par gienas Voir le message
    Bonsoir à tous

    Ce fil a été détaché depuis l'aide à la traduction anglaise, car il est avant tout un problème technique de fond plus que de traduction à proprement parler.

    Il a davantage sa place dans le forum traditionnel.
    Merci , ça semble en effet plus efficace.

    Citation Envoyé par HULK28 Voir le message
    Le module comparateur sur mon pic ( 18f24k22) est légèrement différent , il y a 3 registres .

    A priori ce qui me posait problème était ce paragraphe :
    latch outputs are fed directly into the
    inputs of an exclusive-or gate. This mismatch condition
    is detected by the exclusive-or gate and sent to the
    interrupt circuitry. The mismatch condition will persist
    until the first latch value is updated by performing a
    read of the CMxCON0 register or the comparator
    output returns to the previous state
    Ce pic est une usine à gaz , je me fais toujours avoir par quelque chose.
    Dernière modification par extremgear ; 08/02/2015 à 16h00.

  12. #11
    invite03481543

    Re : Aide à l'anglais technique (Datasheets particulièrement)

    Oui c'est vrai et la tendance ne va pas s'arranger

  13. #12
    MicZ

    Re : Aide à l'anglais technique (Datasheets particulièrement)

    Ok Merci :=)

Discussions similaires

  1. Problème d'interruption sur PIC18
    Par mitch23 dans le forum Électronique
    Réponses: 19
    Dernier message: 13/10/2014, 18h28
  2. [C / PIC18] - Problème de détection d'interruption
    Par jorg1n dans le forum Électronique
    Réponses: 15
    Dernier message: 25/08/2009, 08h47
  3. [PIC18] interruption sur front montant - retard important
    Par sdec25 dans le forum Électronique
    Réponses: 38
    Dernier message: 29/06/2009, 14h20
  4. horloge et interruption pic18
    Par inviteb5c0d7bb dans le forum Électronique
    Réponses: 4
    Dernier message: 20/10/2008, 14h27
  5. Gestion des interruption avec un PIC
    Par schneiderj dans le forum Électronique
    Réponses: 3
    Dernier message: 08/03/2008, 16h26
Découvrez nos comparatifs produits sur l'informatique et les technologies.