M. Amer Iqbal Qureshi



tải về 3.06 Mb.
Chế độ xem pdf
trang9/132
Chuyển đổi dữ liệu09.12.2022
Kích3.06 Mb.
#53945
1   ...   5   6   7   8   9   10   11   12   ...   132
Amer Iqbal - Teach Yourself PIC Microcontrollers for Absolute Beginners-Microtronics Pakistan (2001)

Power Supply 
PIC microcontrollers use TTL logic, and therefore expect a 
well regulated 5V power supply. The supply may however 
range from 3.5V to 5.5V. These microcontrollers require 
very small amount of current. Indeed these devices have 
been labeled as nano-watt technology devices. The logical 
levels are also same, a signal from 0 to about 2V is 
considered as logical ‘0’ and a signal from 3.5V to 4.5V is 
considered as logical ‘1’. In order to communicate with 
devices using higher logical voltages, consider level 
conversion. 
MCLR , Master Clear 
On every PIC microcontroller you will find a pin labeled as MCLR. This pin has two basic functions. It is 
Fig-2 Showing Pin Outs of PIC-16F877 Microcontroller 
Fig-3 wiring MCLR Pin 


Teach Yourself PIC Microcontrollers | www.electronicspk.com | 11 
used to reset the microcontroller, like soft-boot. As well as to put the microcontroller into programming 
mode. The MCLR pin when connected to ground, will reset the microcontroller, and keep it in reset state, 
till the ground connection is released. After that the microcontroller will have all its RAM reset, and 
program execution will begin, just like the system has been just powered on. A 10K pull up resistor is 
usually connected with the pin, to keep it high when reset switch is released. 
The same pin will also work as program mode pin. When a new software is to be downloaded into the 
microchip, about 12V are applied to the MCLR pin, by your programming device. This can be done right in 
your circuit, or by taking the IC out of circuit and putting it into the IC socket on your programmer. We 
shall talk more about this in section on programming. The 10K resistor is then useful to avoid 12V reaching 
VCC and therefore to other devices. 
Analog and Digital Data 
Our microprocessors use digital data to represent everything. Even music, videos and images all are 
represented as digital data, which is a series of logical ‘0’ and ‘1’. However our real world data is not 
digital. It is rather analog. It is rightly said, “We live in an analog world, but process the data in digital 
world”. Real world data like light, temperature, pressure, heat, height, distance, speed, force etc. all are 
analog data. In order to utilize these data we have to acquire them with specific sensors or transducers and 
then convert into digital format for use within microprocessor’s digital world. Many other microcontrollers 
require an external ADC chip to implement this, however this feature has been nicely built into PIC 
microcontrollers. The number of Analog channels will vary among devices and some devices will not have 
this feature on-board. Pins labeled as AN0, AN1 etc are for analog data if required, however they can also 
function as normal digital pins to work with digital data. As previously said this selection is made by 
configuring specific registers in microcontroller. 
BASIC CONCEPTS 
Did you know that all people can be classified 
into one of 10 groups- those who are familiar 
with binary number system and those who are 
not familiar with it. You don’t understand? That 
means that you still belong to the later group. If 
you want to change your status read the 
following text. Text describing briefly some of 
the basic concepts used further in this book (just 
to be sure that we discuss the same issues). 

tải về 3.06 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   5   6   7   8   9   10   11   12   ...   132




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương