Celsius to Kelvin Converter

[vc_row][vc_column width="1/6"][ultimate_spacer height="50"][vc_raw_js]JTNDc2NyaXB0JTIwYXN5bmMlMjBzcmMlM0QlMjIlMkYlMkZwYWdlYWQyLmdvb2dsZXN5bmRpY2F0aW9uLmNvbSUyRnBhZ2VhZCUyRmpzJTJGYWRzYnlnb29nbGUuanMlMjIlM0UlM0MlMkZzY3JpcHQlM0UlMEElM0MlMjEtLSUyMFRvb2xzQWQlMjAtLSUzRSUwQSUzQ2lucyUyMGNsYXNzJTNEJTIyYWRzYnlnb29nbGUlMjIlMEElMjAlMjAlMjAlMjAlMjBzdHlsZSUzRCUyMmRpc3BsYXklM0FpbmxpbmUtYmxvY2slM0J3aWR0aCUzQTE2MHB4JTNCaGVpZ2h0JTNBNjAwcHglMjIlMEElMjAlMjAlMjAlMjAlMjBkYXRhLWFkLWNsaWVudCUzRCUyMmNhLXB1Yi0zNDcyNDEyODkwMjA1NDI2JTIyJTBBJTIwJTIwJTIwJTIwJTIwZGF0YS1hZC1zbG90JTNEJTIyODM2ODE5MjE0NyUyMiUzRSUzQyUyRmlucyUzRSUwQSUzQ3NjcmlwdCUzRSUwQSUyOGFkc2J5Z29vZ2xlJTIwJTNEJTIwd2luZG93LmFkc2J5Z29vZ2xlJTIwJTdDJTdDJTIwJTVCJTVEJTI5LnB1c2glMjglN0IlN0QlMjklM0IlMEElM0MlMkZzY3JpcHQlM0U=[/vc_raw_js][/vc_column][vc_column width="2/3"][vc_raw_html]JTNDaWZyYW1lJTIwc3R5bGUlM0QlMjJoZWlnaHQlM0ElMjA3MjBweCUzQiUyMHdpZHRoJTNBJTIwMTAwJTI1JTNCJTIwYm9yZGVyJTNBJTIwbm9uZSUzQiUyMiUyMHNyYyUzRCUyMmh0dHBzJTNBJTJGJTJGd3d3LnRoZWVuZ2luZWVyaW5ncHJvamVjdHMuY29tJTJGRW5naW5lZXJpbmdUb29scyUyRkNlbHNpdXN0b0tlbHZpbkNvbnZlcnRlciUyRkNlbHNpdXN0b0tlbHZpbkNvbnZlcnRlci5waHAlMjIlM0UlM0MlMkZpZnJhbWUlM0U=[/vc_raw_html][/vc_column][vc_column width="1/6"][ultimate_spacer height="50"][vc_column_text][/vc_column_text][vc_column_text][/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]Hey Guys! Welcome you onboard. The table mentioned above shows the instant conversion from Celsius to Kelvin temperature. You can put any value in Celsius unit and get Kelvin value in return.

Celsius to Kelvin Converter

Both, Celsius and Kelvin are the units widely used for temperature. They don't show a common sharing point and start with an offset value around 273.15. However, once the starting points of both the Kelvin scale and Celsius scales are reserved for the freezing point of water, they are equally separated and incremented with the same number.
Formula Used
Following is the formula used for Celcius to Kelvin conversion.

K = ºC +273.15

The K stands for Kelvin while C stands for Celsius.
Example:
What is the value of 50 C in Kelvin? Simply put the values in the formula

K = ºC+273.15

As given value C = 50,

K = 50+273.15 = 323.15

Table for Common Values
Following table shows some common values converted from Celsius to Kelvin.  
  • Note: Exact value of triple point of water is 0.01 C, 273.16K or 32.02 F.
Celsius Temperature
The Celsius, denoted by C, is an SI unit of temperature that is defined in terms of Kelvin where -273.15 Celsius is equal to the 0 K - commonly known as the Absolute zero. This is a new definition of the Celsius scale that was coined in 1954. Before that, Celsius scale was based and referred to the boiling and freezing point of water where Zero Celsius termed as the freezing point while 100 Celcius was termed as the boiling point of water.
  • The Celsius unit was named after Swedish Astronomer Anders Celsius. Before referring this scale as Celsius in 1948, it was widely recognized as centigrade which is a Latin word where centum means 100 and gradus means steps.
Kelvin Temperature
Kelvin, denoted by K, is a thermodynamic temperature scale, based on Absolute Zero - the temperature at which all thermal motion stops to flow. The Kelvin scale is not written in terms of degree while other two scales Fahrenheit and Celsius are written with a degree sign. The Kelvin scale is named after physicist Baron Kelvin who proposed a need of "absolute thermodynamic scale.
  • Until 1968 the Kelvin was widely written as the degree Kelvin ºK which had created the confusion as some people interpreted it as Rankins Scale. Also, the degree sign indicates the arbitrary value that is appropriate for Celsius and Fahrenheit and is not suitable for defining Kelvin as it predicts the absolute value.
Defining temperatures in both Celsius and Kelvin is a common practice while creating content related to science and technology i.e. the temperature intervals are expressed in Kelvin scales and absolute temperatures are shown in the Celsius scale. The degree Celsius is nothing but a special name for Kelvin used for relative temperature. Similarly, Kelvin is, more or less, indicates the magnitude of degree Celsius. That's all for today. I hope you have found this post informative as per your needs and requirements. Feel free to keep us updated with your feedback and suggestions so we keep producing valuable content and you keep coming back for what we have to offer. Thanks for visiting this page. [/vc_column_text][/vc_column][/vc_row]

Celsius to Fahrenheit Converter

[vc_row][vc_column width="1/6"][ultimate_spacer height="50"][vc_raw_js]JTNDc2NyaXB0JTIwYXN5bmMlMjBzcmMlM0QlMjIlMkYlMkZwYWdlYWQyLmdvb2dsZXN5bmRpY2F0aW9uLmNvbSUyRnBhZ2VhZCUyRmpzJTJGYWRzYnlnb29nbGUuanMlMjIlM0UlM0MlMkZzY3JpcHQlM0UlMEElM0MlMjEtLSUyMFRvb2xzQWQlMjAtLSUzRSUwQSUzQ2lucyUyMGNsYXNzJTNEJTIyYWRzYnlnb29nbGUlMjIlMEElMjAlMjAlMjAlMjAlMjBzdHlsZSUzRCUyMmRpc3BsYXklM0FpbmxpbmUtYmxvY2slM0J3aWR0aCUzQTE2MHB4JTNCaGVpZ2h0JTNBNjAwcHglMjIlMEElMjAlMjAlMjAlMjAlMjBkYXRhLWFkLWNsaWVudCUzRCUyMmNhLXB1Yi0zNDcyNDEyODkwMjA1NDI2JTIyJTBBJTIwJTIwJTIwJTIwJTIwZGF0YS1hZC1zbG90JTNEJTIyODM2ODE5MjE0NyUyMiUzRSUzQyUyRmlucyUzRSUwQSUzQ3NjcmlwdCUzRSUwQSUyOGFkc2J5Z29vZ2xlJTIwJTNEJTIwd2luZG93LmFkc2J5Z29vZ2xlJTIwJTdDJTdDJTIwJTVCJTVEJTI5LnB1c2glMjglN0IlN0QlMjklM0IlMEElM0MlMkZzY3JpcHQlM0U=[/vc_raw_js][/vc_column][vc_column width="2/3"][vc_raw_html]JTNDaWZyYW1lJTIwc3R5bGUlM0QlMjJoZWlnaHQlM0ElMjA3MjBweCUzQiUyMHdpZHRoJTNBJTIwMTAwJTI1JTNCJTIwYm9yZGVyJTNBJTIwbm9uZSUzQiUyMiUyMHNyYyUzRCUyMmh0dHBzJTNBJTJGJTJGd3d3LnRoZWVuZ2luZWVyaW5ncHJvamVjdHMuY29tJTJGRW5naW5lZXJpbmdUb29scyUyRkNlbHNpdXN0b0ZhaHJlbmhlaXRDb252ZXJ0ZXIlMkZDZWxzaXVzdG9GYWhyZW5oZWl0Q29udmVydGVyLnBocCUyMiUzRSUzQyUyRmlmcmFtZSUzRQ==[/vc_raw_html][/vc_column][vc_column width="1/6"][ultimate_spacer height="50"][vc_column_text][/vc_column_text][vc_column_text][/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]Hi Fellas! Hope you are doing well. The table shown above is a Celsius to Fahrenheit Converter. As you put any Celsius value in the table, it will swiftly convert it to Fahrenheit.

Celsius to Fahrenheit Converter

Celsius and Fahrenheit are closely related to each other and need conversion while displaying temperature intervals of any experiment or the magnitude of temperature.
Formula for Conversion
Following formula is used to convert relate Celsius to Fahrenheit.

ºC = 5/9 x (ºF-32)

ºF = 9/5 ºC + 32

Example Convert 30 Celsius to Fahrenheit. Just put the values in the formula

ºF = 9/5 ºC + 32

As given ºC = 30, put this value in the formula above

ºF = 9/5 x 30 + 32 = 86

So, 30 ºC will be equal to 86 ºF
Table for Some Basic Values
Follow table shows the conversion for some common values of Celsius.
Why Convert?
These temperature scales don't share a common point. They require some offset to be added in the start to make them equal. Unlike Kelvin and Celsius that once are reserved for water freezing point, share a regular increment in values, Fahrenheit and Celsius don't increment with regular intervals where Fahrenheit is distributed with 180 (32 -212) points from water freezing to boiling point while Celsius goes from 0 to 100.
Celsius Temperature
The Celsius temperature can be defined in terms of Kelvin temperature where 0 Kelvin is equal to -273.15 Celsius – the point mostly known as Absolute Zero. 
  • Celsius is a temperature scale introduced by Swedish Astronomer Anders Celsius in 1742. Until 1948, this scale was termed as Centigrade, which is a Latin word divided into two parts where centum means 100 and gradus means steps, after that, it was named after the Astronomer.
Uppsala University’s Olof Beckman stated “Celsius should be recognized as the first to perform and publish careful experiments aiming at the definition of an international temperature scale on scientific grounds,” Celsius is the SI unit of temperature and is also defined as per the boiling and freezing point of water where water freezes at 0 C and boils at 100 C.
  • 0 ºC = 32 F  ºFreezing point of water
The freezing and boiling point of water are separated by 180 points in the Fahrenheit scale.
  • 100 ºC = 212 ºF Boiling Point of water
Fahrenheit Temperature
Fahrenheit is a temperature scale defined as a temperature at which water freezes at 32 F and boils at 212 F, measured at sea level with standard atmospheric pressure. History Fahrenheit is a temperature scale introduced by German physicist Daniel Gabriel Fahrenheit in 1724. He performed the experiment on ice-salt mixture and came with the conclusion that water was frozen at 30 F and normal body temperature was supposed to be 90 F. However, the idea was turned down by him after performing a couple of experiments and proposed new values for water freezing point as 32 ºF, modifying body temperature as 96 ºF.
  • This temperature scale was widely used as a fixed reference for a thermometer which furthered to rescale the value for body temperature, terming 98 ºF as the normal body temperature.
That's all for today. I hope you have found this post useful and informative. In case, you are feeling skeptical or have any question, you can ask me in the comment section below. I'd love to help you according to the best of my expertise. Thanks for visiting this post. [/vc_column_text][/vc_column][/vc_row]

