PIC 16F628 and 16F627

The 16F628 an older device but is still a very capable little device (18pin - the same number as the venerable 16F84). Importantly it has its own internal clock running at a rate of 4MHz.

Warning: The 16F628 is not recommended for new designs, so just buy the 16F628A version and code operation will be identical - the 16F628A has lower power operation and is capable of lower voltage operation (read easy battery powered operation).

The 16F628A version is (still in production as of Apr2018) and is an enhanced version of the 16F628 (mainly its nano Watt power down capability - and it is also capable of operating from 2V (or above), whereas the 16F628 operates from 3V (or above) ) in all other respects the 16F628A is identical to the 16F628 - pinout, internal peripherals and mempry architecture.

When you use the internal oscillator you don't need an external crystal so that frees up two pins in most projects. In addition you can also use the internal reset circuit so that frees up the reset pin for use (MCLRn pin) - but note that this pin can only be used as an input (due to internal circuitry in the 16F628).

Peripherals:

  • 2 x Comparators
  • 1 x UART
  • 1 x CCP
  • 3 x Timers
  • Internal oscillator

Memory:

  • 2k Program words
  • 224 Bytes SRAM
  • 128 Bytes EEPROM

The 16F84 has 1 peripheral (Timer 0) whereas the 628 has three timers, a USART, a CCP (for Pulse Width Modulation, capture and compare), and two analogue comparators. One other useful feature is that you can switch it from internal 4MHz to slow speed internal 37kHz on the fly so you can used it in power sensitive applications (but the 16F628A is a better choice if you need ultra low power operation).

The two most important features are that there is 2k of program memory and 224 Bytes of RAM.  This last one is nearly four times as much as the 16F84 and for high level language use this makes it much easier to use as it is the resource the you run out of most quickly.

PIC 16F628 Pinout

16F628 pinout diagram

Jump to the 628 bubble diagram.

Difference between the 627 and 628

The only difference is the available program memory (Flash programming area).

Device (16F) Flash program words Ram EEPROM
627 1024x14 224x8 128x8
628 2048x14 224x8 128x8

Jump to bubble diagram device list.

For a summary of each peripheral block click here.

Note: To compare bubble diagrams open each device page in a separate window (a tabbed browser is useful for this) and hit the 'Jump to device' link above then alternately select each view to see the differences between the devices.

16F628, 16F627 Features

There is less memory for the 16F627 (se table above).

12F628



The 16F628 pic microcontroller is quite a capable little device having enough memory for useful applications and the only features it lacks are an ADC and I2C capability.  

Not available:

  • ADC
  • I2C

Note: You can get round the lack of I2C by bit-banging programming i.e. controlling a programmable pin without requiring an internal hardware module (see this project for source code) and you could use an external ADC.  A better choice may be the 16F88 that has a built in 10 bit ADC if you need an ADC.

Low Power Operation

The 16F628 has fairly good low power operation 1uA @3V but if you really want to have a battery operated system that lasts longer then the 16F628A has a standby current of 100nA @2V i.e. an order of magnitude better.

TIP: 16F628A has x10 lower current consumption then the 16F628.



Jump from 16f628 resources to
Best Microcontroller Projects Home Page.


New! Comments

Have your say about what you just read! Leave me a comment in the box below.



Privacy Policy | Contact | About Me

Site Map | Terms of Use





Subscribe to the MicroZine Newsletter and collect your free microcontroller Ebooks, download project code and more...


Visit our Facebook Page:

   Click Here

Recent Articles

  1. The Essential I2C Tutorial: All you need to know about I2C...

    I2C tutorial: Learn all about the 2 wire I2C serial protocol. Learn how easy it is to use, how it works and when to use it...

    Read more

  2. [Arduino] : Using the 74HC595 shift register with shiftOut().

    The Essential Guide to the 74HC595; What it is and how you can easily use one in any of your projects.

    Read more

  3. How to use a DS18B20 on the Arduino for easy temperature measurement

    How to Easily Use the DS18B20 Maxim One-Wire thermometer with Arduino example code showing external or parasitic power modes.

    Read more

  4. Secrets of Arduino millis: How it works and how to use it.

    How to use Arduino millis() to make delays, one-shots and simple schedulers plus simple analysis of arduino millis() code; Find out how it works.

    Read more

  5. The TCS230 Color Sensing Chip: How it works and how to use it.

    How to use the TCS230 (/TCS3200) Color detector chip and easily add it to any of your projects.

    Read more

  6. Pic Programmer Types

    Which pic programmer do you need? This page discusses PIC programmers and gives some essential information on choosing or building your own programmer.

    Read more

Readers Comments

"I wanted to thank
you so so so much
for all the information
you have provided in
your site it's

SUPERB and FANTASTIC."

- Ranish Pottath

"This site really is
the best and my favorite.
I find here many useful
projects and tips."

- Milan

bursach<at>gmail.com<

"Awesome site,
very, very easy and nice
to navigate!"


- Matt
matt_tr<at>
wolf359.cjb.net


Learn Microcontrollers

"Interested in
Microcontrollers?"

Sign up for The
Free 7 day guide:

FREE GUIDE : CLICK HERE


"I am a newbie to PIC
and I wanted to say
 how great your
site has been for me."


- Dave

de_scott<at>bellsouth.net

"Your site is a great
and perfect work.
congratulations."


- Suresh

integratredinfosys<at>
yahoo.com

"I couldn't find the correct
words to define
yourweb site.

Very useful, uncovered,
honest and clear.

Thanks so much for
your time and works.
Regards."


- Anon

Back to Top