Tachometer. Hardware Design -= Recall Atmega Interrupts internalExternalLCD.

Slides:



Advertisements
Similar presentations
Mini-SumoBot Construction and Programming
Advertisements

Single Variable and a Lot of Variables The declaration int k; float f; reserve one single integer variable called k and one single floating point variable.
How to use Arduino By: Andrew Hoffmaster.
Robotics Club, Snt Council2 The 3 Schools of Robotics: Mechanical Design – Types of motors – Material selection –
MICRO-CONTROLLER: A microcontroller is the brain of the robot: These are: 1. Integrated Circuits (ICs) 2. Programmable.
 2005 Pearson Education, Inc. All rights reserved Introduction.
Loops (Part 1) Computer Science Erwin High School Fall 2014.
Electrical and Computer Engineering iLights Nick Wittemen, EE Chris Merola, EE José Figueroa, EE Matt Ryder, EE Comprehensive Design Review.
Software Design Project
 2002 Prentice Hall. All rights reserved. 1 Intro: Java/Python Differences JavaPython Compiled: javac MyClass.java java MyClass Interpreted: python MyProgram.py.
CS100A, Fall 1997, Lectures 221 CS100A, Fall 1997 Lecture 22, Tuesday 18 November Introduction To C Goal: Acquire a reading knowledge of basic C. Concepts:
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the structure of a C-language program. ❏ To write your first C.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 26P. 1Winter Quarter Handy Board Lecture.
 Main Components:  Sensors  Micro controller  Motor drivers  Chasis.
Timers and Interrupts Shivendu Bhushan Sonu Agarwal.
Intro to Java Programming  A computer follows the instruction precisely and exactly.  Anything has to be declared and defined before it can be used.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Outline Variables 1.
Chapter 5: Data Input and Output Department of Computer Science Foundation Year Program Umm Alqura University, Makkah Computer Programming Skills
Problem Statement Discussion Electromania
Java Programming, 3e Concepts and Techniques Chapter 3 Section 62 – Manipulating Data Using Methods – Day 1.
MCU: Interrupts and Timers Ganesh Pitchiah. What’s an MCU ?
Working with Arduino: Lesson #4: Servos EGN1007. Learning Goals Learning Goals: The student will be able to: 1.Build a complete circuit using the Arduino.
1 CS 192 Lecture 5 Winter 2003 December 10-11, 2003 Dr. Shafay Shamail.
1 Lab 1: Introduction. 2 Configure ATMEL AVR Starter Kit 500 (STK500), a prototyping/development board for Lab1. ATmega16 ( V) is the chip used.
Variables and Functions. Open your Encoder program Let’s begin by opening the “Labyrinth Auto Straight” code. Save this file as Labyrinth with variables.
With Python.  One of the most useful abilities of programming is the ability to manipulate files.  Python’s operations for file management are relatively.
Timers and Interrupts Anurag Dwivedi. Let Us Revise.
Code The Arduino Environment.
The Functions and Purposes of Translators Syntax (& Semantic) Analysis.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 26P. 1Winter Quarter Handy Board Lecture 26.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 29P. 1Winter Quarter Software Design Project Lecture 29.
Java Programming, Second Edition Chapter Two Using Data Within a Program.
1 One Dimensional Arrays Chapter 11 2 "All students to receive arrays!" reports Dr. Austin. Declaring arrays scores :
Arithmetic Expressions Addition (+) Subtraction (-) Multiplication (*) Division (/) –Integer –Real Number Mod Operator (%) Same as regular Depends on the.
Digital Control CSE 421.
7. IRQ and PIC ENGI 3655 Lab Sessions. Richard Khoury2 Textbook Readings  Interrupts ◦ Section
TIMERS AND INTERRUPTS AVI SINGH KEVIN JOSE PIYUSH AWASTHI.
Java Software Solutions Lewis and Loftus Chapter 6 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Objects for Organizing Data.
Computer Programming for Engineers
WELCOME To ESC101N: Fundamentals of Computing Instructor: Ajai Jain
 constant represented by a name, just like a variable, but whose value cannot be changed  The const keyword precedes the type, name, and initialization.