Fahrenheit to Celsius Converter

[vc_row][vc_column width="1/6"][ultimate_spacer height="100"][vc_raw_js]JTNDc2NyaXB0JTIwYXN5bmMlMjBzcmMlM0QlMjIlMkYlMkZwYWdlYWQyLmdvb2dsZXN5bmRpY2F0aW9uLmNvbSUyRnBhZ2VhZCUyRmpzJTJGYWRzYnlnb29nbGUuanMlMjIlM0UlM0MlMkZzY3JpcHQlM0UlMEElM0MlMjEtLSUyMFRvb2xzQWQlMjAtLSUzRSUwQSUzQ2lucyUyMGNsYXNzJTNEJTIyYWRzYnlnb29nbGUlMjIlMEElMjAlMjAlMjAlMjAlMjBzdHlsZSUzRCUyMmRpc3BsYXklM0FpbmxpbmUtYmxvY2slM0J3aWR0aCUzQTE2MHB4JTNCaGVpZ2h0JTNBNjAwcHglMjIlMEElMjAlMjAlMjAlMjAlMjBkYXRhLWFkLWNsaWVudCUzRCUyMmNhLXB1Yi0zNDcyNDEyODkwMjA1NDI2JTIyJTBBJTIwJTIwJTIwJTIwJTIwZGF0YS1hZC1zbG90JTNEJTIyODM2ODE5MjE0NyUyMiUzRSUzQyUyRmlucyUzRSUwQSUzQ3NjcmlwdCUzRSUwQSUyOGFkc2J5Z29vZ2xlJTIwJTNEJTIwd2luZG93LmFkc2J5Z29vZ2xlJTIwJTdDJTdDJTIwJTVCJTVEJTI5LnB1c2glMjglN0IlN0QlMjklM0IlMEElM0MlMkZzY3JpcHQlM0U=[/vc_raw_js][/vc_column][vc_column width="2/3"][vc_raw_html]JTNDaWZyYW1lJTIwc3R5bGUlM0QlMjJoZWlnaHQlM0ElMjA3NDBweCUzQiUyMHdpZHRoJTNBJTIwMTAwJTI1JTNCJTIwYm9yZGVyJTNBJTIwbm9uZSUzQiUyMiUyMHNyYyUzRCUyMmh0dHBzJTNBJTJGJTJGd3d3LnRoZWVuZ2luZWVyaW5ncHJvamVjdHMuY29tJTJGRW5naW5lZXJpbmdUb29scyUyRkZhaHJlbmhlaXR0b0NlbHNpdXNDb252ZXJ0ZXIlMkZGYWhyZW5oZWl0dG9DZWxzaXVzQ29udmVydGVyLnBocCUyMiUzRSUzQyUyRmlmcmFtZSUzRQ==[/vc_raw_html][/vc_column][vc_column width="1/6"][ultimate_spacer height="50"][vc_column_text][/vc_column_text][vc_column_text][/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]Hi Friends! Hope you are doing well. The above table shows Fahrenheit to Celsius Converter where you can put any value in Fahrenheit that will consequently convert it to Celsius.

Fahrenheit to Celsius Conversion

Both Fahrenheit and Celsius are termed as units of temperature used as per technical needs and requirements.
Formula used for Conversion
Following formula relate Fahrenheit and Celsius.

C = 5/9 x (F-32)

F = 9/5 C + 32

Example: Convert 90 Fahrenheit to Celsius Just put the values in the formula

C = 5/9 x (F - 32)

As given 90, put this value in the formula above

C = 5/9 x (90 -32) = 32.2

So, 90 F will be equal to 32 C

Table for Some Basic Values
Follow table shows the basic conversion of some common values mainly used in studies.

Why We need Conversion?
The concept of these two units widely used for temperature can be easily apprehended by the concept of Oranges and Apples. Both come with different composition and taste but fall under the same category......Fruits. Similarly, both temperature scales are somehow related to the freezing and boiling point of waters. But their inception was something different from the basis they are used by now. Fahrenheit is widely used for the measuring of body temperature while Celsius is closely related to defining the nature of water. These temperature units don't use a common share point and require some offset to be added in the given value before making them applicable for any experiment.
  • Most of the countries have abandoned the usage of Fahrenheit scale and switched to Celsius except America - that is still relying on Fahrenheit scale.
Fahrenheit Temperature
Fahrenheit, denoted by F, is defined as a temperature at which water freezes at 32 F and boils at 212 F. These boiling and freezing point values are equally separated by 180 points. Fahrenheit and Celsius are closely related and, more often than not, are defined in relation with each other where zero Celsius is equal to 32 F. It is important to note that, all these values are measured and calculated at sea level with standard atmospheric pressure. History Fahrenheit is a term coined by German physicist Daniel Gabriel Fahrenheit in 1724. He proposed the scale based on the ice-salt mixture where he defined 30 F as the freezing point of water, terming 90 F as the body temperature. Later, he found, based on a couple of experiment, the freezing point of water is 32 F while the body temperature is 96 F. When the freezing and boiling point came to limelight as a fixed reference for a thermometer, these values were modified, terming 98 F as the normal body temperature of the human body.
Celsius Temperature
The Celsius temperature, denoted by ºC, is defined in terms of Kelvin temperature where -273.15 Celsius is equal to 0 Kelvin - the point mostly known as Absolute Zero.  Celsius was the term introduced by Swedish Astronomer Anders Celsius in 1742.
  • Uppsala University's Olof Beckman alleged "Celsius should be recognized as the first to perform and publish careful experiments aiming at the definition of an international temperature scale on scientific grounds,"
Celsius is the SI unit of temperature and is widely replaced Fahrenheit in most of the cases. It is also defined as the temperature at which water freezes at 0 C and boils at 100 C.
  • 0 ºC = 273.15 K  Freezing point of water
Once this threshold, is set for the freezing point of water, the next 100 points in Celsius scale are equal to values in Kelvin.
  • 100 ºC = 373.15 K Boiling Point of water
That's all for today. I hope you have found this Fahrenheit to Celsius Converter useful. If you are unsure or have any question you can ask me in the comment section below. I'd love to help you in any way I can. Thanks for reading the article. [/vc_column_text][/vc_column][/vc_row]

Introduction to ATmega168

Hi Friends! Hope you are doing well. We always strive to give you valuable information as per your needs and requirements so you keep coming back for what we have to offer. Today, I'll uncover the details on the Introduction to ATmega168. It is an 8-bit AVR microcontroller that comes with 32-pin interface and is mainly based on RISC CMOS technology. The Program memory is 16K, based on Flash, and incorporates read-write capabilities. The module comes with a wide temperature range from -40 to 85 ºC while operating voltage ranges from 1.8 to 5.5 V. If you are working on project that is related to automation and embedded systems, you can not write off the importance of this module that comes with an ability of performing a number of functions at once on a single chip. In this post, I'll cover each and everything related to this module including main features, pinout, pin description, functions, the compiler used and real-time applications. Let's jump right it, and get down to the nitty-gritty of this little toy.

Introduction to ATmega168

  • ATmega168 is an 8-bit AVR microcontroller that comes in three packages named as PDIP, MLF, and TQFP, where the first two contain 28 pins on each module while other comes with 32-pin interface.
  • The Program memory is 16K that is based on Flash while other two memories RAM and EEPROM contain 1K and 512 Bytes respectively with data retention capability of around 20 years.
  • The 10-bit ADC module is added in the device that plays a vital role for sensor interfacing and contains total 8 channels that are enough to provide analog to digital conversion to a number of pins.
  • Only a few controllers incorporate all three communication protocols i.e. SPI, I2C and USART and ATmega168 is one of them. These protocols are widely used for setting up a communication with external devices.
  • Apart from providing decent pace for executing a number of instructions, other features this module includes a watchdog timer, power up timer, oscillator start-up timer, Brown out Detection and In-Circuit Serial Programming.
  • What Makes this AVR module Different from PIC Microcontrollers is the instruction set. PIC microcontrollers require a number of clock cycles per instruction while AVR executes most instructions in one clock cycle. Also, PIC contains a 'W' register, while AVR comes with 32 general purpose registers where three pairs can be employed as pointers.

1. ATmega168 Features

Features of any device are very important to get a hold of major functions and characteristics associated with it. Following table shows the main features of this module.
ATmega168 Features
No. of Pins 28
CPU RISC 8-Bit CMOS
Operating Voltage 1.8 to 5.5 V
Program Memory 16K
Program Memory Type Flash
RAM 1K
EEPROM 512 Bytes
ADC Number of ADC Channels 10-Bit 8
Comparator 1
In-circuit serial programming Yes
Oscillator up to 20 MHz
Timer (3) 16-Bit Timer (1) 8-Bit Timer (2)
Capture/Compare/PWM 1/1/6
Power Up Timer Yes
I/O Pins 23
USART Yes
SPI 2
I2C Yes
Watchdog Timer Yes
Brown out Detection (BOD) Yes
Power on Reset Yes
Data Retention 20 Years
Minimum Operating Temperature -40 ºC
Maximum Operating Temperature 85 ºC

2. ATmega168 Pinout and Description

In this section, we will cover the pinout and pin description of each pin of the controller so you can anticipate the main functions associated with the pins. The following figure shows the pinout of ATmega168.
  • ATmega168 comes in three packages named as PDIP, MLF, and TQFP where first is used for the development of individual projects while the other two are added to the industrial and electronic devices.
Pin Description
Following table shows the pin description of each pin that will help you foresee the major functions associated with each pin of the controller.
Pin# Pin Name Pin Description
1 PC6 RESET PCINT14 Digital I/O Pin RESET will be generated by keeping this pin LOW for longer than the minimum pulse length Interrupt
2 PD0 RXD PCINT16 Digital I/O Pin Serial Receive Pin (USART) Interrupt
3 PD1 TXD PCINT17 Digital I/O Pin Serial Transmit Pin (USART) Interrupt
4 PD2 INT0 PCINT18 Digital I/O Pin External Interrupt Interrupt
5 PD3 INT1 OC2B PCINT19 Digital I/O Pin External Interrupt Dedicated Pin for Timer (PWM Channel) Interrupt
6 PD4 T0 XCK PCINT20 Digital I/O Pin T0 ( Timer0 External Counter Input) XCK ( USART External Clock I/O) Interrupt
7 VCC Voltage Supply
8 GND Ground Pin
9 PB6 OSC1 XTAL1 PCINT6 Digital I/O Pin Oscillator Input Pin Interrupt
10 PB7 OSC2 XTAL2 PCINT7 Digital I/O Pin Oscillator Output Pin Interrupt  
11 PD5 T1 OC0B PCINT21 Digital I/O Pin T1 ( Timer0 External Counter Input) Dedicated Pin for Timer (PWM Channel) Interrupt  
12 PD6 AIN0 OC0A PCINT22 Digital I/O Pin Analog Comparator Positive Dedicated Pin for Timer (PWM Channel) Interrupt    
13 PD7 AIN1 PCINT23 Digital I/O Pin Analog Comparator Negative Interrupt
14 PB0 ICP1 CLKO PCINT0 Digital I/O Pin In Circuit Serial Programming Clock Interrupt
15 PB1 OC1A PCINT1 Digital I/O Pin Dedicated Pin for Timer (PWM Channel) Interrupt
16 PB2 SS OC1B PCINT2 Digital I/O Pin SPI Slave Select Input. When the controller acts as a slave, this pin is LOW Dedicated Pin for Timer (PWM Channel) Interrupt
17 PB3 MOSI OC2A PCINT3 Digital I/O Pin MOSI (Master Output Slave Input) for SPI Communication. The data is received by this pin when the controller acts as a slave Dedicated Pin for Timer Interrupt
18 PB4 MISO PCINT4 Digital I/O Pin MISO (Master Input Slave Output) for SPI communication. When the controller acts as a slave, the data is sent by a controller to master through this pin Interrupt
19 PB5 SCK PCINT5 Digital I/O Pin SCK (SPI Bus Serial Clock). This clock is shared between the controller and other devices for data transfer Interrupt
20 AVCC Voltage Supply Pin for ADC
21 AREF Voltage Reference
22 GND Ground Pin
23 PC0 ADC0 PCINT8 Digital I/O Pin Analog Channel 0 Interrupt
24 PC1 ADC1 PCINT9 Digital I/O Pin Analog Channel 1 Interrupt
25 PC2 ADC2 PCINT10 Digital I/O Pin Analog Channel 2 Interrupt
26 PC3 ADC3 PCINT11 Digital I/O Pin Analog Channel 3 Interrupt
27 PC4 ADC4 SDA PCINT12 Digital I/O Pin Analog Channel 4 Serial Data (I2C) Interrupt
28 PC5 ADC5 SCL PCINT13 Digital I/O Pin Analog Channel 5 Serial Clock (I2C) Interrupt

