Académique Documents
Professionnel Documents
Culture Documents
Lesson2 PDF
Lesson2 PDF
Cours Microinformatique I
Microinformatique I
Introduction au dsPIC
Francesco Mondada
Laboratoire de systèmes autonomes
I2S - STI - EPFL
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 1
November 05
Microinformatique I
Introduction
dsPIC est une famille de micro-contrôleurs qui allie la structure
d’un micro-contrôleurs et celle d’un DSP (Digital Signal Processor)
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 2
November 05
Microinformatique I
Structure
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 3
November 05
Microinformatique I
Structure
Coeur du
contrôleur
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 4
November 05
Microinformatique I
Structure
Gestion des
adresses
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 5
November 05
Microinformatique I
Structure
IMPORTANT:
Deux bus X et Y
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 6
November 05
Microinformatique I
Structure
Périphériques
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 7
November 05
Microinformatique I
Structure: périphériques
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 8
November 05
Microinformatique I
Structure
Pinning
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 9
November 05
Microinformatique I
Structure
Pinning: partage
des fonctions
(Change
Notification
Module)
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 10
November 05
Microinformatique I
Structure
Pinning: partage
des fonctions
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 11
November 05
Microinformatique I
Structure
Timer (5 x 16bit)
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 12
November 05
Microinformatique I
Structure
Timer (2 x 32bit)
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 13
November 05
Microinformatique I
Structure
Input capture (8x)
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 14
November 05
Microinformatique I
Structure
Output
Compare
(8x)
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 15
November 05
Microinformatique I
Structure
Serial Peripheral Interface “SPI” (concept)
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 16
November 05
Microinformatique I
Structure
SPI
(2x)
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 17
November 05
Microinformatique I
Structure
I2C (1x)
Inter-Integrated
Circuit
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 18
November 05
Microinformatique I
Structure
Universal
Asynchronous
Receiver
Transmitter
(UART)
(2x)
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 19
November 05
Microinformatique I
Structure
Universal
Asynchronous
Receiver
Transmitter
(UART)
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 20
November 05
Microinformatique I
Structure
Controller
Area
Network
(CAN)
(2x)
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 21
November 05
Microinformatique I
Structure
Data
Converter
Interface
(DCI)
(1x)
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 22
November 05
Microinformatique I
Structure
12 bit A/D
(16x)
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 23
November 05
Microinformatique I
Programmation
Les dsPIC ont un set d’instuctions assez important (84), dont la
grande majorité est executée en un cycle
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 24
November 05
Microinformatique I
Programmation
Modèle
de
programmation
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 25
November 05
Microinformatique I
Programmation
Modèle
de
l
programmation eve
L
y
rit
ir o e
A B A B AB AB e rr
y P tiv
w w te te o w te tiv a upt Ac tive low
lf o lf o ra ra fl ra c C rr at a rf o y
r r u tu ver atu o A it te rr
ve ve at a ig n ep eg ve er a
O O S S O S D D I R N O Z C
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 26
November 05
Microinformatique I
Programmation
Modèle
de
programmation
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 27
November 05
Microinformatique I
Programmation
Mémoire programme
100k cycles
1M cycles
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 28
November 05
Microinformatique I
Programmation
(Special Function Register)
Mémoire données
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 29
November 05
Microinformatique I
Programmation
Instructions:
Move…
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 30
November 05
Microinformatique I
Instructions:
Math…
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 31
November 05
Microinformatique I
Instructions:
Math…(2)
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 32
November 05
Microinformatique I
Instructions:
Logique…
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 33
November 05
Microinformatique I
Instructions:
Rotation +
décalage
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 34
November 05
Microinformatique I
Instructions:
Opérations
sur bits
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 35
November 05
Microinformatique I
Instructions:
Tests
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 36
November 05
Microinformatique I
Instructions:
Sauts
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 37
November 05
Microinformatique I
Instructions:
Sauts (2)
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 38
November 05
Microinformatique I
Instructions:
Stack +
Shadow
Contrôle
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 39
November 05
Microinformatique I
Instructions:
DSP
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 40
November 05
Microinformatique I
Instructions DSP
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 41
November 05
Microinformatique I
TP de cette semaine
Utilisation de l’environnement intégré MPLAB pour:
• Compilation
• Observation code compilé
• Simulation
• Debug
http://asl.epfl.ch
Autonomous Systems Lab
Cours MicroInfo I 42