Thursday, May 28, 2009
Oscillator Type
The PIC16F84 can be operated in four different oscillator modes. The user can program two configuration bits (FOSC1 and FOSC0) to select one of these four modes:
i. LP Low Power Crystal
ii. XT Crystal/Resonator
iii. HS High Speed Crystal/ResonatorRC Resistor/Capacitor
Sunday, April 19, 2009
PIC clock generator
Friday, April 17, 2009
SFR - Special Function Robot?
Saturday, April 11, 2009
GPR?
Wednesday, April 8, 2009
Select Bank in PIC memory
Data memory is partitioned into two banks which contain the general purpose registers and the special function registers. Bank 0 is selected by clearing the RP0 bit (STATUS<5>). Setting the RP0 bit selects Bank 1. Each Bank extends up to 7Fh (128 bytes). The first twelve locations of each Bank are reserved for the Special Function Registers. The remainder is General Purpose Registers, implemented as static RAM.
Tuesday, March 31, 2009
Data Memory
Sunday, March 29, 2009
Program Memory
http://PICprogramForU.blogspot.com
Thursday, March 26, 2009
Wednesday, March 25, 2009
What is PIC16F84?
Taken from http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010230
Tuesday, March 24, 2009
Memory organization
Sunday, March 22, 2009
PORTB and TRISB
Wednesday, March 18, 2009
PORTA and TRISA
Tuesday, March 17, 2009
Ports
Microcontroller uses them to monitor or control other components or devices. All port pins can be designated as input or output, according to what the devices need. Usually, microcontroller has at least two ports and each ports maybe has 8-bit register.
Monday, March 16, 2009
Sunday, March 15, 2009
Motorola 68000
The 68000 microprocessor comprises:
- 8 data registers namely D0 - D7
- Address registers, A0 - A7
- Program counter (PC) & Status register (SR).
Data registers
Data register is used to hold data temporarily for the use in processing. Each registers can be accessed for byte operands (0-7), word operands (0-15 bits) or long-word operands (0-31 bits).
Function: Used to store information within the 68k uP itself
Address registers
Address register are not provided for storage of data for processing. Instead, they are meant to store address information. Although every registers contain 32 bits, only the lower 24 bits are used to access memory. Therefore, the address range is 224 (16M) byte.
Function: Used to store the location where data can be founded outside the processor. Ex: external memory chip. A7 usually is used to execute subroutine
Microprocessor
ALU
In instructions with two operands, ordinarily one operand is in work register (W register), and the other is one of the registers or a constant. By operand we mean the contents on which some operation is being done, and a register is any one of the GPR or SFR registers. GPR is an abbreviation for 'General Purposes Registers', and SFR for 'Special Function Registers'. In instructions with one operand, an operand is either W register or one of the registers.
As an addition in doing operations in arithmetic and logic, ALU controls status bits (bits found in STATUS register). Execution of some instructions affects status bits, which depends on the result itself. Depending on which instruction is being executed, ALU can affect values of Carry (C), Digit Carry (DC), and Zero (Z) bits in STATUS register.
Saturday, March 14, 2009
CPU in Microcontroller
Central processing unit connects all parts of the microcontroller in one systems. CPU most important function is to decode program instructions. When programmer writes a program, instructions have a clear form like MOVWF PORTB. However, in order for a microcontroller to understand that, this 'letter' form of an instruction must be translated into a series of zeros and ones which is called an 'opcode'. This translation from a letter to binary form is done by translators such as assembler translator or also known as an assembler.
Instruction fetched from program memory must be decoded by a central processing unit (CPU). We can then select from the table of all the instructions a set of actions which execute a assigned task defined by instruction. As instructions may within themselves contain assignments which require different transfers of data from one memory into another, from memory onto ports, or some other calculations, CPU must be connected with all parts of the microcontroller. This is made possible through a data bus and an address bus.
Harvard Architecture Vs Von Neumann Architecture
For Harvard architecture the instruction bus is allowed to be a different width than the data bus. So, an instruction can be fetched in a single clock cycle because the instruction bus can be custom tailored. The last instruction can be executed by cpu while the next one is being fetched, all while data memory is simultaneously being accessed.
Thursday, March 12, 2009
Microcontroller Vs Microprocessor
Microprocessors generally require external components or circuits to implement program memory, RAM memory and Input/Output. Intel's 8085, 80386 and Pentium are examples of microprocessors. Microcontrollers incorporate program memory, RAM memory and input/output port into one chip. Microchip's PIC series and Atmel's AVR series are examples of microcontrollers.
One of the main differences is that microcontrollers are usually designed to perform a small set of specific functions, for example as in the case of a Automatic Braking System which performs a small set of input processing functions, whereas microprocessors tend to be designed to perform a wider set of general purpose functions. For example, microcontrollers are widely used in modern cars where they will each perform a dedicated task, i.e. a microcontroller to regulate the brakes on all four wheels, or a microcontroller to regulate the car air conditioning, or a microcontroller for automatic gate systems.
These microcontrollers will perform few other tasks (if any) other than those specified. Compare to a microprocessor in a PC which performs a wide range of tasks related to the general requirements of a PC such as performing the necessary calculations for a very wide set of software applications, performing Input/Output for the main subsystems, peripheral control and etc.