3. ATmega168 Main Functions

ATmega168 comes with an ability to execute and perform a number of functions. Following are the major functions related to this tiny module.
Timer
Atmega168 comes with three timers where two are 8-bit and one a 16-bit timer.  These timers can be used as a timer as well as a counter. The timer mode is used to create the dealy in any running function that increments the instruction cycle and mainly controls the internal functions of the controller. While the counter mode counts the number of intervals in any function and is mainly used for external functions where it can increment the rising and falling edge of the pin.
  • Oscillator Start-up Timers
  • Power Up Timer
Oscillator start-up timer resets the controller until the crystal oscillator becomes stable. Similarly, power-up timer is added that generates a minor delay once you power on the device, that provides an appropriate time to stabilize the power where it can generate power signals in a continuous manner.
Brown Out Detect (BOD)
The BOD, also known as BOR (Brown Out Reset), is a very valuable function that resets the module once the Vcc (voltage supply) goes below a brownout threshold voltage. In this mode, multiple voltage ranges are used and generated to protect the module once the power drops at the voltage supply line, setting you free from manually resetting the device. The Power Up Timer must be enabled, that creates the delay in bringing back the device from a BOD function.
Number of Sleep Modes
Six Sleep Modes are added to the device that help in saving power. These modes include:
  • Idle
  • ADC Noise Reduction
  • Power-save
  • Power-down
  • Standby
  • Extended Standby
SPI Communication
ATmega168 incorporates a serial peripheral interface (SPI) that nails down a communication between the microcontroller and other peripheral devices such as SD cards, shift registers, and sensors. It comes with separate clock and data lines with the addition of a select line to select the given device for communication. Two pins called used for SPI communication are as follow MOSI (Master Output Slave Input) MISO (Master Input Slave Output) The data is received by MOSI pin when the controller acts as a slave. And MISO is responsible for sending data by the controller when later acts as a slave.
Interrupt
The interrupt is used for a call of emergency which puts the main function on hold and executes the required instructions essential at that time. Once the interrupt is called and executed the running instruction brings the controller back to the main program.
I2C Communication
I2C protocol is a two-wire protocol used to connect low-speed devices like ADC and DAC converters, and microcontrollers. It comes with two wires called Serial Clock (SCL) Serial Data (SDA)  The former behaves like a clock signal that is produced by the master device and synchronizes the data transfer between the devices. And the later is used to carry the desired data.
Watchdog Timer
ATmega168 comes with a built-in watchdog timer that brings the controller back in reset position if the program hangs up during compilation or gets stuck in the infinite loop. The watchdog timer acts like a countdown timer in the running function.

4. ATmega168 Memory Interface

This AVR controller encompasses the Harvard Architecture that provides separate memory locations for both Data and Program memory. The memory is based on Atmel’s high-density technology where Program Memory, also known as Flash memory, can be reprogrammed through SPI serial interface using two ways i.e. Non-volatile memory programmer or On-chip boot code. The CPU is very useful to access memories and perform calculations on the basis of the number of instructions fed into the controller.
Program Memory (ROM)
Program memory performs the instructions in every clock cycle at regular intervals. It is also known as ROM or non-volatile memory that stores the information permanently and works perfectly in the absence of power supply.
  • The controller program memory executes the required instruction followed by the next instruction. Every program memory address is able to access a 16- or 32-bit instruction.
Program memory comes with a memory space around 16K - lot more than some other controllers available in the AVR community.
  • Program Flash is mainly categorized into two sections i.e. Application Program section and the Boot Program section. Lock bits are reserved for read/write protection. The Boot Program Section houses Application Flash Memory that is responsible for SPM instruction writing.
Data Memory (RAM)
The data memory contains 1K (1024 bytes) memory space. It categorizes the memory locations three ways where first 32 locations access the file register, next 64 locations are allocated for standard I/O memory and remaining are employed for internal data SRAM. The data memory is categorized into five addressing modes known as
  • Direct,
  • Indirect
  • Indirect with Displacement
  • Indirect with Pre-decrement
  • Indirect with Post-increment
The memory space in the controller shows the linear and regular memory map. The address registers X, Y, and Z can increment and decrement with regular intervals when indirect addressing modes are coupled with both pre-decrement and post-increment. It is important to note that, the I/O Memory can be accessed in two ways i.e. using data Space locations covering Register File, 0x20 - 0x5F or in a direct manner.

5. ATmega168 Compilers

Compilers are used for writing and compiling the code in the AVR microcontroller. Following are some compilers you can use for this AVR module.
  • The IAR is the best compiler for AVR. It is expensive and incorporates highly professional interface. If you are a beginner, it is advised to use this compiler as per your technical needs and requirements.
  • CodeVision is cheap and easy to use that incorporates CodeWizard.
  • The GCC Port is another compiler for AVR. It is available FREE for both Linux and Windows operating systems. It comes with little bit complex interface that may put you in trouble right off the bat.
  • ImageCraft is a valuable option but it lacks some GUI features where editor and project management are quite formidable and can create trouble for the code execution.

6. ATmega168 Interfacing with Arduino

ATmega168 can be interfaced with Arduino to drive automation in the relevant project. Both modules work perfectly in embedded systems where they can perform a number of useful functions. The following figure shows the pinout how Arduino pins are connected with ATmega168.
  • If you aim to work on this Arduino board then you must try these Arduino Projects for Beginners, they will help to get familiar with the Arduino Board.

7. ATmega168 Block Diagram

If you intend to closely look into the device and how major functions and components are connected and performed inside the device, a block diagram will help you out. The following figure shows the block diagram of ATmega168.
  • AVCC is a voltage supply for analog to digital converter that is necessary to power up the ADC module. Power on reset and brown out detect house in the same package that is also connected with the watchdog timer.

8. ATmega168 Projects and Applications

  • It is widely used in students projects
  • Used in embedded and robotics system
  • Industrial Automation
  • Home Security System
  • For the designing of quadcopters
That's all for today. I hope you have found this article useful. If you are feeling skeptical or have any question, you can approach me in the comment section below. I'd love to help you in any way I can according to the best of my expertise. Feel free to keep us updated with your valuable suggestion, they help us provide you quality work as per your needs and demands. Thanks for reading the article.

Introduction to ATtiny85

Hey Guys! Hope you are doing well. I am back to give you a daily dose of valuable information. Today, I'll discuss the details on the Introduction to ATtiny85. It is an 8-bit AVR microcontroller, introduced by Microchip, and is based on RISC CPU. It comes with 8-pin interface (PDIP) and falls under the category of low power controllers. Programmable watchdog timer and 10-bit ADC converter are added in the device that makes it suitable for sensor interfacing and resetting the device in case it gets stuck in an infinite loop. Microchip never fails to satisfy the requirements of any individual by providing flawless microcontroller modules that are directly or remotely connected with automation and embedded systems. With the invention of these tiny onboard modules, development of electronic projects has become easy and hassle-free more than ever before. In this tutorial, I'll cover each and everything related to ATtiny85, its pinout, pin description, main features, block diagram, and applications. Let get down to the nitty-gritty of this module and nail down everything you need to know.

Introduction to ATtiny85

  • ATtiny85 is an 8-bit AVR microcontroller that comes with 8-pin interface and mainly used in automation and Arduino projects.
  • The CPU is based on RISC architecture and is mainly called low power controller that stands fit for the real-time applications that can operate on minimum power.
  • The program memory is 8KB while both EEPROM and RAM contain a memory space of around 512 bytes. These memory spaces are very useful for storing the number of instruction in the form of code.
  • This module comes with only one port called Port B that is a bi-directional port and contains 6 I/O pins with internal pull-up resistors. The output buffers on PORTB are designed with symmetrical drive characteristics that come with both high sink and source capability. It is important to note that, Port B pins are externally pulled low and tri-stated that will source current if the pull-up resistors are activated.
  • External and internal interrupts are available on the board, while 32 general purpose registers are included in the device that are mainly called data holding spaces.
  • Two 8-bit timers are added in the device where one timer comes with compare modes and can be used both ways i.e. timer as well as a counter while other is high-speed timer/counter.
  • This module comes with software select power saving modes that are very helpful for the applications that operate with minimum power.
  • Like other controllers introduced by the Microchip, this module comes with 10-bit ADC converter that houses 4 analog channels that help in sensor interfacing and converting analog signals to digital ones.
  • This tiny chip is available in four packages called PDIP, SOIC, TSSOP, and QFN where first three come with 8-pin interface while the last one contains 20 pins.
  • Digital communications like I2C and SPI can be easily employed using this module that helps in developing a communication with external devices.

1. ATtiny85 Features

You have got a brief overview of this module. Now we cover the main features that will help you anticipate the major characteristic associated with the module. The following figure shows the complete features of ATtiny85.
ATtiny85 Features
No. of Pins 8
CPU RISC 8-Bit AVR
Operating Voltage 1.8 to 5.5 V
Program Memory 8K
Program Memory Type Flash
RAM 512 Bytes
EEPROM 512 Bytes
ADC Number of ADC Channels 10-Bit 4
Comparator 1
Packages PDIP (8-Pin) SOIC (8-Pin) TSSOP (8-Pin) QFN/MLF (20-Pin)
Oscillator up to 20 MHz
Timer (2) 8-Bit Timers
Enhanced Power on Reset Yes
Power Up Timer Yes
I/O Pins 6
Manufacturer Microchip
SPI Yes
I2C Yes
Watchdog Timer Yes
Brown out detect (BOD) Yes
Reset Yes
USI (Universal Serial Interface) Yes
Minimum Operating Temperature -40 C
Maximum Operating Temperature 125 C
  • You must check these features before making a final decision to install and use this module for your relevant project.

2. ATtin85 Pinout and Description

Until now, you have got a hold of basic information and complete features of ATtiny85. In this section, we will discuss the pinout and pin description of the module.
Pinout
Following figure shows the pinout of ATtiny85.
  • The bottom pad available on the board must be soldered to the ground.
  • The DNC marked on the pinout stands for don't connect.
