MICROCONTROLLERS What is a microcontroller n A microcontroller

  • Slides: 16
Download presentation
MICROCONTROLLERS

MICROCONTROLLERS

What is a microcontroller? n A microcontroller is a nifty little gadget that houses

What is a microcontroller? n A microcontroller is a nifty little gadget that houses a microprocessor, ROM (Read Only Memory), RAM (Random Access Memory), I/O (Input Output functions), and various other specialized circuits all in one package.

Zilog Z-80

Zilog Z-80

What is the Z-80 family of components? n significant advancement in the state-of-the-art of

What is the Z-80 family of components? n significant advancement in the state-of-the-art of microcomputers. It can be configured with any type of standard semiconductor memory to generate computer systems with an extremely wide range of capabilities. With additional memory and I/O devices a computer can be constructed with capabilities that only a minicomputer could previously deliver. Advantages… n n fully software compatible with the popular 8080 A CPU superior in both software and hardware capabilities (less cost and more features) offers the user significant speed advantages (up to 16 MHz clock rate) including full software support

Z-80 CPU n Z 80 microprocessor is an 8 bit CPU with a 16

Z-80 CPU n Z 80 microprocessor is an 8 bit CPU with a 16 bit address bus capable of direct access of 64 k of memory space. It has a language of 252 root instructions and with the reserved 4 bytes as prefixes, accesses an additional 308 instructions. The Z 80 was modeled after the 8080 and contains the 78 - 8080 opcodes as a subset to it's language.

n Programming features include an accumulator and six eight bit registers that can be

n Programming features include an accumulator and six eight bit registers that can be paired as 316 bit registers. In addition to the general registers, a stack-pointer, program-counter, and two index (memory pointers) registers are provided. While not in the same league as the 80486 or 68000 series, the Z 80 is extremely useful for low cost control applications. One of the more useful features of the Z 80 is the built-in refresh circuitry for ease of design with DRAMs.

n It comes in a 40 pin DIP package. And recently also in a

n It comes in a 40 pin DIP package. And recently also in a 44 pin SMD and QFP. It has been manufactured in A, B, and C models, differing only in maximum clock speed. It also has been manufactured as a stand-alone microcontroller with various configurations of on-chip RAM and EPROM.

Peripheral Interface Controller (PIC)

Peripheral Interface Controller (PIC)

What is a PIC? n PIC stands for Peripheral Interface Controller, which is Microchip,

What is a PIC? n PIC stands for Peripheral Interface Controller, which is Microchip, Inc. 's trademark for their line of 8 -16 bit microcontrollers. Actually, Microchip's official name for the lineup is PICMicro.

More about PICs… n Various models are available with different peripherals built in such

More about PICs… n Various models are available with different peripherals built in such as; multiple timers, A/D conversion, serial interfacing, LCD control, etc. They are also available in SMT packaging or standard DIP packaging with as many as 68 pins or as few as 8 pins. Some of the latest versions (and many future versions) have flash memory, making for simple erasures and reuse. Most of the current versions employ EPROM which requires erasure with a special UV lamp.

n If you want to develop firmware for a PIC, you will need an

n If you want to develop firmware for a PIC, you will need an erasable version. The erasable types available are of the EPROM, EEPROM, and flash memory varieties. EEPROM and flash memory devices are great because they don't need that UV eraser and are less expensive. Unfortunately the flash and EEPROM (EEPROM is being phased out in favor of flash) versions are not available in all configurations, but it seems Microchip is expanding their horizons. One of the most popular versions of the PIC for beginners is the PIC 16 F 84. It uses flash memory (hence the F in its part number), and has 18 pins. Thirteen of these pins can be used for input or output purposes.

What can one use a PIC for? n PICs are very versatile and can

What can one use a PIC for? n PICs are very versatile and can be used in practical projects such as burglar alarms, caller ID boxes, remote controls, clocks, and just about anything you can think of that could use a single chip self contained computer.

Why choose PICs? n Because getting into them wasn't a big investment They have

Why choose PICs? n Because getting into them wasn't a big investment They have a lot of bang for the buck. There are only about 35 simple RISC -type (Reduced Instruction Set Computer) commands to learn. There is a lot of help available for beginners.

Developing the PIC… n n n First choose the PIC. Learn a language. Choose

Developing the PIC… n n n First choose the PIC. Learn a language. Choose the programmer. Wire the circuit on the target board. Write the code. Program.

Sample Program: Blinking Lights n list p=16 f 84 porta equ 0 x 05

Sample Program: Blinking Lights n list p=16 f 84 porta equ 0 x 05 portb equ 0 x 06 n org 0 x 000 n start movlw 0 x 00 tris porta movlw 0 x 00 tris portb clrf porta clrf portb n n n n hi bsf porta, 0 bcf porta, 0 goto hi n end n n