SlideServe
Menu
Préférences
© SlideServe · v2026

PIC18 Peripherals

brandy avatar
11 diapositives · 309 Views · Sep 22, 2014

PIC18 Peripherals. PIC18F452/458 Peripherals –. Data ports – A 6-bit B 8-bit C 8-bit D 8-bit E 3-bit Timer/counter modules – 0 [8-bit], 1 [16-bit], 2 [8-bit], 3 [16-bit]. CCP/PWM modules [2] I 2C/SPI serial port USART [RS-232, RS-485] ADC [10-bit] with 10 way input multiplexer

PIC18 Peripherals - slide 1
01 / 11PIC18 Peripherals
1 / 17

Télécharger la présentation

PIC18 Peripherals
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. PIC18 Peripherals

  2. PIC18F452/458 Peripherals – • Data ports – • A 6-bit • B 8-bit • C 8-bit • D 8-bit • E 3-bit • Timer/counter modules – 0 [8-bit], 1 [16-bit], 2 [8-bit], 3 [16-bit]

  3. CCP/PWM modules [2] • I2C/SPI serial port • USART [RS-232, RS-485] • ADC [10-bit] with 10 way input multiplexer • EEPROM [256 byte]

  4. PIC instruction set • PIC instruction set has a small no. of simple (RISC) instructions: • PIC16 series – 35 inst. coded into 14 bits • PIC18 series – 59 16… • PIC24 series – 71 24… Most instructions are executed in one instruction cycle that corresponds to 4 clock cycles. Hence, a PIC operating at 40 MHz clock frequency will have an instruction rate of 10 MIPS.

  5. Byte-oriented file register operations • Byte-oriented file register operations – ADDWF Add W and f  result in W or f CLRF clear f DECF decrement f MOVF Move contents of f to f or W

  6. Bit-oriented file register operations BCF clear bit in f BTFSC test bit in f; skip if clear

  7. Control instructions CALL call subroutine (funtion) RETURN return from subroutine (function) BRA branch unconditionally BNZ branch if not zero

  8. Literal instr. MOVLW move literal to W ADDLW add literal to W

  9. Status register • 8-bit status register – • N negative bit – result of arithmetic operation was negative • OV overflow bit – overflow occurred for signed arithmetic • Z zero bit • DC digit carry bit – carry out from 4th low order bit of result • C carry bit –carry out from MSB of result The bits of the status reg can be used for conditional branches, e.g., - BNZ branch if not zero - BOV branch if overflow

  10. CCS PIC compiler • Compiler – high-level language prog to machine instructions for the target processor • Cross-compiler – is a compiler that runs on a processor that is different from the target processor • E.g., CCS cross-compiler • Most embedded systems are now programmed using C/C++ lang.

  11. PCwith CCS compiler USBICD2 debugger  PIC system • Programs are edited and compiled to PIC machine instructions on a PC • PIC machine instructions are uploaded from PC to PIC system via the ICD2 debugger [e.g., microchip MPLAB ICD2] • Code is executed on the PIC system and can be debugged (break points, inspect variables, single step, etc.) using PC