Pin Description
Following table shows the pin description that will help you understand the major functions associated with each pin.
Pin# Pin Name Pin Description
1 PB5 PCINT5 RESET ADC0 dW I/O Bidirectional pin Interrupt Reset Analog Channel 0 Define Word
2 PB3 PCINT3 XTAL1 CLKI OC1B ADC3 I/O Bidirectional pin Interrupt Crystal Oscillator Pin 1 Clock Analog Channel 3
3 PB4 PCINT4 XTAL2 CLKO OC1B ADC2   I/O Bidirectional pin Interrupt Crystal Oscillator Pin 2 Clock Analog Channel 2  
5 PB0 MOSI DI SDA AIN0 OC0A OC1A AREF PCINT0 I/O Bidirectional pin SPI Serial Data (I2C) Analog Input Compare Register Voltage Reference Interrupt  
6 PB1 MISO DO AIN1 OC0B OC1A PCINT1 I/O Bidirectional pin SPI Serial Data (I2C) Analog Input Compare Register Interrupt
7 PB2 SCK USCK SCL ADC1 T0 PCINT2 I/O Bidirectional pin Serial Clock Line (I2C) Analog Channel 1 Timer 0 Interrupt
4 GND Ground Pin
8 Vcc Voltage Supply Pin

3. ATtiny85 Main Functions

ATtiny85 can perform a number of functions on a single chip. Some pins come with an ability to employ more than one functions. Following are the main functions of this module.
Timers
There are two timers included on the chip that help in generating a delay in the running process of certain function when they work in a timer mode. In the counter mode, these timers are used to count the number of the interval on a specific function inside in the controller. The timer mode increments the instruction cycle while the counter mode is used to increment the rising and falling edge of the pin.
SPI Communication
ATtiny85 comes with a serial peripheral interface (SPI) that is mainly used for communication between the microcontroller and other peripheral devices such as SD cards, sensors, and shift registers. It incorporates separate clock and data lines with the addition of a select line to pick the required device for communication. This communication allows both connected device to lay out the same path of communication under one communication protocol.
I2C Communication
I2C protocol is added in the device that is mainly two-wire protocol used to connect low-speed devices like ADC and DAC converters, I/O interfaces and microcontrollers. The two wires, known as Serial Clock (SCL) and Serial Data (SDA), are the main part of this communication protocol. The SCL line behaves like a clock signal that is generated by the master device and synchronizes the data transfer between the devices. While the SDA line is used to carry the required data.
Brown Out Reset (BOD)
The BOD is a very useful function that helps in resetting the controller once the Vdd (voltage supply) drops below a brownout threshold voltage. The multiple voltage ranges are provided to secure the module once the power drops at the voltage supply line.
 Interrupt
The interrupt plays a vital role in an emergency which puts the main function on hold and executes the required instructions that are necessary at that time. Once the interrupt is executed the running code puts the controller back to the main program.
ADC Converter
ADC module is a valuable addition in the device that makes it compatible with the sensors. It is a 10-bit module that contains 4 channels which are little less than the number of channels available on the modules introduced by Microchip that, more or less, come with 7 or 12 channels.

4. ATtiny85 Memory Interface

The memory of this little toy is designed and based on Atmel's high-density technology that is basically non-volatile in nature. The Program Memory can be reprogrammed through SPI serial interface using two ways i.e. On-chip boot code or non-volatile memory programmer. The main program execution is mainly done inside CPU that plays a vital role to access memories and perform calculations on the basis of the number of instructions incorporated into the controller. This module falls under the category of AVR controllers that are based on Harvard architecture and come with separate locations reserved for both program and data memory.
Program Memory (ROM)
Program memory, that is basically reprogrammable flash memory, works in a simple manner where next instruction stands in the queue once first is called and executed. This helps in executing the instructions with regular intervals in every clock cycle. The Flash memory comes with 8k memory space and contains memory endurance around 10,000 write/erase cycle (means you can erase and write the instructions 10,000 times on this board). The program counter available on the flash memory is 12bits wide that can address 4096 program memory locations.
Data Memory (RAM)
The data memory comes with 512bytes memory space and reserves the memory locations three ways i.e. first 32 locations access the file register, next 64 locations are reserved for standard I/O memory and remaining are used for internal data SRAM. The data memory is categorized into five addressing modes named as
  • Direct,
  • Indirect
  • Indirect with Displacement
  • Indirect with Pre-decrement
  • Indirect with Post-increment
In the Register File, the registers ranging from R26 to R31 refer to the pointer registers with indirect addressing. While the direct addressing covers the entire data space. Similarly, the Indirect with Displacement mode covers 63 address locations using base address accessed by the Y- or Z register. The address registers X, Y, and Z increment and decrement with regular intervals when indirect addressing modes are layered with both post-increment and pre-decrement.
EEPROM Data Memory
This memory comes with 512 bytes of memory space which is designed and laid out as a separate data space where single bytes can be accessed. It comes with a memory endurance around 100,000 write/erase cycles which is ten times more than program memory.

5. ATtiny85 Compilers

There are many compilers available for compiling the code in the AVR microcontroller. Some are better than others. Before you pick some compiler for your controller, make sure it is easy to use and stand fit for your needs and requirements.
  • If you are in the learning phase, then IAR is the best compiler for AVR. It is highly professional, though expensive, what it lacks in economical price, it covers up by providing both flawless quality and ease of use where it can support most, if not all, of the MCU families.
Another compiler for AVR is the GCC Port for AVR that is available FREE for both Windows and Linux. It can compile the instructions with a decent pace, however, if you are a newbie and getting your hands on very first time with the controller, it might be hard to learn.
  • ImageCraft is good option to start with that has made a decent place in the market but lack of GUI features make this compiler difficult to handle where editor and project management are quite daunting and can put you in a total stall in the start.
CodeVision is another easiest compiler that comes with CodeWizard and helps in starting a new project sooner than later. Also, it is highly economical.

6. ATtiny85 Block Diagram

Block diagram is very helpful to visualize the main function available inside the controllers and how each feature and component are connected with each other. Following figure shows the block diagram of ATtiny85.
  • The AVR core is used to combine 32 general purpose register with the rich instruction set.
  • Also, these 32 registers are directly connected with the ALU (Arithmetic Logic Unit) which helps in accessing the two independent registers using single instruction.

7. Interfacing ATtiny85 with Arduino

Tiny things can work wonders if used a proper way. Both ATtiny85 and Arduino, when connected, can easily drive automation in your project and help in executing the number of instructions. You can connect ATtiny85 with the Arduino following way.
  • Arduino Pin 10 ...................... ATtiny85 Pin 1
  • Arduino Pin 11 ...................... ATtiny85 Pin 5
  • Arduino Pin 12 ...................... ATtiny85 Pin 6
  • Arduino Pin 13 ...................... ATtiny85 Pin 7
  • Arduino +5V...................... ATtiny85 Pin 8
  • Arduino Ground ...................... ATtiny85 Pin 4

8. Applications

  • It is mainly used in real time applications related to industrial automation.
  • Embedded Systems Projects make use of this module to drive automation.
  • It can be employed and incorporated in robotics.
  • Aeronautical technology houses a wide range of AVR controllers covering Quad-copter and space Aeroplanes.
  • Power monitoring and management systems use this module.
That's all for today. I hope you have found this piece of nugget useful and valuable as per your technical needs and demands. If you are unsure or have any question, you can ask me in the comment section below. I'd love to help you according to the best of my knowledge and skills. Feel free to keep us updated with your valuable feedback and suggestions, so we keep providing quality work and you keep coming back for what we have to offer. Thanks for reading the article.

Introduction to PIC12F683

Hey Fellas! Hope you are doing well. Today, I'll uncover the details on the Introduction to PIC12F683. It is an 8-bit PIC microcontroller that contains eight pins and is mainly used for real-time applications related to automation and embedded system. If you are a newbie or an expert, you need PIC controllers every now and then for the development of electronic projects. These controllers help you drive automation in your projects with the ability to perform a number of functions on a single chip. In this tutorial, I'll discuss each and everything related to PIC12F683 so you don't have to grapple your mind surfing the whole internet and find all information in one place. Let's dive in and break down everything you need to know.

Introduction to PIC12F683

  • PIC12F683 is an 8-bit PIC microcontroller that comes with 8-pin interface. It falls under the category of CMOS controllers and comes with nanoWatt technology.
  • The architecture is based on Flash but controller lacks some functions like USART, SPI, and I2C module, however, features like In-Circuit Serial Programming, Watchdog timer, and Oscillator start-up timer make this device an ideal choice for some real-time applications.
  • Memory space is less than other 40-pin controllers in the PIC community but is enough to configure automatic functions in the electronic projects.
  • Program memory comes with 3.5KB memory space, and RAM and EEPROM memories are 128bytes and 256 bytes respectively.
  • Though this module lacks some major functions, we can't wipe off its value in terms of converting analog signals to digitals ones. This device comes with 10-bit ADC converter that is a remarkable addition in a tiny device like this and is very helpful for sensor interfacing.
  • Power-up timer, Master Clear Reset, and Sleep Mode are some useful features that work both ways i.e. taking the device out of the infinite loop by restarting it and saving power where power management is a major concern.
  • With that being said, if your project requires more functions to be carried out on a single chip with more pins and memory interface, it is preferred to use PIC18F4520.

PIC12F683 Features

Features of any device are very important to get the main idea about the device before installing it in the relevant project. Following table shows the complete features of PIC12F683.
PIC12F683 Features
No. of Pins 8
CPU RISC 8-Bit PIC
Operating Voltage 2 to 5.5 V
Program Memory 3.5K
Program Memory Type Flash
RAM 128 Bytes
EEPROM 256 Bytes
ADC Number of ADC Channels 10-Bit 4
Comparator 1
In-circuit serial programming Yes
Oscillator up to 20 MHz
Timer (3) 16-Bit Timer (1) 8-Bit Timer (2)
Oscillator Start-up Timer Yes
Power Up Timer Yes
I/O Pins 6
Manufacturer Microchip
SPI No
I2C No
Watchdog Timer Yes
Brown out Reset (BOR) Yes
Master Clear Reset Yes
Interrupt-on-Pin Change Yes
Minimum Operating Temperature -40 C
Maximum Operating Temperature 125 C
 

PIC12F683 Pinout and Description

You have got a complete overview of the features of this module. In this section, we cover pinout and pin description of the chip.
Pinout
The following figure shows the pinout of PIC12F683.
  • This PIC module comes in three packages named PDIP, DFN and DFN-S and all three packages contain 8-pin on each module.
Pin Description
Following table shows the pin description of each pin that highlights the major functions associated with each pin.
Pin# Pin Name Pin Description
7 GP0 AN0 CIN+ ICSPDAT I/O Bidirectional pin Analog pin channel 0 Comparator In-Circuit Serial Programming
6 GP1 AN1 CIN- VREF ICSPCLK I/O Bidirectional pin Analog pin channel 1 Comparator External Voltage Reference In-Circuit Serial Programming Clock
5 GP2 AN2 T0CKI INT COUT I/O Bidirectional pin Analog pin channel 2 Timer Interrupt Comparator
4 GP3 MCLR VPP I/O Bidirectional pin Master Clear Reset Programming Voltage Input
3 GP4 AN3 T1G OSC2 CLKOUT I/O Bidirectional pin Analog pin channel 3 Timer Oscillator Output Comparator
2 GP5 T1CKI OSC1 CLKIN I/O Bidirectional pin Timer Oscillator Input RC oscillator connection
1 VDD Voltage Supply Pin
8 VSS Ground Pin

