Asst. Prof. Dr. Alper SISMAN

Slides:



Advertisements
Similar presentations
FND, Keypad 사용 계산기 설계 박민호.
Advertisements

13-1 Bard, Gerstlauer, Valvano, Erez, Telang, Yerraballi EE 319K Introduction to Embedded Systems Lecture 13: 2-D Arrays, Bitmaps, Sprites, Structs, Lab.
Asst. Prof. Dr. Alper ŞİŞMAN
OPTIMIZING C CODE FOR THE ARM PROCESSOR Optimizing code takes time and reduces source code readability Usually done for functions that are critical for.
Modulo-N Counters Module M10.4 Section 7.2.
Digital Logic Design Week 7 Encoders, Decoders, Multiplexers, Demuxes.
1 DATA ABSTRACTION: USER DEFINED TYPES AND THE CLASS.
Win32 Programming Lesson 4: Classes and Structures.
kashanu.ac.ir Microprocessors 6-1 I/O Devices Switches, LED, LCD Lec note 6.
M100 Product Presentation May M100  Display terminal managed by AVL box commands  Simple protocol over Serial interface  Semi-Autonomic functions,
1 Homework Reading –Tokheim, Section 5-10, 7-4 Machine Projects –Continue on MP4 Labs –Continue labs with your assigned section.
9/23/02 Program Flow Chart User Hits Key Setup Key Product Key Product Program Direct Robot Programming Area Perimeters Hopper Position Assembly Area Position.
Retis.sssup.it The dsPic33 and FLEX board Paolo Pagano RETIS Laboratory, Scuola Superiore Sant'Anna, Pisa, Italy Corso di Sistemi in.
Variables and constants Applications of Computer Programming in Earth Sciences Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences.
Lecture – 7 Basic input and output
Asst. Prof. Dr. Alper ŞİŞMAN
Embedded Programming and Robotics Lesson 9 Keypad and LCD Display 1.
Eejit’s guide to using a LCD alphanumeric display with the CCS C compiler 1.Hardware connection 2.The LCD.C include file 3.An example.
LCD's 1. LCD Types Many types available. Most common are:  Character Pre-programmed with a set of alphanumeric characters & symbols Size range from 8×1.
Parallax 4x20 LCD (part number 27979) with Arduino Duemilanove
Build A PIC Microcontroller EET 250. End Goal Keypad PIC16F917 LCD Display Keypad RS-232 Sensor.
TextWand Programmable LED Display Carlos Vila-Virella and Andy Campanella.
Digital Outputs LCD Display
CS-280 Dr. Mark L. Hornick 1 ASCII table. 2 Displaying Numbers as Text Problem: display numerical values as text Consider the numerical value 0x5A held.
1 4-Integrating Peripherals in Embedded Systems (cont.)
Lecture 9. - Synchronous Devices require a timing signal. Clock generated Interval Timer Microprocessor Interval Timer Clk PCLK = MHz PCLK (for.
©Contrinex JDC PPT_LF_Interfaces Low frequency RS485 interfaces J.-D. Chatelain.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
Practical Electronics & Programming
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Combinational vs.
Instrumentation & Control Engg. Section Electrical Engineering Department Ahmedabad , Gujarat.
FREQUENCY COUNTER USING Silicon Labs C8051F020 microcontroller
M.T.Stanhope Oct Title : C++ Basics Bolton Institute - Faculty of Technology (Engineering) 1 C++ Basics u Data types. u Variables and Constants.
Prof Jess 2008 DIGITAL IC COUNTERS Lecture 7.
ECE 371 – Unit 9 Interrupts (continued). Example Set up Two Interrupt Request Inputs: –Port H[0] Set Interrupt Flag on “0” to “1” transition (rising edge)
Digital Inputs Interfacing Keypad
Ch Chapter 4 Basic Data Types and Variables 4.1 Basic Data Types In C TABLE 4.1 Introduction to Basic Data Types in C Type SizeDescription char 1.
Input Interface – Microprocessor
Programming Microcontrollers in C Lecture L7.1. C Data Types TypeSizeRange char1 byte-128 – 127 unsigned char1 byte0 – 255 Int2 bytes – unsigned.
ECE 320 Homework #3 1. Simplify the Boolean function F using the don’t care conditions d, in both S.O.P. and P.O.S. form: a) F=A’B’D’+A’CD+A’BC d=A’BC’D+ACD+AB’D’
8421 Binary Hexadecimal Seven segment display 8421 Binary Hexadecimal Seven segment display 0000.
Department of Electronic & Electrical Engineering LCD character display (parallel interface). How to interface a LCD character display to a PIC.
INTERNET OF EVERYTHING SDU 2016 Week 4. Simple Digital and Analog Inputs  The Arduino’s ability to sense digital and analog inputs allows it to respond.
I/O Devices Switches, LED, LCD
ECE 447: Lecture 12 Keypads ECE 447: Lecture 10. ECE 447: Matrix Keypad.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
ARM Embedded Programming Lecture 4 Accessing Memory Mapped Registers.
Arduino DC Motor Motion Control Instructor: Dr Matthew Khin Yi Kyaw.
Vishwakarma government engineering college Prepare by. Hardik Jolapara( ) LCD Interfacing with ATmega16.
A.D.Patel institute of technology Sub : LCD and Keyboard interfacing with AVR. prepared by, chokshi abhi p ( ) Guided by, Prof. Asif Thakor.
Interfacing of Input/Output devices with AVR Microcontroller Enrolment No. : Name of the student: SOMAIYA ISHA.
Discrete Systems I Lecture 09 Minterms and Decoders Profs. Koike and Yukita.
Sitarambhai Naranjibhai Patel Institute of Technology and Research Centre, Umrakh, Bardoli. A Presentation On “ 16x2 LCD Interfacing with AVR atmega32.
Using a SparkFun™ serial LCD with an Arduino
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
Microprocessor and Microcontroller Fundamentals
4-Integrating Peripherals in Embedded Systems (cont.)
UNIVERSAL COLLEGE OF ENGINEERING & TECHNOLOGY
GANDHINAGAR INSTITUTE OF TECHNOLOGY
Assembler (assembly language)
אבני היסוד של תוכנית ב- C++
אבני היסוד של תוכנית ב- C++
Software Environment ISE 5.x Interaction with simple LCDs
Topics: Programming Constructs: loops & conditionals Digital Input
Default Arguments.
Programming 2: The Arduino IDE & First Sketches
CS150 Introduction to Computer Science 1
Digital Logic Design.
Presentation transcript:

Asst. Prof. Dr. Alper SISMAN Practice Asst. Prof. Dr. Alper SISMAN

Keypad/7-Segment Display Matrix Keypad GND output keypad Serial output keypad Dipswitches 7-Segment Display Ex. Circuit (HW details resistors etc.)

7-Segment display Write all decimal numbers on the 7-segment. Design a simple counter (0-9) that counts the seconds.

Alphanumeric LCD Display

Frequently used LCD commands

LCD Init.

Use LCD in 4-bit mode #include "STM32F4xx.h" #define RS 32; #define EN 8; #define databits GPIOD->ODR void SystemInit(){ (*((int*)0xE000ED88))|=0x0F00000; // Floating Point donanimini aktiflestir. RCC->AHB1ENR |= 0x0000000F; // GPIOD->MODER = 0x00005555; GPIOD->OTYPER = 0x0000000F; //GPIOD->PUPDR = 0x00005555; GPIOD->OSPEEDR= 0xFFFFFFFF GPIOB->MODER = 0x00004440; GPIOB->OTYPER = 0x00000028; //GPIOB->PUPDR = 0x00000440; GPIOB->OSPEEDR= 0xFFFFFFFF; }

void cmd(unsigned char c) { GPIOB->BSRRH = RS; delayyus(50); GPIOD->ODR = (c >> 4); LCD_STROBE(); databits = (c); } void delayyus(int delay0) { delay0-delay0*4; while (delay0--) {} } void LCD_STROBE(void) { GPIOB->BSRRL = EN; delayyus(1); //1us bekle GPIOB->BSRRH = EN; } void clear(void) { cmd(0x01); delayyus(2000); } void data (unsigned char c) { GPIOB->BSRRL = RS; delayyus(50); //50us bekle databits = (c >> 4); LCD_STROBE(); databits = (c); LCD_STROBE();} void string1(const char *q) { while(*q) data(*q++); }}

void lcd_init() { delayy1s(60000); cmd(0x38); delayy1s(4000); delayy1s(400); cmd(0x28); cmd(0x0c); clear(); cmd(0x6); } int main (){ delayyus(50000); lcd_init(); while(1) { cmd(0x80); string1("HELLO WORLD"); cmd(0xc0); string1("IT IS WORKING"); }

Matrix Keypad

Homework Write a C code that gets the pushed button if the matrix keypad is used in previous slide. The ASCII code of the pushed button should be written on a seven-segment display. Design the HW and Firmware