Wednesday, November 11, 2009

The PIC is the small computer

The PIC, like the CPU, has calculation functions and memory, and is controlled by the software.
However, the throughput and the memory capacity are low. Depending on the kind of PIC, the maximum clock operating frequency is about 20 MHz and the memory capacity (to write the program) is about 1K to 4K words.
The clock frequency determines the speed at which a program is read and an instruction is executed. The throughput cannot be judged with the clock frequency alone. It changes with the processor architecture. However within the same architecture, the one with the highest clock frequency has the highest throughput.
I use a 14-bit WORD for program memory capacity. An instruction is a word long. Program memory is measured in BYTES, one byte is 8 bits. The bit is the smallest unit, and can have the value of 1 or 0. The instruction word of the PIC16F84A is composed of 14 bits. 1K words is equal to 1 x 1,024 x 14 = 14,336 bits. To convert this to bytes divide it by 8 x 1024, (14,336 / 8 x 1024 = 1.75K bytes).

A memory capacity of 1G bytes = 1,024M bytes, 1M bytes = 1,024K bytes, 1K bytes = 1,024 bytes. 1K bytes is not equal to 1000 bytes. This is because the calculation is in binary (2 to the tenth power = 1,024).

No comments:

Post a Comment