Microcontroller 8951S #interface-2.

Slides:



Advertisements
Similar presentations
Khaled A. Al-Utaibi Interfacing an LED The Light Emitting Diode (LED) Applications DC Characteristics & Operation Interfacing to.
Advertisements

5.4 Decoders A decoder is a multiple-input, multiple-output logic circuit that converts coded inputs into coded outputs, where the input and output codes.
Combinational Circuits CS370 – Spring BCD to 7 Segment Display Controller Understanding the problem: input is a 4 bit bcd digit output is the control.
LED Display. LED Typical LED forward bias voltage: 1.5 to 2.0 V Typical currents needed to light LED range from 2 to 15 mA.
Input/Output (I/O) Ports and Interfacing
Input/Output Ports and Interfacing ELEC 330 Digital Systems Engineering Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
LOGIC DESIGN AND CIRCUITS SEVEN SEGMENT LED DISPLAY Res. Assist. Hale İnan 1.
ECE 2372 Modern Digital System Design
1 Boe-Bot Parts BOE-BOT Lecture #1b DE - Digital Electronics.
BCD to 7-Segment Display
Lab 6 :Digital Display Decoder: 7 Segment LED display Slide #2 Slide #3 Slide #4 Slide #5 Slide #6 Slide #7 Display Decoder Fundamentals LT Control Input.
Digital Outputs 7-Segment Display
Diode :- Clamper Positive Clamper The circuit for a positive clamper is shown in the figure. During the negative half cycle of the input signal, the diode.
Objectives How Microcontroller works
Introduction to Interfacing Projects Nareen Khan.
1 4-Integrating Peripherals in Embedded Systems (cont.)
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
Input/Output Ports and Interfacing
I/O devices Peripheral devices (also called I/O devices) are pieces of equipment that exchange data with a CPU Examples: switches, LED, CRT, printers,
The miniDragon+ Board and CodeWarrior Lecture L2.1.
Microcontrollers Module 3: Digital Display. 7 – Segment Display A seven-segment display (SSD), or seven- segment indicator, is a form of electronic display.
Magnitude Comparator Dr. Ahmed Telba.
Khaled A. Al-Utaibi  I/O Ports  I/O Space VS Memory Space  80x86 I/O Instructions − Direct I/O Instructions − Indirect I/O Instructions.
PLC ARCHITECTURE – Memory 2 by Dr. Amin Danial Asham.
UNIT 7 - INTRODUCTION TO I/O INTERFACING. TWO MAJOR TYPES OF I/O INTERFACING ISOLATED I/O - DEDICATED I/O INSTRUCTIONS ARE USED TO ACCESS I/O DEVICES.
Alpha/Numeric Keypad Functions using AVR Preliminary Design Review Luke R. Morgan ECE /17/2008.
Arduino Mega Arduino Mega 2560 Arduino Mega 2560.
ECE 447 Fall 2009 Lecture 12: TI MSP430 External LCD.
Microcontroller based Traffic signal Umer Butt Amna Rashid Izza Rabbani Rozab Naveed Ramesha Akram.
MICROCONTROLLER INTERFACING WITH STEPPER MOTOR MADE BY: Pruthvirajsinh Jadeja ( ) COLLEGE:DIET BRANCH:EC.
Tutorial 9 Module 8 – 8.1,8.2,8.3. Question 1 Distinguish between vectored and non-vectored interrupts with an example Build a hardware circuit that can.
LED AND KEYBOARD INTERFACING PREPARED BY :- PREPARED BY :- RAVAL AKASH ( ) RAVAL AKASH ( ) PATEL HARDIK ( ) PATEL HARDIK.
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
WATER LEVEL INDICATOR AND AUTOMATIC MOTOR SWITCHING SYSTEM
Sitarambhai Naranjibhai Patel Institute of Technology and Research Centre, Umrakh, Bardoli. A Presentation On “ 16x2 LCD Interfacing with AVR atmega32.
Circuit diagram for interfacing Common Anode 7-Segment Display.
Chapter 3 Combinational Logic Design II
Peripherals – Keypad The Keypad provides a simple means of numerical data or control input. The keys can be attributed whatever data or control values.
LCD Interfacing using Atmega 32
Fundamentals of Computer Engineering
LCD AND KEYBOARD INTERFACING
Microcontroller basics
LED - Infrared 850nm   Description: This is a very simple, clear infrared LED. These devices operate between nm and work well for generic IR systems.
Interfacing to peripherals - Seven Segment display (1)
Segment Identification
4-Integrating Peripherals in Embedded Systems (cont.)
Input/Output Ports and Interfacing
Semiconductor Diode.
Microcontroller basics
Cascade switching of an LED
UNIT – Microcontroller.
Display Devices 7 segment led display.
The Arduino Microcontroller: Atmel AVR Atmega 328
EET 2261 Unit 11 Controlling LCD and Keypad
ARDUINO     What is an Arduino? Features 14 Digital I/O pins 6 Analogue inputs 6 PWM pins USB serial 16MHz Clock speed 32KB Flash memory 2KB SRAM.
8051 Programming in C rhussin.
Interfacing Memory Interfacing.
EE345: Introduction to Microcontrollers Memory
STM Arm I/O Programming
8255.
Example 15 Interrupt-Driven Controller
Microcontrollers and Microprocessors
Common Diode Applications
LCD and Keyboard Sepehr Naimi
EET 2261 Unit 8 Seven-Segment Displays
8051 Micro Controller.
Multiplexing seven-segment displays
Arduino 7 Segment Display Lab
LCD AND KEYBOARD INTERFACING
2019 Investing Now Summer Program
Presentation transcript:

