Programming the PIC Microcontroller

Sponsored Link :

. .


Program Execution

pic 16F877 Pin out e1294033814646 Programming the PIC Microcontroller

pic 16F877 Pin-out

The chip has 8 k (8096 x 14 bits) of flash ROM program memory, which has to be programmed via the serial programming pins PGM, PGC, and PGD. The fixed-length instructions contain both the operation code and operand (immediate data, register address, or jump address). The mid-range PIC has a limited number of instructions (35) and is therefore classified as a RISC (reduced instruction set computer) processor. Looking at the internal architecture, we can identify the blocks involved in program execution. The program memory ROM contains the machine code, in locations numbered from 0000 h to 1FFFh (8 k). The program counter holds the address of the current instruction and is incremented or modified after each step. On reset or power up, it is reset to zero and the first instruction at address 0000 is loaded into the instruction register, decoded, and executed. The program then proceeds in sequence, operating on the contents of the file registers ( 000–1FFh ), executing data movement instructions to transfer data between ports and file registers or arithmetic and logic instructions to process it. The CPU has one main working register (W), through which all the data must pass. If a branch instruction (conditional jump) is decoded, a bit test is carried out; and if the result is true, the destination address included in the instruction is loaded into the program counter to force the jump. If the result is false, the execution sequence continues unchanged. In assembly language, when CALL and RETURN are used to implement subroutines, a similar process occurs. The stack is used to store return addresses, so that the program can return automatically to the original program position. However, this mechanism is not used by the CCS C compiler, as it limits the number of levels of subroutine (or C functions) to eight, which is the depth of the stack. Instead, a simple GOTO instruction is used for function calls and returns, with the return address computed by the compiler.

PIC16F877 MCU Block Diagram e1294033814552 Programming the PIC Microcontroller

PIC16F877 MCU Block Diagram


Keyword :
pic microcontroller ,programmer ,software ,pic microcontrollers ,tutorial ,serial port ,registers ,project ,program memory ,pic programmer ,mplab ide ,microcontrollers ,voltage ,tutorials ,target ,programming pic ,picmicro ,pic programming ,paperback ,microcontroller ,microchip pic ,microchip ,mbasic ,instruction ,technology ,routine ,reviews ,processor ,pickit ,pic tutorial ,pic chip ,microprocessors ,memory ,interfacing ,how to ,hobbyists ,hex file ,ground ,firmware ,family ,eeprom ,download ,development board ,design ,configuration ,circuits ,circuit ,assembly language ,assembly ,application.


Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Select Category