Literals A literal (sometimes called a constant) is a symbol which evaluates to itself, i.e., it is what it appears to be. Examples: 5 int literal
Hardware Needs 18F452 Main Controller CM8870 DTMF Decoder UART in PIC, MAX232 Serial Port Line Level Converter Amplifier for IR Detector Voltage feed into.
Closed Loop Temperature Control Circuit with LCD Display Mike Wooldridge ECE 4330 Embedded Systems.
1 Lecture # 2. * Introducing Programming with an Example * Identifiers, Variables, and Constants * Primitive Data Types * Byte, short, int, long, float,
GUIDED BY PROFFESOR NILESH DESAI GROUP NO:-8 CHANDRASHIKHA SINGH( ) KURUP SHUBHAM VALSALAN( ) SAURAV SHUBHAM( )
Vishwakarma government engineering college Prepare by. Hardik Jolapara( ) LCD Interfacing with ATmega16.
TV Remote As A Wireless Mouse For PC.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the structure of a C-language program. ❏ To write your first C.
Application Case Study Christmas Lights Controller
Lecture 5 array declaration and instantiation array reference
Digital Control CSE 421.
Val Manes Department of Math & Computer Science
JAVA MULTIPLE CHOICE QUESTION.
Introduction to the C Language
Lecture Note Set 1 Thursday 12-May-05
Agenda Warmup Lesson 2.5 (Ascii, Method Overloading)
Introduction to the C Language
Introduction to the C Language
1 Code
Advanced Programming Basics
CSCE 206 Lab Structured Programming in C
Local Variables, Global Variables and Variable Scope
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
INC 161 , CPE 100 Computer Programming
C ( Programming Language ) PSK Technologies By: Arti Sontakke An ISO 9001:2015 (QMS) Certified IT Company Computer Education | Software Development | Computer.
Data Types Every variable has a given data type. The most common data types are: String - Text made up of numbers, letters and characters. Integer - Whole.
CSCE 206 Lab Structured Programming in C
Presentation transcript:

Tachometer

Hardware Design -=

Recall Atmega Interrupts internalExternalLCD

TSOP operates on 38 khz Internal interrupts CTC MODE 38 Khz

LCD Circuit Diagram

4 Simple Commands Lcd_putsf(“Eclub welcomes u ”); // prints constant string Lcd_putchar(‘a’); // character to be printed Lcd_puts(c); // c is a variable string

What about integers ? Problem

Solution Convert Integer to strings Use two simple Commands Itoa(i,c) & ftoa(f,3,c)

int a = 10 ; char c[10]; itoa (i,c); lcd_puts(c);

Using Itoa int a = 10 ;char c[10];itoa (i,c);lcd_puts(c);

Result

Using ftoa float a = ; Char c[10];ftoa (i,3,c);Lcd_puts(c);

Result

Using LCD in CVCAVR

Select any Port Use the 4 magical Functions

External Interrupt Triggered externally Not at regular intervals of time Detects Rising EdgeFalling edge

Using Ext Interrupt in CVAVR

Open CVAVR Go to File NewProject

Place your code here

So Now we are able to know when the obstacle attached to the shaft comes in way Able to display on LCD

What remains ? Calculate time at which external interrupt occurs HOW ???

HINT Use one more Internal interrupt to get time

Pit Falls TSOP frequency 38 Khz and frequency of IR= 405 THz (10^12) GHz (10^9). So 38 khz is frequency is Blinking frequency

Pit Falls Internal Interrupts functions call themselves after specific intervals of time. Its not like C Programming that to use a function you need to call it in main program. But here time calls the function itself after time interval set by you. You need to mention anything inside main function to call interrupt after specific interval of time Declare variables global if declaring them inside main block results in error Pit Falls

Downloading the Software Components distribution (When and where ) Prelims (when, where & what to show )