Skip to main content

About PIC16F628A

PIC16F628A is a powerful (200 nanosecond instruction execution) yet easy-to-program (only 35 single word instructions) CMOS FLASH-based 8-bit microcontroller from Microchip. It comes into an 18-pin package and is upwards compatible with the PIC16F628, PIC16C62XA, PIC16C5X and PIC12CXXX devices.



Features:

  • Operating speeds from DC - 20 MHz
  • Interrupt capability
  • 35 single word instructions
  • Internal and external oscillator options
  • Programmable weak pull-ups on PORTb
  • 16 I/O pins with individual direction control
  • Analog comparator module with:
    - Two analog comparators
    - Programmable on-chip voltage reference
    (VREF) module
    - Selectable internal or external reference
    - Comparator outputs are externally accessible
  • Capture, Compare, PWM module
    - 16-bit Capture/Compare
    - 10-bit PWM
  • 128 bytes of EEPROM data memory
  • 2K flash program memory
  • Addressable Universal Synchronous/Asynchronous
    Receiver/Transmitter USART/SCI
I/O Ports:
The PIC16F627A/628A/648A have two ports, PORTA and PORTB. Some pins for these I/O ports are multiplexed with alternate functions for the peripheral features on the device.

    PORTA Functions

    PORTB Functions
Note: While using PORTA pins as Digital Input/Output, always remember to disable the comparator functions on PORTA.0, 1, 2, 3 pins. You can do that by programming the CMCON register = 0x07.

For more detail about PIC16F628A, please read the datasheet from Microchip.

Comments

  1. I am Mushfique from Bangladesh.I am new to Microcontroller & very much interested in doing project with PIC. But I am not getting help to learn the MikroC instruction set for programming with MikroC compiler.Please let me know about any Tutorials from where I can Learn the C Instruction Set for Mikro-C Compiler for programming. My email address is mushu_mist@yahoo.com or mushu.eme@gmail.com Thank you very much.

    ReplyDelete
  2. Mushfique,
    Please go to this link and read this book :PIC Microcontrollers - Programming in C. This is a free e-book from miKroElectronika.
    http://www.mikroe.com/en/books/pic-books/mikroc/

    You can also download the user's manual for microC compiler here:
    http://www.mikroe.com/en/compilers/mikroc/pro/pic/

    Good Luck!

    ReplyDelete

Post a Comment

Popular posts from this blog

Contact less tachometer using PIC16F628A

Introduction Tachometer is a device that gives you the information about the rotational speed of any shaft or disc. It usually measures the speed in revolutions per minute (RPM). Today we are going to make a simple tachometer that could measure the rotation speed of a disk without making any physical contact (that's why it is contact less) with the rotating object. The range of this tachometer is 0 - 9999 RPM and displays the RPM on a multiplexed 4-digit seven-segment display. Of course, we are going to do this project on our usual PIC16F628A development board. Infrared sensor Contact-less measurement of RPM will be achieved through an IR sensor. An IR diode will send a beam of infrared towards the rotating disc, and any reflected pulse will be received by a photo diode. The resistance of a photo diode drops drastically when exposed to infrared. An infrared is reflected by a white surface and absorbed by the dark ones. The test disc for this project is shown below. You can see

PIC16F628A Development Board

The development board we are going to make for our experimental microcontroller PIC16F628A will look like this. Here are the features it is going to have: Access to all I/O pins through female header pins 4 Push Buttons for Input 4 LEDs for Output An LCD Interface Port A 4-digit Seven-Segment Display Interface LCD Backlight Switch and Contrast Adjustment ICSP Programming (Very Important)

Experiment No. 2 : Push Button and Seven Segment Display Interface

In this experiment, we will program the PIC16F628A as an UP/DOWN Decade Counter. The count value will be displayed on a Seven-Segment Display and will be incremented/decremented by two push buttons on the board. Experimental Setup: The board has built in interface for a multiplexed 4-digit seven segment display (HS-5461AS2 from www.futurlec.com ).We will select only one digit by connecting a Digit Select pin to Vcc, as shown in figure below. A black jumper wire is used for this purpose. The seven segments will be driven through PORTB (already wired on the board). Connect Push Buttons (PB3 and PB4) to RA1 and RA0 female headers using jumper wires.