Documentos de Académico
Documentos de Profesional
Documentos de Cultura
INTRODUCCIÓN A LOS
MICROCONTROLADORES
Curso de DsPIC
Microcontroladores
de 16 Bits
Introducción Familia
DsPIC30FXXXX
2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 1 2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 4
1 4
Que es un DsPIC???
• El DsPIC Son microcontroladores dotados con los
recursos físicos y lógicos necesarios para poder soportar
las aplicaciones de un procesamiento digital de señales.
• Los DSP disponen de AD rápidos y precisos. Dado el
carácter netamente matemático de los programas DSP,
estos estan preparados para ser programados con
lenguajes de alto nivel, como el C
• Computador digital monochip orientado al
procesamiento de información de la señal
analógica.
2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 2 2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 5
2 5
2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 3 2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 6
3 6
1
20/02/2019
2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 7 2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 10
7 10
RAM de 2 Kbytes
EEPROM de 1 Kbyte
4 MHz-10 MHz oscilator entrada con PLL activo (4x, 8x, 16x)
2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 8 2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 11
8 11
2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 9 2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 12
9 12
2
20/02/2019
Diagrama
Caracteristicas Analogicas de los DsPIC
De
Bloques
Conversor 12-bit Analog-to-Digital Converter
Un maximo de 13 canales
de Reset
2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 13 2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 16
13 16
14 17
power osclador RC
Proteccion de Codigo Programable
In-Circuit Serial Programming™ (ICSP™)
Poder:
Sleep, Idle y Modos de relos alterno
2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 15 2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 18
15 18
3
20/02/2019
2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 19 2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 22
19 22
2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 20 2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 23
20 23
21 24
4
20/02/2019
bit 7-6 POST<1:0>: Oscillator Postscaler Selection bit 3 CF: Clock Fail Detect (Read/Clearable by application)
bits 1 = FSCM has detected clock failure
11 = Oscillator postscaler divides clock by 64 0 = FSCM has NOT detected clock failure
10 = Oscillator postscaler divides clock by 16 Reset on POR or BOR.
01 = Oscillator postscaler divides clock by 4 Reset when a valid clock switching sequence is initiated.
00 = Oscillator postscaler does not alter clock Set when clock fail detected.
bit 5 LOCK: PLL Lock Status bit (Read Only) bit 2 Unimplemented: Read as ‘0’
1 = Indicates that PLL is in lock bit 1 LPOSCEN: 32 KHz Secondary (LP) oScillator Enable
0 = Indicates that PLL is out of lock (or disabled) 1 = Secondary Oscillator is enabled
Reset on POR or BOR. 0 = Secondary Oscillator is disabled
Reset when a valid clock switching sequence is Reset on POR or BOR.
initiated. bit 0 OSWEN: Oscillator Switch Enable bit
Set when PLL lock is achieved after a PLL start. 1 = Request Oscillator switch to selection specified by
Reset when lock is lost. NOSCG<2:0> bits
Read zero when PLL is not selected as a system 0 = Oscillator switch is complete
clock. Reset on POR or BOR.
bit 4 Unimplemented: Read as ‘0’ Reset after a successful clock switch.
Reset after a redundant clock switch.
Reset after FSCM switches the oscillator to (Group 1) FRC.
2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 25 2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 28
25 28
26 29
Input 4-10MHz
interrupciones, 48 K
Output 120 MHz
posiciones de flash
1K byte de EEPROM
máx. con PLL
Memoria de Configuración
El PLL permite multiplicar
Mapa de Memoria
la frecuencia
Longitud de 24 bits
2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 27 2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 30
27 30
5
20/02/2019
2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 31 2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 34
31 34
Memoria RAM
de Datos
SRAM
Consta de 2 bloques
llamados el bloque X y
el Bloque Y
Ambos bloques son
manejados
independientes por las
instrucciones del DSP,
pero como uno solo en
instrucciones del
microcontrolador
Dividido en Byte
2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 32 2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 35
32 35
2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 33 2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 36
33 36
6
20/02/2019
37 40
38 41
39 42
7
20/02/2019
Registro ADPCFG
2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 43 2/20/2019 M.Sc. Ing. Germán Jesús Pereira Muñoz 46
43 46
Multiplicación de Datos
DIAGRAMA DE BLOQUES
GENERICO DE UN PIN DE E/S:
Cada pin comparte su
trabajo con varias
funciones
para eso se utiliza la
siguiente arquitectura
Es importante tomar en
cuenta que el PORTB
cuando se quiere trabajar
como entradas y salidas
digitales, los bits del
registro ADPCFG deben
estar en 1 para configurarlo
con I/0 porque por defecto
es análogo
44
Diagrama
Circuital Básico
45