fbpx

PIC Introduction

Peripheral Interface Controller is fast and easy to implement program when compare to 8051.

  • Operating Frequency : DC-20 MHz. & Interrupts : 15.
  • I/O Ports : Ports A, B, C, D, E.
  • Timers : 3.
  • Capture/Compare/PWM modules : 2.
  • Serial Communications : MSSP, USART.
  • Parallel Communications : PSP.
  • 10-bit Analog-to-Digital Module :8 input channels.
  • EEPROM Data Memory (bytes) :256.
  • Data Memory (bytes) : 368.
  • Flash Program Memory (14-bit words) : 8K.

Pin Diagram

Pins

  • Most of these pins are used to connect to I/O devices.
  • Five I/O port take 33 pins.
  • Port A has 6 Pins, Port B, Port C, Port D have 8 Pins, Port E has 3 Pins.

Port A

  • PORTA is a 6-bit wide, bidirectional port.
  • It can be used for general purpose I/O if no external memory presents.
  • Setting a TRISA bit (= 1) will make the corresponding PORTA pin as input.
  • Clearing a TRISA bit (= 0) will make the corresponding PORTA pin as output.
  • The TRISA register controls the direction of the port pins.

Port B

  • PORTB is an 8-bit wide, bidirectional port.
  • The corresponding data direction register is TRISB.
  • Setting a TRISB bit (= 1) will make the corresponding PORTB pin as input.
  • Clearing a TRISB bit (= 0) will make the corresponding PORTB pin as output.

Port C

  • PORTC is an 8-bit wide, bidirectional port.
  • The corresponding data direction register is TRISC.
  • Setting a TRISC bit (= 1) will make the corresponding PORTC pin as input.
  • Clearing a TRISC bit (= 0) will make the corresponding PORTC pin as output.

Port D

  • PORTD is an 8-bit port with Schmitt Trigger input buffers.
  • Each pin is individually configurable as an input or output.
  • PORTD can be configured as an 8-bit wide microprocessor port (Parallel Slave Port) by setting control bit, PSPMODE (TRISD(4)).
  • In this mode, the input buffers are TTL.

Port E

  • PORTE 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.

Leave a Reply

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