Recent Changes - Search:

Introduction to Microcontroller Programming

About PICmicro Chips

Clocking Your PICmicro Devices

E-Blocks

Flowcode Step By Step

PICmicro Projects

Labs

Microcontrollers

<^< What is a PICmicro? | Course Index | Digital versus Analogue >^>

At their heart (or is it brain?) there is a Central Processing Unit (CPU). This processes the digital signals, does calculations and logic operations, creates time delays, sets up sequences of signals etc.

How does it know what to do? It is following a program of instructions, which is stored in part of the memory, called the 'program memory', inside the PICmicro.

From time to time, the CPU needs to store data, and then later retrieve it. It uses a different area of memory, called the 'data memory' to do this.

The clock synchronises the activities of the CPU. It sends a stream of voltage pulses into the CPU that control when data is moved around the system, and when the instructions in the program are carried out. The faster the clock, the quicker the PICmicro runs through the program. Typically, the clock will run at a frequency of 20MHz (twenty million voltage pulses every second.)

To talk to the outside world, the microcontroller has 'ports'. Each port has 8 connections - often referred to as 'bits' as each connection represents a bit on an 8 input port which in turn represents a byte of data. Information from sensors is fed into the system through the input port. The microcontroller processes this data and uses it to control devices that are connected to the output port. The ports themselves are complex electronic circuits - not simply a bunch of terminals to hang components on. When we use a PICmicro microcontroller, we have to specify how we want the ports to behave. The ports are bi-directional, meaning that they can act as either input ports or output ports. When we write a program for the PICmicro, we start by configuring the ports, telling them whether they are to behave as input ports or output ports.

The input port can receive data (information) in one of two forms, as an analogue signal, or as a digital signal. It is important that we understand clearly the difference between these.

<^< What is a PICmicro? | Course index | Digital versus Analogue >^>

Print - Search - Login

Page last modified on August 19, 2011, at 10:06 AM