16F877 A Microcontroller


16F877 A Microcontroller
PERIPHERAL FEATURES
· Timer0: 8-bit timer/counter with 8-bit prescaler
· Timer1: 16-bit timer/counter with prescaler can be incremented during SLEEP via external     Crystal/clock
· Timer2: 8-bit timer/counter with 8-bit period Register, prescaler and postscaler.
· Two Capture, Compare, PWM modules
· 10-bit multi-channel Analog-to-Digital converter
· Synchronous Serial Port (SSP) with SPI (Master Mode) and I2C (Master/Slave)
· Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI) with 9-bit address Detection
· Parallel Slave Port (PSP) 8-bits wide, with  External RD, WR and CS control (40/44-pin) only
· 2 PWD
· Self programming
· Parallel Slave port
PORT A
PORT A is a 6-bit wide, bi-directional port. The corresponding data   direction register is TRIS A. Setting a TRIS A bit (= 1) will make the corresponding PORT A pin an input (i.e., put the corresponding output driver in a Hi-Impedance mode). Clearing a TRISA bit (= 0) will make the corresponding PORTA pin an output (i.e., put the contents of the output latch on the selected pin. A write to a port implies that the port pins are read; the value is modified and then written to the port data latch.

Port A functions

 Port B
           Port B is an 8-bit wide, bi-directional port. The corresponding data direction register is TRISB. Setting a TRISB bit (= 1) will make the corresponding PORT B pin an input (i.e., put the corresponding output driver in a Hi-Impedance mode). Clearing a TRIS B bit (= 0) will make the corresponding PORTB pin an output (i.e., put the contents of the output latch on the selected pin)
Port B functions



PORT C
PORT C is an 8-bit wide, bi-directional port. The corresponding data direction register is TRISC. Setting TRISC bit (= 1) will make the corresponding PORTC pin an input. Clearing a TRISC bit (= 0) will make the corresponding PORTC pin an output.
   Port C functions



PORT D
     PORT D is an 8-bit port with Schmitt Trigger input buffers. Each pin is individually configurable as an input or output
  
Port D functions

PORT E
           PORT E has three pins (RE0/RD/AN5, RE1/WR/AN6 and RE2/CS/AN7) which are individually configurable as inputs or outputs. These pins have Schmitt Trigger input buffers. The PORT E pins become the I/O control inputs for the microprocessor port when bit PSPMODE (TRISE<4>) is set. In this mode, the user must make certain that the TRISE<2:0> bits are set and that the pins are configured as digital inputs. Also, ensure that ADCON1 is configured for digital I/O. In this mode, the input buffers are TTL. Register 4-1 shows the TRISE register which also controls the Parallel Slave Port operation. PORTE pins are multiplexed with analog inputs. When selected for analog input, these pins will read as ‘0’s. TRISE controls the direction of the RE pins, even when they are being used as analog inputs. The user must make sure to keep the pins configured as inputs when using them as analog inputs.
Port E functions



Post a Comment

0 Comments