3. PIC12F683 Main Functions

As I already mentioned, this PIC module is not like some other fancy modules in the market, but some common functions make this device suitable for electronic projects. Let's discuss some major functions of this device.
Timers
There are three timers incorporated in the device where two are 8-bit and one is 16-bit timer. All these timers work both ways i.e. timer as well as the counter. Timer mode is used to create a delay in the execution of relevant functions and increments the instruction cycle. While the counter mode is used to count the number of intervals in the specific functions and increments the rising and falling edge of the pin. There are some other timers that are separated from mentioned timers and work in the same way to create a delay in the running function of the controller. These timers include
  • Oscillator Start-up Timer
  • Power-up Timer
The former is used to create the delay in the oscillator mode until the crystal oscillator becomes stable, while later is used to create the delay of 72ms once the device is powered on. This will give enough time and stabilize the power supply to provide power signals at regular intervals.
Watchdog Timer
The watchdog timer is a remarkable addition in the device that resets the device and puts it in a stable condition if running program hangs up or gets stuck in an infinite loop. When you are playing with the electronic device, it is very difficult to handle and reset the device manually, this is where watchdog timer comes handy and prevents the device from any malfunctioning.
Sleep Mode
Power saving sleep mode is very helpful for saving power that generates a low current power down mode. The sleep mode can be removed using an interrupt, external reset or watchdog timer.
In-Circuit Serial Programming
In-Circuit Serial Programming is another valuable feature added to the device that gives the option to program the controller after its installation in the relevant project, setting you free from separately testing the compiled program every time.
ADC Converter
What this module lacks in terms of USART, SPI, and I2C communications, it covers up for incorporating remarkable ADC converter into the device which makes it an ideal choice for sensor interfacing and for the applications that require analog to digital conversion. The ADC module is 10-bit and comes with 4-analog channels which are quite less than channels available in other controllers that normally contain 7 or 12 analog channels.
Master Clear Reset (MCLR)
The MCLR pin calls the external reset for the chip that is triggered by keeping this pin LOW. The noise filter is incorporated in the MCLR running process that detects and removes the small pulses. The MCLRE configuration bit is normally used to disable MCLR input.

4. PIC Compiler and Burner

  • Both, PIC compiler and burner are different things. Former is used to write the required program for the controller while later is used to transfer and burn the written program to the controller.
  • MPLAB C18 Compiler is a standard compiler for PIC controllers that is introduced by Microchip. This compiler is readily available on the Microchip site.
  • Third-party software can also be used for compiling the program and you must check this list of Top 3 PIC C Compilers where you can pick any compiler based on your technical requirements, however, MikroC Pro For PIC is a major replacement for standard PIC compiler.
  • It is important to note that the code we write on the compiler generates the hex which is then moved to the controller for carrying out required operation.
  • PICKit3 is a standard burner used for PIC controllers. There are other burners available in the market but PICKit3 is mostly used and preferred over other burners in terms of performance and efficiency.

PIC12F683 Memory Layout and Working

Memory, as the word defines, is used to store a number of instructions in the form of code. Memory is mainly divided into two major types Program Memory  Data Memory The former is used to store the instructions permanently and, more often than not, is known as ROM or Non-Volatile memory. This memory is not dependent on the power supply and comes with an ability to store the information in the absence of power supply.
  • Program memory comes with a memory space around 3.5K and contains 13-bit program counter that can address 8k x 14 memory space where reset vector lies at 0000h and interrupt vector stays at 0004h.
EEPROM also falls under Program memory and comes with 256 bytes of memory space and is similar to ROM in one way or the other where it stores information permanently but comes with one exception i.e. the EEPROM instructions can be controlled and modified during the controller operation. The data memory is known as RAM or volatile memory and stores information temporarily i.e. it depends on the power supply and all stored information is gone with the removal of a power supply.
  • Registers are the data holding places in the controller and can hold storage address, instruction and any kind of data ranging bit sequence or individual characters.
The data memory, implemented as static RAM, is divided into two banks which further contain two types of registers called General Purpose Registers Special Function Registers General purpose registers store any modified or random value in the processor, and are accessed by File Select Register. While Special function registers mainly control the peripheral functions and cover first 32 locations of each bank.
  • General Purpose Registers reserve 20h-7Fh in Bank 0 and A0h-BFh in Bank 1 and are implemented as static RAM while remaining RAM remains unimplemented and returns zero when read.
W Register. The W register falls under GPRs and is accessible by a program. It is important to note that, this register doesn’t take part in any register bank where required values must be written on it and moved to the target register before defining them for available pins.

6. PIC12F683 Block Diagram

Until now, you have got a clear idea about main features, pinout, pin description, and compiler used for this PIC module. In this section, we will discuss the block diagram of this tiny chip. Following figure shows the block diagram of PIC12F683. There is no PORT marked on this module, instead, pins are labeled as GP0 to GP5 where VDD and VSS are voltage supply and ground pins respectively. This PIC version falls under the category of Microchip's Low Pin Count Patent.

7. PIC12F683 Projects and Applications

  • Used in Industrial automation
  • Embedded and control systems
  • Sensor interfacing and motor control
  • Widely used in student projects for driving automation

8. Why Choose PIC Microcontrollers

PIC modules take the whole automation industry by storm with the ability to perform a number of functions on a single tiny chip. These modules stay ahead of other processors in terms of efficiency and the pace with which they can perform and execute a number of instructions. Everything is added in the small onboard chip including timers, counters, in-circuit serial programming, ADC converter and the main features required to embed automation in the electronic projects. You name it, they have it. If you intend to develop any project, the economic price is a major concern. These chips are highly economical and are readily available in the market. Compact and concise circuitry added on the boards make these devices lightweight which cover less space and prevent you from spending loads of money for buying external components. That’s all for today. I hope I have given you everything you needed to know about PIC12F683. If you are unsure or have any question, you can approach me in the comment section below. I’ll try my best to help you according to the best of my expertise. Keep us updated with your valuable feedback and suggestions, as they help us provide quality content as per your needs and demands. Thanks for reading the article.

Introduction to PIC12F675

Hey Guys! Hope you are doing well. I am back with one more piece of nugget with valuable information. Today, I'll unlock the details on the Introduction to PIC12F675.  It is an 8-bit CMOS PIC microcontroller, developed by Microchip and is based on FLASH. It comes with an 8-pin interface which is quite less than regular PIC controllers used in electronic projects that mostly come in a 20-pin or 40-pin interface and encompass more memory space with the ability to perform a number of functions on a single tiny chip.

In this post, I'll cover each and everything related to this controller including its main features, pinout, pin description, block diagram, and applications. Let's jump right in and nail down everything you need to know.

Introduction to PIC12F675

  • PIC12F675 is an 8-pin and 8-bit PIC microcontroller, developed by Microchip with the intention of developing automation and embedded projects.
  • Though it comes with a high-performance RISC CPU with interrupt capability, it is not like some other fancy controllers in the PIC community as it lacks a USART module and memory space is quite less as compared to other controllers.
  • SPI and I2C communications are not available on the board, but some features like watchdog timer, power-on reset, power on sleep mode and brownout detect (BOD) make this device an ideal choice for some electronic applications.
  • Program memory is 1.7KB, enough to store a number of instructions for driving automation, while RAM and EEPROM are 64 and 128 bytes respectively.
  • Additionally, the ADC module is added to the device which converts analog signals to digital ones and is mainly used for sensor interfacing and comes with only 4 operating channels.
  • Two timers are available onboard where one is an 8-bit timer while the other is a 16-bit timer.
  • Only one comparator is incorporated in the module that is mainly used to compare between the two signals where comparator output is externally accessible.
  • The 8-bit interface makes it fall under the category of Microchip's Low Pin Count Patent.
  • Other valuable functions include ICSP (in-circuit serial programming), programmable code protection, interrupt-on-pin change, power-up timer, Master clear reset and wide industrial and extended temperature range.

PIC12F675 Features

  • There are many valuable features added to the device that make it unique in terms of ease of use and innovation.
  • The following table shows the full features of PIC12F675:
PIC12F675 Features
No. of Pins 8
CPU RISC 8-Bit PIC
Operating Voltage 2 to 5.5 V
Program Memory 1.7K
Program Memory Type Flash
RAM 64 Bytes
EEPROM 128 Bytes
ADC Number of ADC Channels 10-Bit 4
Comparator 1
In-circuit serial programming Yes
Oscillator up to 20 MHz
Timer (2) 16-Bit Timer (1) 8-Bit Timer (1)
Oscillator Start-up Timer Yes
Power Up Timer Yes
I/O Pins 6
Manufacturer Microchip
SPI No
I2C No
Watchdog Timer Yes
Brown out detect (BOD) Yes
Master Clear Reset Yes
Interrupt-on-pin Change Yes
Minimum Operating Temperature -40 C
Maximum Operating Temperature 125 C

PIC12F675 Pinout and Description

You have got a hold of the main features of PIC12F675. In this section, we cover the pinout and description of each pin.

PIC12F675 Pinout

  • The following figure shows the pinout of PIC12F675:
  • The VDD and VSS are voltage supply and ground pins respectively. Pin 4 is a master clear reset pin used to reset the controller.
  • While pin 2 & 3 are connected to a crystal oscillator that creates clock pulses in the controller.

Pin Description

  • The following table shows the table of pin description of each pin of PIC12F675, so you can get a hold of the main functions associated with each pin.
Pin# Pin Name Pin Description
7 GP0 AN0 CIN+ ICSPDAT I/O Bidirectional pin Analog pin channel 0 Comparator In-Circuit Serial Programming
6 GP1 AN1 CIN- VREF ICSPCLK I/O Bidirectional pin Analog pin channel 1 Comparator External Voltage Reference In-Circuit Serial Programming Clock
5 GP2 AN2 T0CKI INT COUT I/O Bidirectional pin Analog pin channel 2 Timer Interrupt Comparator
4 GP3 MCLR VPP I/O Bidirectional pin Master Clear Reset Programming Voltage Input
3 GP4 AN3 T1G OSC2 CLKOUT I/O Bidirectional pin Analog pin channel 3 Timer Oscillator Output Comparator
2 GP5 T1CKI OSC1 CLKIN I/O Bidirectional pin Timer Oscillator Input RC oscillator connection
1 VDD Voltage Supply Pin
8 VSS Ground Pin

PIC12F675 Functions

  • This PIC model can perform many functions, if not all, similar to other controllers in the PIC community.
  • Following are the main functions of PIC12F675.

Timer

  • PIC12F675 comes with two timers where one is 16-bit and the other is an 8-bit timer.
  • Both can be used as a timer as well as a counter.
  • The timer mode is used to create the delay in any running function that increments the instruction cycle while the counter mode counts the number of intervals in any function and is used to increment the rising and falling edge of the pin.
    • Oscillator Start-up Timers
    • Power Up Timer

The oscillator start-up timer is a very valuable feature that keeps the module in the reset mode until the crystal oscillator becomes stable. Similarly, a power-up timer is added that generates a delay of 72ms when you power on the device, which gives a proper time to the power supply to stabilize and provide power signals in a continuous manner.

Brown Out Detect (BOD)

  • The BOD, also known as BOR (Brown Out Reset), is a very useful function that resets the module once the Vdd (voltage supply) drops below a brownout threshold voltage.
  • Sometimes it is very difficult to manually reset the controller if there comes a malfunctioning in the controller, this is where BOD comes into play.
  • In this mode, multiple voltage ranges are provided to protect the module once the power drops at the voltage supply line.

