lezione 2 - old.disco.unimib.itold.disco.unimib.it/.../old/aa0607/slide_corso/lezione1.pdf ·...
Post on 01-Aug-2020
0 Views
Preview:
TRANSCRIPT
INFORMATICAINDUSTRIALE
Prof. Christian Forlaniforlani@disco.unimib.it
Tutor: Stefano Brusamolinobrusamolino@ira.disco.unimib.it
Lezione 2
Lezione 1 2
Informatica Industriale
PIC18• Performance 8-bit RISC CPU• 40 MHz / 10 MIPs sustained operation• 3.0V to 5.5V operation• Program Memory addressing to 2MB
– Enhanced Flash memory• 2 Seconds Programming Time• Low Cost MPLAB-ICD-II Support• Flexible Program Memory Protection
• Data Memory addressing to 4KB
Lezione 1 3
Informatica Industriale
Device Structure
Ogni parte del dispositivo può essere collocata all’interno di questi gruppi
•Core•Peripherals•Special Features
Lezione 1 4
Informatica Industriale
Per Core si intende l’insieme di elementi che rendono il dispositivo operativo:
» Oscillator» Reset » Architecture» CPU (Central Processing Unit)» ALU (Arithmetic Logical Unit)» Hardware 8x8 Multiplier» Memory» Table Read / Table Write» System Bus» Interrupts» Instruction Set
Device Structure: Core
Lezione 1 5
Informatica Industriale
Device Structure:Peripherals
• Per Periferiche si intende l’insieme di componenti che permette una caratterizzazione del dispositivo
» I/O » Parallel Slave Port (PSP)» Timer» Capture/Compare/PWM (CCP)» Serial Slave Port (SSP)» Master Synchronous Serial Port (MSSP)» Addressable USART» CAN» Comparator Voltage Reference» 10-bit A/D Converter
Lezione 1 6
Informatica Industriale
• Low Voltage Detect• WDT and Sleep Operation• Device Configuration Bits• In-Circuit Serial Programming™ (ICSP™)
Device Structure: Special Features
Lezione 1 7
Informatica Industriale
Classificazione per tipo di Program Memory
• C, (es. PIC18CXXX) EPROM memory. (OTP se plastic case,UVEraseble se windowed)
• CR, (es. PIC18CRXXX) ROM• F, (es. PIC18FXXX) FLASH type memory.
Lezione 1 8
Informatica Industriale
Classificazione per tensione di alimentazione
• F,CR,C (es. PIC18FXXX) 4,2-5,5V.• LF,LCR,LC (es. PIC18LFXXX) 3-5,5V.
Lezione 1 9
Informatica Industriale
» Oscillator» Reset » Architecture» CPU (Central Processing Unit)» ALU (Arithmetic Logical Unit)» Hardware 8x8 Multiplier» Memory Map» Table Read / Table Write» System Bus» Interrupts» Instruction Set
Device Structure: Core
Lezione 1 10
Informatica Industriale
Oscillator• EC:External Clock• LP:Low Frequency Crystal• XT:Crystal/Resonator• HS:High Speed Crystal/Resonator• RC:External Resistor/Capacitor• HS4:High Speed Crystal/Resonator with
4x frequency PLL multiplier enabled
Lezione 1 11
Informatica Industriale
Collegamento XTAL, ext CLK-PIC
Lezione 1 12
Informatica Industriale
Collegamento RC-PIC
Lezione 1 13
Informatica Industriale
» Oscillator» Reset » Architecture» CPU (Central Processing Unit) and System Bus» ALU (Arithmetic Logical Unit)» Hardware 8x8 Multiplier» Memory Map» Table Read / Table Write» Interrupts» Instruction Set
Device Structure: Core
Lezione 1 14
Informatica Industriale
ResetIl Reset serve per riportare il dispositivo ad uno stato
conosciutoTIPI DI RESET
• Power-on Reset (POR)• MCLR Reset during normal operation• MCLR Reset during SLEEP• WDT Reset (normal operation)• Programmable Brown-out Reset (BOR)• RESET Instruction• Stack Overflow Reset• Stack Underflow Reset
Lezione 1 15
Informatica Industriale
Reset Control (RCON) register
• RI: Reset Instruction Flag bit• TO: Watchdog Time-out Flag bit• PD: Power-down Detection Flag bit• POR: Power-on Reset Status bit• BOR: Brown-out Reset Status bit
Lezione 1 16
Informatica Industriale
Stato PC dopo Reset
Lezione 1 17
Informatica Industriale
» Oscillator» Reset» Architecture» CPU (Central Processing Unit) and System Bus» ALU (Arithmetic Logical Unit)» Hardware 8x8 Multiplier» Memory Map» Table Read / Table Write» System Bus» Interrupts» Instruction Set
Device Structure: Core
Lezione 1 18
Informatica Industriale
ArchitecturePIC
Lezione 1 19
Informatica Industriale
Instruction/Data size
• Data Size (8 bit)• Data Memory (8bit)
• Instruction Size (Word, Double Word:16,32 bit)• Program Memory (8bit)
Lezione 1 20
Informatica Industriale
Lezione 1 21
Informatica Industriale
top related