2014ii-c08t-Sbc Pic Para Ecg

download 2014ii-c08t-Sbc Pic Para Ecg

of 84

  • date post

    02-Jun-2018
  • Category

    Documents

  • view

    217
  • download

    0

Embed Size (px)

Transcript of 2014ii-c08t-Sbc Pic Para Ecg

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    1/84

    Page 1

    Universidad de Hunuco

    Facultad de Ingeniera de Sistemas e Informtica

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    2/84

    Page 2

    Agenda

    Base del Conocimiento

    Diagramas de Bode

    Diseo de Filtros Analgicos

    Diseo de un Electrocardiograma

    Microcontrolador PIC con Labview

    Motor de Inferencia

    Tcnicas de Diagnstico de un ECG

    Medios de Comunicacin

    Prototipo de un ECG

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    3/84

    Page 3

    Acerca del ECG-UDH

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    4/84

    Page 4

    Modelando un PIC

    PIC

    Procesador

    Memoria

    Temporizador

    ADCUSB

    GLCD

    Oscilador

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    5/84

    Page 5

    Modelando un PIC

    Input

    VariablesOutput

    (User Interface)

    Variables

    (Link to other Systems)

    Embedded Computer

    Software

    Hardware

    Signal

    Conditioning

    Data

    Conversion

    Output

    Drive

    (display, keypad etc.)

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    6/84

    Page 6

    Microcontrolador PIC

    Como sabemos los microcontroladores de 8 bits de

    Microchip se dividen en 3

    gamas: PIC10 y PIC12: Gama baja

    PIC16: Gama media

    PIC18: Gama alta

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    7/84

    Page 7

    Estructura Interna de un PIC

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    8/84

    Page 8

    Estructura Externa de un PIC

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    9/84

    Page 9

    Organizacin de las Memorias de un PIC

    a) Enfoque de Von Neumann b) Enfoque de Harvard

    DataMemory

    ProgramMemory

    Address

    Data

    CentralProcessingUnit (CPU)

    Input/Output

    Central

    Processing

    Unit (CPU)

    DataMemory

    Input/

    Output

    Program

    Memory

    Address

    Data

    Address

    Data

    Address

    Data

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    10/84

    Page 10

    Arquitectura RISC-PICA CISC machine is generally

    recognised by:

    Many instructions (say over onehundred), some with considerable

    sophistication;

    Instruction words are of different

    length;

    Instructions take different

    lengths of time to execute.

    A RISC machine is generally

    recognised by:

    Few instructions (say well below

    one hundred),

    Each performs a very simple

    action;

    All instructions are single word;

    All, or almost all instructions

    take the same length of time to

    execute.

    Digital

    Program

    I/0Microprocessor

    DataMemory

    Memory

    CoreAnalog

    I/0

    & TimersCounters

    Reset

    Power

    Clock

    Address BusesInternal Data &

    FurtherPeripheral

    FurtherPeripheral

    nterrupt(s)

    A microcontroller = microprocessor core + memory + peripherals

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    11/84

    Page 11

    Diagrama de Bloques del PIC

    The CPU

    Address for Program Memory

    Data from

    Program

    Memory,

    carrying

    instruction

    word

    Address for

    Data Memory

    Data bus forData Memory

    and

    peripherals

    Program Memory

    Data

    Memory

    Extra non-

    volatile Data

    Memory

    Counter/Timer

    Peripheral

    Digital Input/

    Output Ports

    It is easy to see the

    Program memory, which

    uses Flash memory

    technology. Alongside this

    comes the Stack, which

    we meet later. Microchip

    call the main data

    memory File Registers.

    There is another section

    of data memory which

    uses EEPROMtechnology.

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    12/84

    Page 12

    Registro de Estado de un PIC

    Condition

    Code Flags

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    13/84

    Page 13

    Memoria de Programa y StackProgram

    Counter

    16 Series

    instructions which

    invoke the Stack

    Unimplemented memory

    space, still addressableby the 13-bit 16F84A

    program address bus.

    Program Counter

    points to locationsin program memory

    The program

    muststart here

    The Interrupt

    Service Routine

    muststart here

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    14/84

    Page 14

    Mapa de Memoria de Datos y (SFR)Registro de Funciones Especiales

    msb is bank select bit

    (Status register).

    These are the Special Function

    Registers, which allow the CPU to

    interact with the peripherals

    General purpose memory

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    15/84

    Page 15

    Interface con Perifricos va elRegistro de Funciones Especiales

    Control SFR(s)

    Peripheral

    Data Transfer SFR(s)

    Microcontroller

    Core

    "Outside

    World"

    Interrupt(s)

    Microcontroller Interaction with its Peripherals, via Special Function Register (SFR) and Interrupt

    microcontroller peripherals can be configured in software to operate in a number of different modes,

    to do this certain control data must be sent to them to set them up in the desired wayonce in use, there will be data flow between core and peripheral,

    there may still be need for further control data,

    these needs are commonly met by means of dedicated, memory - mapped registers, sometimes

    called Special Function Registers,

    this approach gives the microcontroller manufacturer great flexibility to extend a microcontroller

    family SFRs for new peripherals can easily be located in gaps in the memory map.

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    16/84

    Page 16

    Configuraciones Globales del PIC

    The configuration word determines certain operating features

    of the microcontroller. It is in program memory, but cannot be

    accessed in normal operation. It is written to during the

    programming process. You set its value either by response to

    a dialogue box in MPLAB, or by use of Assembler

    Directives, at the head of your programme.

    The 16F84AConfiguration

    Word

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    17/84

    Page 17

    Tipos de Memorias de un PIC

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    18/84

    Page 18

    Caractersticas de los Osciladores

    Oscilador Primario

    Oscilador Secundario

    Oscilador Interno

    Frecuencias de Oscilacin Altas (XT, HS)

    Frecuencias de Oscilacin Medias (LP)

    Frecuencias de Oscilacin Bajas (RC)

    Con PLL

    Sin PLL

    Con Pre Escala

    Sin Pre Escala

    Con Pre Escala

    Sin Pre Escala

    Multiplica Frecuencia

    de Oscilacin

    Divide Frecuencia de Oscilacin

    Divide Frecuencia de Oscilacin

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    19/84

    Page 19

    Modos del Oscilador

    The 16F84A can be configured to operate in four different oscillator modes, using R-C,

    crystal or ceramic oscillators. It can also accept an external clock source. The user selects

    which mode is to be used by setting bits in the Configuration Word.

    XTCrystal

    The standard crystal configuration, intended for crystals or ceramics in the range 1MHz to

    4MHz.

    HSHigh Speed

    A higher drive version of the XT configuration, for higher frequency crystals and ceramic

    resonators. Intended for frequencies in the region of 4MHz or greater. It leads to the highest

    current consumption of all the oscillator modes.

    LPLow Power

    Intended for low frequency crystal applications, and gives the lowest power consumption

    possible. Will however operate at any frequency below around 200kHz.

    RC - Resistor-Capacitor

    Requires connection of an external resistor and capacitor. The lowest cost way of getting an

    oscillator, but should not be used when any timing accuracy is required.

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    20/84

    Page 20

    Modos del Oscilador

    b) Resistor-Capacitorc) Externally Supplied Clock

    a) Crystal or Ceramic, HS, XT, or LP

    RA2

    RA3

    RA4/T0CKI

    MCLR

    V

    RB0/INT

    RB1

    RB2

    RB3 RB4

    RB5

    RB6

    RB7

    RA1

    RA0

    OS C1/CLKIN

    OS C2/CLKOUT

    VDDSS

    Supply voltage

    Oscillator connections

    Port A, Bit 0

    Port A, Bit 1Port A, Bit 2

    Port A, Bit 3

    *Port A, Bit 4

    Ground

    **Port B, Bit 0

    Port B, Bit 1

    Port B, Bit 2

    Port B, Bit 3

    Port B, Bit 7

    Port B, Bit 6

    Port B, Bit 5

    Port B, Bit 4

    *also Counter/Timer clock input

    **also external Interrupt input

    Reset

    1

    9 10

    18

    The Oscillator Pins

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    21/84

    Page 21

    Diagramas de un Oscilador Primario

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    22/84

    Page 22

    Acerca del Conversor Analgico a DigitalADC del PIC

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    23/84

    Page 23

    Acerca del ADC del PIC

  • 8/10/2019 2014ii-c08t-Sbc Pic Para Ecg

    24/84

    Page 24

    Agenda

    Base del Conocimiento

    Diagramas de Bode

    Diseo de Filtros Analgicos

    Diseo de un Electrocardiograma

    Microcontrolador PIC con Labview

    Motor de Inferencia

    Tcnicas de Diagnstico