It is important to note, the Power Up Timer should be enabled, in order to generate the delay in returning the device from a BOD function. BOD comes with four operating modes that can be programmed by setting or clearing BOREN bits.

  • BOD always on
  • BOD is controlled by software
  • BOD is off when in Sleep mode
  • BOD is always off

In-Circuit Serial Programming

Some devices can only be programmed before their installation in the project. This PIC model is an exception that comes with In-circuit serial programming (ICSP), also known as In-system programming (ISP), that helps in programming the module after its installation in the particular project. If you program the module before installation, you need to check and test the program every time its installation in the project.

In-Circuit Serial Programming gives you the flexibility to check the compiled program in the project so you can easily make the required changes and makes it compatible with the running application. 

Master Clear Reset (MCLR)

  • The MCLR, which is pin 4 in this module, calls the external reset for the chip.
  • The reset is configured by keeping this pin LOW that is not dependent on the internal resets.
  • The noise filters are present in the MCLR executing process and are very useful to remove and detect small pulses.

Watchdog Timer

  • PIC12F675 comes with a built-in watchdog timer that takes the controller in a reset position if the program hangs up during compilation or gets stuck in the infinite loop.
  • The watchdog timer is nothing but a countdown timer.

PIC Compiler

  • Microchip has created its own standard compiler that is mainly used for the PIC controller called MPLAB C18 Compiler. This compiler is available on the microchip site.
  • These Top 3 PIC C Compilers give the flexibility to choose from and pick any compiler as per your requirements, however, MikroC Pro For PIC is a third-party software mainly used as a replacement of Microchip standard compiler.
  • The code we write in the compiler generates a hex file which is then uploaded to the microcontroller to execute the number of instructions.
  • Burner and Compiler are two different things where Burner is used to burning the required program in the controller and compiler is used to write the program for the controller. The PICKit3 is a standard burner used for the PIC controller.
  • There are other burners available in the market but PICKit3 is mostly used and stays ahead of other burners in terms of efficiency and performance.

PIC12F675 Memory Layout

A memory of the controller is very helpful to store the number of instructions in the form of code. The memory is mainly divided into two types

  • 1. Program Memory 
  • 2. Data Memory

Program Memory

  • The program memory is also known as the ROM of the controller that stores the information permanently and contains memory space around 1.7K.
  • This memory doesn't depend on the power supply source and comes with the ability to retain information in the absence of a power supply.
  • It contains a 13-bit program counter that can address 8k x 14 program space where the interrupt vector lies at 0004h while the reset vector stays at 000h and is loaded by the controller.
  • The first memory space 1k x 14 rangings (0000h – 03FFh) is physically implemented.

Data Memory

  • The data memory, also known as RAM, stores the information temporarily and more often than not is called volatile memory.
  • It is widely dependent on the power supply and can not store information in the absence of the power supply.
  • The data memory is categorized into two banks that further contain two types of registers called:
  1. Special Function Registers
  2. General Purpose Registers

The first 32 locations of each bank are allocated for special function registers that can handle and control the peripheral functions and are classified as “Core and Peripheral”. While general-purpose registers are implemented as static RAM and lie at 20h-5Fh and are mapped across both banks.

PIC12F675 Block Diagram

  • Block diagram gives you an overview of different functions and components of the device i.e. how they are used and connected with each other.
  • The following figure shows the block diagram of PIC12F675.
  • PIC12F675 is an 8-bit controller that comes in PDIP, SOIC and MLF-S packages, however, PDIP is mainly preferred and used for the development of individual projects.
  • The addition of a 10-bit ADC converter makes this device compatible with a number of sensors.

Why Use PIC Microcontroller

Availability of special functions on a single chip is what sets apart PIC controller from other processors. Some real-time applications related to embedded and control systems can only be performed using PIC controllers as they come with high efficiency and decent speed to execute a number of instructions.

These controllers are cheap and remove the need for external components as they can perform a number of operations on a single chip. Power saving modes are added to the device that makes them an ideal choice for applications where power limitation is a major concern.

Maximum code protection is incorporated into the device that saves the device from influencing the code with external parameters, giving full code protection without a minor change in the compiled code.

The watchdog timer is a remarkable feature added in most of the devices that save the module from going into the infinite loop that may hang up the device and puts the device in a total stall.

Needless to say, PIC controllers play a vital role in driving automation in real-time applications using minimum circuitry that covers less space and turns out to be lightweight.

PIC12F675 Projects and Applications

  • Mainly used in student projects
  • Automation and Embedded Systems
  • Motor Controlling and Interfacing with Sensors
  • Security Systems
  • Industrial Automation
  • Medical Equipment

That's all for today. I have tried my best to give you everything related to PIC12F65. However, if you are feeling skeptical or have any questions, you can ask me in the comment section below, I'd love to help you according to the best of my expertise. You are most welcome to keep us updated with your feedback and suggestions so we always come with the relevant content as per your needs and demands. Thanks for reading the article.

Introduction to PIC16F690

Hi Guys! Hope you are doing well. We are here to keep you updated with valuable information related to engineering and technology. Today, I will unlock the details on the Introduction to PIC16F690. It is a 20-pin Flash-based PIC microcontroller that comes with high-performance RISC CPU and mainly used in automation and embedded systems. If high processing speed and memory space is anything to go by, this PIC module has already made a renowned place in the market where it can handle electronic projects pretty well. If you are a newbie or an expert, you can start working on the PIC module with little or no prior knowledge. In this post, I'll cover everything related to PIC16F690, its pinout, pin description, main features, block diagram, memory layout, and applications. Let's dive in and explore everything you need to know.

Introduction to PIC16F690

  • PIC16F690 is an 8-bit PIC microcontroller, developed by Microchip, that comes with 20-pin interface.
  • High-performance RISC CPU is incorporated on the board that helps in executing the instructions with a decent pace.
  • Crystal oscillator up to 20 MHz can be interfaced with the board that creates the clock pulses.
  • Operating voltage is identical to other controllers in the PIC community and ranges from 2 to 5.5 V. Program memory and RAM memory is 7K and 256 bytes respectively. EEPROM also comes with memory space around 256 bytes.
  • Other features that make this device compatible with a wide number of external components include I2C, SPI, and USART communications.
  • ADC module is very useful to convert analog values to digital ones and play a vital role for sensor interfacing.
  • PIC16F690 comes with two different packages called PDIP and QFP where both contain 20-pins onboard.

PIC16F690 Pinout and Description

You have got a brief overview of this controller. In this section, we uncover the pinout and pin details, so you get a clear idea about the function of each pin.
Pinout
Following figure shows the pinout of PIC16F690.
  • Both PIC packages are very helpful for project development where PDIP is mainly used for individual projects and QFN is incorporated in the industrial electronic devices.
Pin Description
Following figure shows the complete pin description of each pin that will highlight the main functions each pin capable of doing.
Pin# Pin Name Pin Description
19 RA0 AN0/ULPWU C1IN+ IOC ICSPDAT Digital I/O Pin Analog Channel 0 Comparator Interrupt Basic
RA1 AN1/VREF+ C12IN0- IOC ICSPCLK Digital I/O Pin Analog Channel 1 Comparator Interrupt Basic
RA2 AN2 C1OUT T0CKI IOC Digital I/O Pin Analog Channel 2 Comparator Timer Interrupt
4 RA3 IOC MCLR VPP Digital I/O Pin Interrupt Master Clear Reset Programming Voltage Input
3 RA4 AN3 T1G IOC OSC2/CLKOUT Digital I/O Pin Analog Channel 3 Timer Interrupt Oscillator Output
2 RA5 T1CKI IOC OSC1/CLKIN Digital I/O Pin Timer Interrupt Oscillator Input
13 RB4 AN10 SDI/SDA IOC Digital I/O Pin Analog Channel 10 SSP Interrupt
12 RB5 AN11 RX/DT IOC Digital I/O Pin Analog Channel 11 Serial Receive Pin Interrupt
11 RB6 SCL/SCK IOC Digital I/O Pin SSP Interrupt
10 RB7 TX/CK IOC Digital I/O Pin Serial Transmit Pin Interrupt
16 RC0 AN4 C2IN+ Digital I/O Pin Analog Channel 4 Comparator
15 RC1 AN5 C12IN1- Digital I/O Pin Analog Channel 5 Comparator
14 RC2 AN6 C12IN2- P1D Digital I/O Pin Analog Channel 6 Comparator ECCP
7 RC3 AN7 C12IN3- P1C Digital I/O Pin Analog Channel 7 Comparator ECCP
6 RC4 C2OUT P1B Digital I/O Pin Comparator ECCP
5 RC5 CCP1 P1A Digital I/O Pin ECCP
8 RC6 AN8 Digital I/O Pin Analog Channel 8
9   RC7 AN9 Digital I/O Pin Analog Channel 9
1 VDD Voltage Supply Pin
20 VSS Ground Pin

2. PIC16F690 Features

In this section, we discuss the main features of PIC16F690 so you get a hold of this chip before you make a final decision to install it in the relevant project. Following table shows the complete features of PIC16F690.
PIC16F690 Features
No. of Pins 20
CPU 8-Bit PIC
Operating Voltage 2 to 5.5 V
No. of I/O Pins 18
Program Memory 7K
RAM 256 Bytes
EEPROM 256 Bytes
10-Bit ADC 12 Channels
Oscillator up to 20 MHz
Timer (3) 8-Bit Timer (2) 16-Bit Timer (1)
USART Protocol 1
I2C Protocol Yes
SPI Protocol  Yes
Comparators 2
Watchdog Timer Yes
Power-on Reset Yes
Brown Out Reset Yes
Master Clear Reset Yes
Power up Timer Yes
Selectable Oscillator Option Yes
Maximum Current Drawn Each Pin 25mA
Data Retention Capability 40 Years
Power Saving Sleep Mode Yes

3. PIC16F690 Functions

This PIC comes with an ability to perform a number of valuable functions like other controllers in the PIC community. Following are the main functions of PIC16F690.
Timer
Timers are very useful for creating a delay in the running function. PIC16F690 comes with three timers where two are 8-bit and one is 16-bit timer that can be configured both ways i.e. timer and counter. The former is used to create delay and increments the instruction cycle while later is used to count the number of intervals in specific running function and increments the rising and falling edge of the pin.
USART Module
PIC16F690 contains USART module that consists of two pins called TX and RX where former is a transmission pin used for transmitting serial data to other devices and later is a receive pin used for receiving serial data.
In-Circuit Serial Programming
In-Circuit Serial Programming is another valuable feature incorporated into the device that gives the flexibility to program the controller after its installation in the relevant project.
Watchdog Timer
PIC16F690 comes with built-in timer called watchdog timer that can be configured with programming. It is mainly used to reset the controller when the running program gets stuck in an infinite loop. This timer prevents the device from any malfunctioning and provides a preventive measure by resetting the device before it goes to any invalid software glitch. More often than not, watchdog timer acts like a countdown timer that starts from 1000 and gradually goes down to zero.
Sleep Mode
Power saving sleep mode is another valuable function added in the chip that generates a low current power down mode. The sleep mode can be abandoned using an interrupt, watchdog timer or external reset.