microcontroller 8951S #interface-2

The 8051 Peripheral function interface circuit LED and switch application seven(eight) segments LED circuit Keyboard interface circuit LCD interface circuit

LED digital tube "8" type, 7 segments (excluding decimal points) or 8 segments (including decimal points), each segment corresponds to a light emitting diode, common anode and common cathode two, as shown in below figure. The anode of the common anode digital tube is connected together and connected to the +5V; the common cathode is connected together to ground. 8-seg-anode 8-seg-cathode

LED digital tube To make the LED digital tube display different characters,It is necessary to provide one byte code for each section of the digital tube, that is, font code (also called segment code). Traditionally, the "a" section corresponds to the lowest bit of the font byte. Display character cathode font code anode font code Display character cathode font code anode font code

LED digital tube For example, the number in a memory cell is "02H", which means to display "2" on the common anode digital tube, and the "2" font code "A4H" is added to each segment of the digital tube. To keep the display character font code in a table (array), according to the character from the table to find the corresponding font code, and then each section of the font code output of the digital tube, digital tube public termination +5V at the same time, this time in the digital tube display character 2".

EXP Using the 51 mircocontroller to control a 8 segment LED digital tube, the first cycle shows a single even numbers: 0, 2, 4, 6, 8, and then show a single odd numbers: 1, 3, 5, 7, 9, so repeated cycle show.

#include "reg51. h" #include "intrins #include "reg51.h" #include "intrins.h" #define uchar unsigned char #define uint unsigned int #define out P0 uchar code seg[]={0xc0,0xa4,0x99,0x82,0x80,0xf9,0xb0,0x92,0xf8,0x90,0x01}; void delayms(uint); void main(void) { uchar i; while(1) out=seg[i]; delayms(900); i++; if(seg[i]==0x01)i=0; // if the code is 0x01,Indicated that a loop display is over }

} void delayms(uint j) { uchar i; for(;j>0;j--) i=250; while(--i); i=249;

Display mode of LED digital tube Static display dynamic display font code lines 8 bit I/O Bit selection

Static display

#include<reg51.h> void main(void) { P1 and P0 respectively to control two digital tube DS0 and DS1 , and the common pin of anode digital tube DS0 and DS1 (common anode) is directly connected to the +5V, so the digital tube DS0 and DS1 is in the conducting state. because of P0 port and P1 port have latch function, so we should respectively write the display characters "2" and "7" font code to P0 port and P1 port . #include<reg51.h> void main(void) { P0=0xa4; //write font code :"2" to P0 P1=0xf8; //write font code :"7" to P1 while(1) ; }

Dynamic display At each point, only 1 bit lines are selected. One bit is displayed, and the other bits are not valid. Every time ,only the selected bit line ,which one have +5v or connect to the ground. This digital tube will display the font code of this time (scanning).Because of the digital tube afterglow and human "persistence of vision", as long as the control of each digital display of time interval, it may cause simultaneously display effect. The time interval (scanning interval) that each digital tube turns on should be determined according to the actual situation. Light emitting diode light from conduction to a certain degree of delay, if the light emitting time is too short, too weak, the human eye can not see; time is too long, flicker, and the time is longer, more time to take scm. Dynamic display essentially exchange the increased time of program execution for I/O port reduction.

Dynamic display

#include<reg51. h> #include<intrins #include<reg51.h> #include<intrins.h> #define uchar unsigned char #define uint unsigned int uchar code dis_code[]={0xf9,0xa4,0xb0,0x99, 0x92,0x82,0xf8,0x80,0x90,0x88,0xc0}; void delay(uint t) { uchar i; while(t--) for(i=0;i<200;i++); } void main() uchar i,j=0x80; while(1) { for(i=0;i<8;i++) j=_crol_(j,1); P0=dis_code[i]; P2=j; delay(180); }