1.1. Device Structure _____________________________________________________ 3
2.1. General Mid-range PICmicro Block Diagram ______________________________ 6
3. Memory Organisation______________________________________________7 3.1. Special Function Registers (SFR) _______________________________________ 9
4. Instruction set___________________________________________________12 5. The Integrated Development Environment (IDE) _______________________13 6. An Example _____________________________________________________16
© by Heinz Rongen Forschungszentrum Jülich Zentrallabor für Elektronik 52425 Jülich, Germany email: H.Rongen@fz-juelich.de
Introduction to PIC microcontroller: (1) Heinz Rongen Tel: +49-(0)2461-614512 Forschungszentrum Jülich, ZEL Fax: +49-(0)2461-613990 52425 Jülich, Germany Email: H.Rongen@fz-juelich.de
PIC controllers are a family of small risc controllers used in embeddeded applications. PIC controllers are produced by the company „Microchip“ Literature can be obtained from the Microchip web site (www.microchip.com). The growth of the 8-bit MCU market share is a testament to the PICmicro MCUs ability to meet the needs of many. This growth has made the PICmicro architecture one of the top three architectures available in the general market today. This growth was fueled by the Microchip vision of the benefits of a low cost OTP solution. Some of the benefits for the customer include: PICmicro devices are grouped by the size of their Instruction Word. The three current PICmicro families are: 1. Base-Line: 12-bit Instruction Word length 2. Mid-Range: 14-bit Instruction Word length 3. High-End: 16-bit Instruction Word length This manual focuses on the Mid-Range devices, which are also referred to as the PIC16Cxxx MCU family. The operation of the PIC16CXXX MCU family architecture and peripheral modules is explained, but does not cover the specifics of each device. Therefore, it is not intended to replace the device data sheets, but complement them. In other words, this guide supplies the general details and operation of the PICmicro architecture and peripheral modules, while the data sheets give specific details such as device memory mapping. Initialization examples are given throughout this manual. These examples sometimes need to be written as device specific as opposed to family generic, though they are valid for most other devices. Some modifications may be required for devices with variations in register file mappings.
Introduction to PIC microcontroller: (2) Heinz Rongen Tel: +49-(0)2461-614512 Forschungszentrum Jülich, ZEL Fax: +49-(0)2461-613990 52425 Jülich, Germany Email: H.Rongen@fz-juelich.de
1.1. Device Structure Each part of a device can be placed into one of three groups: 1. Core 2. Peripherals 3. Special Features The core pertains to the basic features that are required to make the device operate: 1. Device Oscillator 2. Reset logic 3. CPU (Central Processing Unit) operation 4. ALU (Arithmetic Logical Unit) operation 5. Device memory map organization 6. Interrupt operation Revision 7. Instruction set Revision
Peripherals are the features that add a differentiation from a microprocessor. These ease in interfacing to the external world (such as general purpose I/O, LCD drivers, A/D inputs, and PWM outputs), and internal tasks such as keeping different time bases (such as timers). The peripherals that are discussed are: 1. General purpose I/O 2. Timer0 3. Timer1 4. Timer2 5. Capture, Compare, and PWM (CCP) 6. Synchronous Serial Port (SSP) 7. Basic Synchronous Serial Port (SSP) 8. Master Synchronous Serial Port (MSSP) 9. USART (SCI) 10. Voltage References 11. Comparators 12. 8-bit Analog to Digital (A/D) 13. Basic 8-bit Analog to Digital (A/D) 14. 10-bit Analog to...
Please join StudyMode to read the full document