4. PIC Compilers

  • MPLAB C18 Compiler is a standard compiler, introduced by Microchip, that is mainly used for PIC controllers. You can download this compiler online from the Microchip Official Site.
  • Third-party software can also be used for compiling the program and MikroC Pro For PIC is available for this purpose.
  • You must check this list of Top 3 PIC C Compilers where you can pick any compiler based on your technical requirements.
  • The code we write in the compiler generates a hex file that is transferred to the PIC Microcontroller.
  • You need a burner to transfer the compiled program to the controller. PICKit3 is widely used for this purpose. There are other unofficial burners used for burning the code, however, PICKit3 is mostly preferred and used for PIC controllers.

5. PIC16F690 Memory Organization

Memory plays a vital role to store the number of instruction on the controller. It is mainly divided into three types called Program Memory EEPROM Memory RAM Memory Program memory comes with 13-bit program counter that can address 8k x 14 memory space where reset vector stays at 0000h and interrupt vector stays at 0004h. It has a total memory space around 7k and is known as ROM or non-volatile memory that stores the program permanently and doesn't depend on the voltage source.
  • EEPROM also stores information permanently but comes with one exception i.e. i.e. the instructions in EEPROM can be controlled and modified during the controller operation.
RAM memory stores the information temporarily and is known as a volatile memory or data memory that is mainly dependent on the power supply as it removes the stored information as the power supply is removed.
  • Registers play a vital role in the controller that are the data holding places and can hold storage address, instruction and any kind of data containing bit sequence or individual characters.
The data memory, implemented as static RAM, is divided into four banks and contain two types of registers called General Purpose Registers Special Function Registers General purpose registers store any modified or random value in the processor, and are organized as 8 x 256 in RAM and accessed by File Select Register. While Special function registers mainly control the peripheral functions and occupy the first 32 locations of each bank. W Register. This register belongs to GPRs and is accessible by a program. It doesn't take part in any register bank where desired values must be written on it and moved to the target register before defining them for available ports. STATUS. This register helps in switching between the banks.

6. PIC16F690 Block Diagram

Block diagram is very helpful to have a deeper look at how different pins and components operate and attach to each other. The following figure shows the block diagram of PIC16F690. This PIC module comes with three ports A, B and C and each one contains 6, 4 and 8 pins respectively.

7. PIC16F690 Projects and Applications

  • Students project for interfacing sensor and motor controlling
  • Central heating projects
  • For serial communication
  • Production of temperature data logger
  • Main part of the embedded system
  • Used in industrial automation
  • Used in security systems
  • Gas sensor projects
  • Starter Kits

8. Why Select PIC Microcontrollers

PIC controllers play a vital role in the development of many electronic projects that are directly or remotely related to automation. These controllers house a number of peripheral functions that prevent you from spending extra money to buy and connect external components for driving relevant operation. PIC controllers and burners are readily available and you can get support from Microchip site that not only helps you pick a right microcontroller but also helps in the development of your desired project. PIC controllers are highly economical, cover less space and turn out to be very lightweight that make your project a true manifestation of innovative ideas. That's all for today. I hope I have given you everything you needed to know about PIC16F690. If you are unsure or have any question, you can ask me in the comment section below. I'll try my best to resolve your queries. Keep us updated with your valuable feedback so we keep providing quality content as per your needs and demands. Thanks for reading the article.

Introduction to PIC16F676

Hi Friends! Hope you are doing well. Today, I'll cover the details on the Introduction to PIC16F676. It is an 8-bit CMOS PIC microcontroller, based on Flash and developed by Microchip. It comes in 14-pin interface with high-performance RISC CPU that makes it an ideal choice for most of the electronic applications that are widely related to embedded systems or industrial automation. This tiny chip incorporates everything you need to develop individual student projects. Memory space and a number of pins are little less as compared to other controllers in the PIC community, however, flash-based technology makes this device compatible with external devices. In this post, we'll discuss each and everything related to PIC16F676, its pinout and description, main features, block diagram, memory layout and applications. Let's dive right in and explore everything you need to know.

Introduction to PIC16F676

  • PIC16F676 is an 8-bit PIC microcontroller that comes with a 14-pin layout design. It is based on flash where high-performance CPU adds up the processing speed.
  • It comes in three packages called PDIP, SOIC, and TSSOP. All three versions are available in 14-pin configuration.
  • PIC16F676 contains program memory with memory space around 1.7 KB, while RAM and EEPROM memories are 64 bytes and 128 bytes respectively.
  • One ADC module is added in the device that is 10-bit and comes with 8 analog channels. This module plays a vital role for sensor interfacing and converting analog values to digital ones.
 
  • Power on Reset, Comparator, in-circuit serial programming, and master clear reset are some other features incorporated in the device that help it stay ahead of the other onboard chips and remove the need of buying external components for carrying out different operations.

1. PIC16F676 Pinout and Description

You have got a brief overview of this controller. In this section, we will cover both pinout and pin description of each pin. Let's start.
Pinout
The following figure shows the pinout of PIC16F676
Pin Description
Pin description will help you understand the main function associated with each pin. Following table shows the complete description of each pin.
Pin# Pin Name Pin Description
13 RA0 AN0 CIN+ ICSPDAT Digital I/O Pin Analog Channel 0 Comparator Input Programming Data
12 RA1 AN1 CIN- VREF ICSPCLK Digital I/O Pin Analog Channel 1 Comparator Input Voltage Reference Programmin Clock  
11 RA2 AN2 COUT T0CKI INT Digital I/O Pin Analog Channel 2 Comparator Output Clock Input for Timer0 Interrupt
4 RA3 MCLR VPP Digital I/O Pin Master Clear Reset Programming Voltage Input
3 RA4 T1G AN3 OSC2 CLKOUT   Digital I/O Pin Gate Timer1 Analog Channel 3 Crystal Oscillator Output. In RC mode, this pin has a 1/4 frequency of OSC1  
2 RA5 T1CKI OSC1 CLKIN Digital I/O Pin Clock Timer1 Crystal Oscillator Input External Clock Input
10 RC0 AN4 Digital I/O Pin Analog Channel 4
9 RC1 AN5 Digital I/O Pin Analog Channel 5
8 RC2 AN6 Digital I/O Pin Analog Channel 6
7 RC3 AN7 Digital I/O Pin Analog Channel 7
6 RC4 Digital I/O Pin
5 RC5 Digital I/O Pin
14 VSS Ground Pin
1 VDD Voltage Supply Pin

2. PIC16F676 Features

You have got a hold of pinout and description of each pin till now. In this section, we highlight and discuss the features of this controller that make it unique from its counterparts. The following figure shows the complete features of PIC16F676.
PIC16F676 Features
No. of Pins 14
CPU 8-Bit PIC
Operating Voltage 2 to 5.5 V
Program Memory 1.7 K
Program Memory Type Flash
RAM 64 Bytes
EEPROM 128 Bytes
ADC Number of ADC Channels 10-Bit 8
I/O Ports (2) I/O Pins A, C 12
Power Saving Mode Yes
External Oscillator up to 20 MHz
Timer (2) 16-Bit Timer (1) 8-Bit Timer (1)
Manufacturer Microchip
Comparators 1
Individual Programmable Weak Pull-ups Yes
EEPROM Data Retention 40 Years
Watchdog Timer Yes
Power on Reset Yes
Master Clear Reset Yes
In-Circuit Serial Programming Yes
Minimum Operating Temperature -40 C
Maximum Operating Temperature 125 C
  These features will help you pick the desired controller and assist you in making a final decision based on your project requirement.

3. PIC16F676 Functions

There are a number of functions associated with this PIC module. Following are the main functions of PIC16F676.
Master Clear Reset (MCLR)
The MCLR is an external reset for the chip that is executed by keeping this pin LOW. This pin is not dependent on the internal resets which also house the noise filter to detect and remove the small pulses in the path.
Timer
PIC16F676 comes with two timers where one is an 8-bit timer and other is 16-bit timers. They can be employed both ways i.e. as a timer as well as a counter. Both timers come with a clock select capability. The timer mode is used to create a delay in any function while a counter is used to count the number of the internals of any function.
In-Circuit Serial Programming
In-circuit serial programming (ICSP), also called In-system programming (ISP), is added in the device that helps in programming the device after installation in a certain project. 
Watchdog Timer
The watchdog timer is a very useful function that resets the controller if the running program gets stuck in an infinite loop or software shows an invalid status. It is very difficult to reboot the entire system in case there comes glitch, these timers save you a bunch of time and bring the system back to its initial position without human interference.

4. PIC Compiler

  • A compiler is a software used where we write a program to execute desired functions on the microcontroller. Microchip comes with its own standard compiler called MPLAB C18 Compiler. You can get this compiler online from the Official Microchip Site.
  • These Top 3 PIC C Compilers give you many options to choose from based on your requirements, however, MikroC Pro For PIC is mainly used for this purpose.
  • The code we write in the compiler creates a hex file which is then moved to the microcontroller to call and execute the desired instructions.
  • Burners are used to burn and incorporate the certain program on the controller. There are many unofficial burners available in the market but PICKit3 stay ahead in terms of ease of use and quality performance.

5. PIC16F676 Memory Layout

The memory of this controller is mainly divided into two types called Program Memory Organization (ROM) Data Memory Organization (RAM) The program memory stores the program permanently and is also known as ROM or non-volatile memory. It comes with 13-bit program counter that can address 8k x 14 program memory space. The first memory space 1k x 14 covering (0000h - 03FFh) can be physically implemented. The address stored in the reset vector is loaded by the controller and stays at 000h while the interrupt vector stays at 0004h. The RAM memory, also known as Data or volatile memory, stores the program temporarily and depends on the source of power supply. It removes the stored program as the power supply turns off. The data memory is mainly divided into two banks that further house two types of registers called Special Function Registers General Purpose Registers The first 32 locations of each bank are reserved for special function registers which are mainly used for handling and controlling the peripheral functions and are classified as "Core and Peripheral". While general purpose registers stay at 20h-5Fh,  mapped across both banks and are implemented as static RAM. STATUS Register. This register is mainly used to switch between the banks and it contains
  • Reset status
  • Arithmetic status of the ALU
  • Bank select bits for data memory (SRAM)
W Register. The W register doesn't relate to any register bank and is addressed by the program only. It is a GPR while STATUS register falls under the category of SFR. TRISA. This register configures PORTA as an input or output. The value 0 indicates it as an input and value 0 shows output. TRISC. This register is similar to TRISA and configures the pins as an input or output for PORTC.

6. PIC16F676 Block Diagram

Block diagram is very helpful to uncover the main functions associated with each component on the controller and how these functions are related to each other. The following figure shows the block diagram of PIC16F676.
  • This PIC module comes with two ports called PORTA and PORTC and each port contains 6 pins. It lacks some features like USART and comes with less memory space.

7. PIC16F676 Projects and Applications

PIC microcontrollers are widely used in many electronic systems for driving automation. Following are the main application of this controller version.
  • Prototyping custom circuits
  • GPS and security systems
  • Central heating projects
  • Student projects for sensor interfacing and motor controlling
  • Used in home and industrial automation
  • Embedded system

8. Why Use PIC MicroControllers

  • PIC controllers are very helpful for carrying out automation in many electronic devices and provide easy to configure and user-friendly interface.
  • A number of functions can be done on a single chip without buying external components, that make your project highly economical, and lightweight that covers less space.
  • Some chips have a builtin ADC module that makes them an ideal choice for the projects requiring digital output as a final result.
  • All the burners and PIC compilers are easily available that help you ease the learning process.
That's all for today. I hope you have found this article useful. If you have any question, you can approach me in the comment section below, I'd to help you in any way I can. Keep us updated with your valuable feedback and suggestion that help us provide you quality content as per your needs and requirements. Thanks for reading the article.

Introduction to PIC16F88

Hi, Hope you are doing well. I am back to give you a daily dose of useful information. Today, I'll uncover the details on the Introduction to PIC16F88. It is an 8-bit PIC microcontroller, introduced by Microchip, mainly used in automation and embedded applications. It comes with an enhanced flash processor and nanoWatt technology, helping it to consume minimum power with the ability to perform a number of functions on a single tiny chip. An ADC 10-bit module is added in the device that makes it compatible with other devices and accepts analog signal and converts it to a digital one. This microcontroller module houses little less memory space as compared to other controllers in the PIC community and comes with an 18-pin layout (PDIP). Though other modules with more number of pins are also available, PDIP is mostly used for developing individual student projects. In this tutorial, I'll cover each and everything related to PIC16F88, its pinout, features, block diagram, and applications. Let's jump right in and nail down everything you need to know.

Introduction to PIC16F88

  • PIC16F88 is an 8-bit PIC microcontroller that comes with the enhanced flash processor and nanoWatt technology. It is available in three different packages named PDIP, SSOP, and QFN. First one comes with an 18-pin layout  (mostly used) while other two comes in 20 and 28 pin packages respectively.
  • The program memory size is 7KB that is used to store the number of instruction on a single chip. While the RAM is 368 bytes and EEPROM comes with memory space around 256 bytes.
  • The 10-bit ADC is incorporated on the board that is mainly used to convert the analog signal into a digital one. It plays a vital role to interface sensors, where it gets their signal values in the analog form and convert them to digital ones.
  • The crystal oscillator up to maximum value of 20MHz can be interfaced with the chip that is mainly used to generate the clock pulses for the synchronization of the internal operations.
  • In terms of carrying out and driving functions that are directly or remotely related to automation, we can not brush off the importance of this module.

1. PIC16F88 Pinout and Description

The pinout of any module is very useful to implicate the layout of the module while pin description gives you an overview of what each pin is capable of doing. Let's discuss pinout and pin description one by one.
Pinout
The following figure shows the pinout of PIC16F88.
  • The PDIP module comes with 18-pin interface while other two SSOP and QFN consist of 20 and 28 pins respectively.
  • The former is used for developing individual projects while the other two are used and added in industrial electronic devices.
Pin Description
Following table shows the pin description of each pin and the main function associated with each pin.
Pin# Pin Name Pin Description
17 RA0 AN0 I/O Bidirectional pin Analog pin channel 0
18 RA1 AN1 I/O Bidirectional pin Analog pin channel 1
1 RA2 AN2 CVREF VREF- I/O Bidirectional pin Analog pin channel 2 Comparator Output (VREF) A/D reference voltage input (Low)
2 RA3 AN3 VREF+ C1OUT I/O Bidirectional pin Analog pin channel 3 A/D reference voltage input (High) Comparator 1 Output
3 RA4 AN4 T0CKI C2OUT   I/O Bidirectional pin Analog pin channel 4 Used for clock input to the timer0 Comparator 2 Output
4 RA5 MCLR VPP I/O Bidirectional pin This is a master clear low reset pin Programming voltage input
15 RA6 OSC2 CLKOUT I/O Bidirectional pin This pin is connected to a crystal oscillator and acts as a crystal oscillator output pin. In RC mode, this pin has a 1/4 frequency of OSC1
16 RA7 OSC1 CLKIIN I/O Bidirectional pin This pin is connected to a crystal oscillator and acts as a crystal oscillator input pin External Clock Source Input
6 RB0 INT CCP1 I/O Bidirectional pin External interrupt pin Output for PWM and Compare and Input for Capture
7 RB1 SDI SDA All PORTB Pins are software programmed I/O Bidirectional pin SPI data in I2C data
8 RB2 SDO RX DT I/O Bidirectional pin SPI data out Receiver Pin Synchronous detect
9 RB3 PGM CCP1 I/O Bidirectional pin Programming enable pin for Low-Voltage ICSP™ PWM Output for Compare and PWM, while Input Capture
10 RB4 SCK SCL I/O Bidirectional (Interrupt-on-change) pin SPI Synchronous serial clock input/output I2C Synchronous serial clock Input
11 RB5 SS TX CK I/O Bidirectional (Interrupt-on-change) pin SPI Slave select Serial transmit pin Synchronous clock
12 RB6 AN5 PGC T1OSO T1CKI I/O Bidirectional (Interrupt-on-change) pin Analog pin channel 5 In-Circuit Debugger and programming clock pin. Oscillator output for Timer1 External clock input for Timer1
13 RB7 AN6 PGD T1OSI I/O Bidirectional (Interrupt-on-change) pin Analog pin channel 6 ICSP programming data and In-Circuit Debugger pin Oscillator input for Timer1
5 Vss Ground Pin
14 Vdd Voltage Supply Pin

2. PIC16F88 Features

Features of any device play an important role in order for you to decide and pick the most relevant PIC module for your project. These features differ for different modules available in the market. Before you start working on the project, make sure the features of the device are compatible and resonate with your project requirements and the nature of the final output. Following table shows the complete feature of PIC16F88.
PIC16F88 Features
No. of Pins 18 (PDIP)
CPU 8-Bit PIC
Operating Voltage 2 to 5.5 V
Program Memory 7K
Program Memory Type Flash
RAM 368 Bytes
EEPROM 256 Bytes
ADC Number of ADC Channels 10-Bit 7
I/O Ports (2) I/O Pins A, B 16
Packages 18-pin PDIP 20-pin SSOP 28-pin QFN
External Oscillator up to 20 MHz
Timer (3) 16-Bit Timer (1) 8-Bit Timer (2)
Manufacturer Microchip
Comparators 2
SSP Yes
PWM 1 (10-Bit)
Watchdog Timer Yes
Comparators 2
Master Clear Reset Yes
In-Circuit Serial Programming Yes
Low Voltage Programming Yes
EEPROM Data Retention 40 Years
Minimum Operating Temperature -40 C
Maximum Operating Temperature 125 C
Technology Used NanoWatt

3. PIC16F88 Functions

There are a number of functions associated with this PIC module. Following are the main functions of PIC16F88.
Timer
PIC16F88 comes with one 16-bit and two 8-bit timers that can be employed both ways i.e. as a timer as well as a counter. These timers come with internal and external clock select capability. It is important to note that, the timer mode play a role to increment the instruction cycle while the counter mode increments the falling and rising edge of the pin.
In-Circuit Serial Programming
In-circuit serial programming (ICSP), also called In-system programming (ISP), is a useful function incorporated in the controller that helps it to program in the installation device, getting it rid to program before making it compatible to the required project.
Master Clear Reset (MCLR)
The MCLR, pin 4 in PDIP, calls the external reset for the chip. The reset is executed by keeping this pin LOW. The noise filter is included in the MCLR path that allows to remove and detect the small pulses while the MCLRE configuration bit disables MCLR input. It is worth mentioning here, this MCLR pin is not dependent on the internal resets.
USART
The USART module, that stands for Universal Synchronous and Asynchronous Receiver and Transmitter, is added in the device that is mainly used for laying out the serial communication with other devices. Two pins called TX and RX take part for serial communication where former is known as transmitting component that allows transmitting serial data while later is known as receiving a pin, used to receive the serial data.
Watchdog Timer
PIC16F88 comes with a built-in watchdog timer that helps in bringing the module in reset position if the program gets stuck in the infinite loop. This timer should be reset to the initial value after every 3 instructions in order to prevent it going to zero value. The watchdog timer is mainly a countdown timer that starts from 1000 and eventually goes down to zero.

4. PIC Compiler

  •  MPLAB C18 Compiler. is a standard compiler used for compiling the code in the controller. You can get this compiler online from the Official Microchip Site.
  • These Top 3 PIC C Compilers give you many options to choose from, but MikroC Pro For PIC is mainly used for this purpose, still, it depends on your needs and requirements.
  • The code we write in the compiler will generate a hex file which is then transferred to the microcontroller to call and execute the desired instructions.
  • There are many unofficial burners available in the market but PICKit3 is mostly preferred and used for the PIC controllers.

5. PIC16F88 Memory Layout and Working

So far you got a hold of pinout, description, features, and compiler used for the controller. In this section, we cover the memory layout that plays a vital role in the execution of the code. The memory of the module stores a number of instruction which can be divided into three major types named: Program Memory (ROM) RAM Memory (Data Memory) EEPROM Memory (Data Memory) Now we discuss each memory one by one and uncover the main features associated with them.
Program Memory
The Program memory is used for storing a running program permanently. It is also known as ROM memory or Non-Volatile memory and doesn’t depend on the power supply. The ROM memory is about 7K and is designed using FLASH Technology.
Data EEPROM
The EEPROM is a part of data memory and stores running program permanently with one exception i.e. this memory is indirectly mapped out, unlike Program memory that is directly mapped out. The EEPROM contains memory space around 256 bytes and can be accessed and addressed by multiple control registers.
Data RAM
RAM memory stores the program temporarily and removes the program once the power supply turns off. It is also known as volatile memory and is classified into two main parts called General-purpose registers (GPR) Special-function registers (SFR) The RAM memory registers are known as data holding places that can hold instruction, storage address, and any kind of data containing the individual character or bit sequence. The data memory can be employed as static RAM and is partitioned into multiple banks. The SRFs registers are mainly used to handle and control the peripherals modules. Following are the main registers available in the RAM memory. STATUS Register. This register is mainly used to switch between the mentioned banks. Setting the fifth bit of this register indicates the performance of bank1 while resetting it will address bank 0. TRISA. This register is used to configure PORTA as an input or output. The value 0 describes it as an input and value 0 shows output. TRISB. This register is similar to TRISA and used for configuring the pins as an input or output for PORTB. W Register. This register is not associated with any register bank and is addressed by the program only. It is a GPR while all other registers described above are SFR. It is important to note that, the required values are written on W register and transferred to the target register before writing them down on the PORTA or PORTB.

6. PIC16F88 Block Diagram

Block diagram helps you understand the main functions of the controller and how they work, associate and connect inside the controller body. The following figure shows the block diagram of PIC16F88.
  • This PIC module comes with two ports A and B and each port contains 8 pins where higher order bits belong to the STATUS register.
  • While CCP1 is dependent on CCPMX bit available in the Configuration Word 1 register.

7. PIC16F88 Projects and Applications

  • Student projects for sensor interfacing and motor controlling
  • GPS and security systems
  • Used in home and industrial automation
  • Prototyping custom circuits
  • Serial Communication
  • Central heating projects
  • Embedded system
  • Used in starter kits

8. Why Use PIC MicroControllers

  • PIC controllers were introduced with the intention to provide easy to use a module and easy to configure interface.
  • Gone are days when you have to buy a number of external components for carrying out different operations.
  • These controllers have built-in peripherals with a number of functions associated with each pin, getting you rid of buying extra components and make the whole project cheap in cost that covers less space and appears to be lightweight.
  • No need to add extra ADC module for converting analog values to digital values, as builtin ADC module incorporated in the tiny chip works best for interfacing different sensors on the board.
  • The compiler and burner for the controllers are readily available in the market. Live support is available on the Microchip site where you will get your queries answered sooner than late.
That’s all for today. I hope I have given you everything you needed to know about PIC16F88. If you are unsure or have any question you can ask me in the comment section below. I’d love to assist you in any way I can. You are most welcome to give us your suggestions that help us provide you quality work so you keep coming back for what we have to offer. Thanks for reading the article.
Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir