INTERFACING THE ADS1210 CONVERTER WITH AN ATmega8535 MICROCONTROLLER Author: Eng. Magnelli Luca.

Slides:



Advertisements
Similar presentations
INPUT-OUTPUT ORGANIZATION
Advertisements

Dr. Rabie A. Ramadan Al-Azhar University Lecture 3
Review: Interrupts & Timers
Dr A Sahu Dept of Comp Sc & Engg. IIT Guwahati I/O + Timer 8155 I/O + Timer 8255 I/O 8255 I/O 8253/54 Timer 8253/54 Timer 2 Port (A,B), No Bidirectional.
The 8051 Microcontroller Chapter 5 SERIAL PORT OPERATION.
Digital Thermostat and Data Logger Brandon Wagner and David Southwick.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
SPI Serial Peripheral Interface. SPI Serial Peripheral Interface is communication between two devices, one bit at a time sequential one bit at time over.
Hierarchy of I/O Control Devices
Intro to AVR ATtiny2313 CS423 Dick Steflik. AVR ATtiny2313.
Signals, Circuits, and Computers Part A Winncy Du Fall Based on Dr
ECE 371- Unit 11 Introduction to Serial I/O. TWO MAJOR CLASSES OF SERIAL DATA INTERFACES ASYNCHRONOUS SERIAL I/O - USES “FRAMING BITS” (START BIT AND.
External & internal Interrupts. Interrupt Sources There are 21 different interrupts and each one has its own vector located in a predefined location at.
INPUT-OUTPUT ORGANIZATION
Serial Communication ETEC 6416.
The 8051 Microcontroller and Embedded Systems
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK–
Input/Output mechanisms
16F877A. Timer 0 The Timer0 module timer/counter has the following features: –8-bit timer/counter –Readable and writable –8-bit software programmable.
Clock Options and Sleep Modes. Clock Sources Flash Fuse bits can be programmed to choose one of the following Clock sources: 1. External RC Osc. f = 1/(3RC).
MICROPROCESSOR INPUT/OUTPUT
Lecture Set 9 MCS-51 Serial Port.
AT91 Embedded Peripherals
ELE2MIC Lecture 21 The AVR Sleep Modes ATMEGA128’s Analog to Digital Converter –Features –Block Diagram –Clock Source –Input Sources –Interrupts –BandGap.
1 Microprocessor-based Systems Course 9 Design of the input/output interfaces (continue)
Microprocessors 2 lesson Subjects lesson 7 Planning Interrupts Serial communication /USART Questions.
1 Lab 1: Introduction. 2 Configure ATMEL AVR Starter Kit 500 (STK500), a prototyping/development board for Lab1. ATmega16 ( V) is the chip used.
Robotics Research Laboratory Louisiana State University.
CS-280 Dr. Mark L. Hornick 1 Programming for the LCD Display.
MICROCONTROLLER SYSTEMS Part 1. Figure 1.1Elements of a digital controller CPU Central Processing Unit Input Peripherals Output Peripherals ROM Read Only.
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
PPI-8255.
智慧電子應用設計導論(1/3) Arduino MEGA 2560
A Mini Stereo Digital Audio Processor Design DINESH GUNDU VIGNESH SABARINATH.
CIT 673 Created by Suriyong1 Micro controller hardware architechture.
Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.
CS-280 Dr. Mark L. Hornick 1 Sequential Execution Normally, CPU sequentially executes instructions in a program Subroutine calls are synchronous to the.
Communicating. The ATmega16 communicates through one of the following ways: Serial Peripheral Interface (SPI) Universal Synchronous and Asynchronous serial.
CE-2810 Dr. Mark L. Hornick 1 Serial Communications Sending and receiving data between devices.
GROUP MEMBERS: SUMEET HOODA. RAJDEEP PATRE. DHIRAJ GAONKAR. LIVE HUMAN DETECTION USING WIRELESS REMOTE CONTROLLED ROBOT.
NAM S.B MDLAB. Electronic Engineering, Kangwon National University 1.
BIRLA VISHVAKARMA MAHAVIDYALAY SUBJECT: SPI PROTOCOL & MAX7221 DISPLAY INTERFACING SUBMITTED BY: KISHAN AVASTHI( ) MANSI CHANDEGARA( )
ADC 1 Analog to Digital Converter. ADC 2 ADC Features n General Features -Supports 8 or 10-bit resolution Modes, -Track period fully programmable up to.
1 Lab 4: D/A Converter Lab 4: D/A Converter This is a simple resistive network for a D/A converter Port 1, Port 0 are digital inputs ==> 00 (minimum),
WEATHER MONITORING SYSTEM. User Requirements  Design a weather monitoring system that detects the following parameters  Temperature  Pressure  Relative.
1. PIC ADC  PIC18F877 has 8 analog input channels i.e. port A pins(RA0 to RA5) and port E pins(RE1 and RE2). These pins are used as Analog input pins.
USING TV REMOTE AS A CORDLESS MOUSE FOR THE COMPUTER
CORDLESS MOUSE FEATURES BY TV REMOTE USING PIC MICROCONTROLLER
Application Case Study Christmas Lights Controller
Embedded Systems Programming
Serial mode of data transfer
Analog Comparator An analog comparator is available on pins PE2(AIN0), PE3(AIN1) The comparator operates like any other comparator. -when (+) exceeds (-)
EE 107 Fall 2017 Lecture 5 Serial Buses – UART & SPI
BITS EDU. CAMPUS , VARNAMA
SERIAL PORT PROGRAMMING
Hardware Source: ttp:// under
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
Atmega32 Serial Programming Basics
The Arduino Microcontroller: Atmel AVR Atmega 328
Introduction to the Atmel AVR Butterfly
Serial Communication Interface: Using 8251
Serial Communication Interface
AVR – ATmega103(ATMEL) Architecture & Summary
8051 Micro Controller.
Compiled by Dr. N.Shanmugasundaram, HOD, ECE Dept, SECE.
Serial Communication 19th Han Seung Uk.
Introduction to Arduino
PIC Serial Port Interfacing
PIC Serial Port Interfacing
Presentation transcript:

INTERFACING THE ADS1210 CONVERTER WITH AN ATmega8535 MICROCONTROLLER Author: Eng. Magnelli Luca

Index Project Objectives ADS1210: 24-bit ADC  -  Hardware Connections – Three Wire AVR Assembler Program Flowchart Main Body Interrupt Data_Ready Results RESET sequence – timing Serial interface – timing Conclusions

Project Objectives Serial sinchronous interface between ADS1210 and ATmega8535 Based on ADC serial interface timing Useful for sending commands and data receiving Commmands transmission to ADC from keyboard PC – ATmega8535 interface: USART Send the converted data to the screen in Volts

ADS1210: 24-bit ADC  -  Effective Resolution: e 20- On chip self-calibration Internal/External Reference (V REF ) Programmable Gain Amplifier (PGA) Turbo Mode (TMR, aumenta f SAMP ) Digital filter programmabile Decimation Ratio (DR) può variare tra 19 e 8191 High Resolution Measurement application, strumentazione, pressure and temperature transducers, industrial process control

ADS1210: 24-bit ADC  -  Internal MicroController Registers: INSR, CMR, DOR, Calibration Serial Interface (Master/Slave MODE)

Hardware Connections – Three Wire Digital Supply: V TG (5V) e GND – STK500 Analog Supply: A REF (5V) e GND – ATmega8535 X IN =3.6864MHz – STK500 ADS1210 in Slave MODE Serial Interface ATmega8535 – ADS1210 SDIO PB5, SCLK PD2 (INT0) Serial Interface ATmega8535 – PC PD0 (RXD) RXD (RS232 SPARE – STK500) PD1 (TXD) TXD (RS232 SPARE – STK500)

Hardware Connections – Three Wire

Set Up Write CMR3:0 on ADS1210 Enable Data_Ready Interrupt on falling edge of DRDY Has been received a character in UDR via USART? N Receive new configuration via USART and send it to ADS1210 Y Main body

Interrupt Data_Ready Read DOR2:0 from ADS1210 Load counters 10 0 _10 -1 _10 -2 _10 -3 _10 -4 _10 -5 _10 -6 with values converted in Volts Transmit the value converted in Volts to PC via USART Exit from interrupt DRDY Falling edge (external interrupt 0 enabled)

Set Up Load SRAM Comparison values for V FS =5, 2.5, 1.25V Counters for binary data conversion t IN cycles for the RESET sequence Transmit RESET sequence on SCLK Initializing USART Baud rate=115.2kbps, 8-bit data, 2 stop bits Enable External Interrupt 0 for Data Ready Interrupt on falling edge of INT0 Load initial values on INSR e CMR3:0 Bias off, REF out, 2’s complement, Bipolar bit, MSByte ed MSB first, Normal mode, Gain=1, TMR=16, Decimation Ratio=8191 f SAMP =115.3kHz e f DATA X IN =3.69MHz

Write CMR3:0 on ADS1210 ATmega8535 generates 8 serial clock and transmit INSR via SDIO ADS1210 is in Sleep Mode? DRDY Falling edge? N N Y Y ATmega8535 generates 32 serial clock and transmits CMR3:0 via SDIO ADS1210 takes DRDY HIGH Enable Data_Ready Interrupt on falling edge of DRDY in Main Body or Transmit to PC via USART: Line Feed and Carriage Return In: Receive new configuration via USART and send it to ADS1210 (1)

Receive new configuration via USART and send it to ADS1210 (1) Disable External Interrupt 0 N First is ‘m’? Second is ‘0’?Second is ‘1’? Second is ‘6’? NN N Y Y Y Normal ModeSelf Calibr.Sleep Mode YY Y Has been received a new character in UDR via USART? First is ‘g’? Second is ‘1’?Second is ‘2’? Second is ‘3’? NNY Gain=1Gain=2Gain=4 YY Y First is ‘t’? Second is ‘1’?Second is ‘2’? Second is ‘3’? NNY TMR=16TMR=8TMR=4 YY Y N N N N N

Receive new configuration via USART and send it to ADS1210 (2) First is ‘d’? II is 2? II is 3? II is 4? II is 5? II is 6? II is 1? DR=1FFF SI N DR=17F9 DR=0FF5 DR=03E9 DR=01FF DR=0013 Y Y Y Y Y Y N N N N N Write CMR3:0 on ADS1210 Transmit to PC via USART: Line Feed and Carriage Return Save CMR2 Enable External Interrupt 0 Has been received a character in UDR via USART? In: Main Body N

Read DOR2:0 from ADS1210 ATmega8535 generates 8 serial clock and transmit INSR via SDIO ATmega8535 generates 24 serial clock and receives CMR3:0 via SDIO SDIO becomes output Load counters 10 0 _10 -1 _10 -2 _10 -3 _10 -4 _10 -5 _10 -6 with values converted in Volts in: Interrupt Data_Ready

Load counters 10 0 _10 -1 _10 -2 _10 -3 _10 -4 _10 -5 _10 -6 with values converted in Volts (1) Set to zero counters 10 0 _10 -1 _10 -2 _10 -3 _10 -4 _10 -5 _10 -6 Gain=1? Gain=2? Load in ZL the SRAM location of LSByte comparison binary code of 1V with V FS =5V Load in ZL the SRAM location of LSByte comparison binary code of 1V with VFS=2.5V Load in ZL the SRAM location of LSByte comparison binary code of 1V with VFS=1.25V Load in XL the SRAM location of counter 10 0 N N Y Y

Load counters 10 0 _10 -1 _10 -2 _10 -3 _10 -4 _10 -5 _10 -6 with values converted in Volts (2) The number in DOR0:2 (24bit) is lower than the comparison code? Increase the counter value Subtract to DOR0:2 the comparison code Increase XL XL point at the SRAM location next to counter ? Load in ZL the SRAM location of LSByte comparison code equals to the previous/10 Y N N Y Transmit the value converted in Volts to PC via USART in: Interrupt Data_Ready

Transmit the value converted in Volts to PC via USART (1) Load in ZL the SRAM location of the counter 10 0 Counter=9? Counter=8? Counter=7? Counter=6? Counter=5? Counter=4? Counter=3? Counter=2? Counter=1? temp register<=9 ASCII temp register<=8 ASCII temp register<=7 ASCII temp register<=6 ASCII temp register<=5 ASCII temp register<=4 ASCII temp register<=3 ASCII temp register<=2 ASCII temp register<=1 ASCII temp register<=0 ASCII Send temp register to PC via USART Has been sent counter 10 0 ? Send to PC via USART:. ASCII NO SI N N N N N N N N N Y Y Y Y Y Y Y Y Y Increase ZL ZL point at the SRAM location next to counter 10-6? NO SI

Transmit the value converted in Volts to PC via USART (2) Send to PC via USART: space and V ASCII Send to PC via USART: Line feed and Carriage Return Exit from interrupt in: Interrupt Data_Ready

RESET sequence – timing ADS1210 RESET Sequence on PB7->SCLK t 1 =82.4µs =304 t IN (>256 e <400 t IN ) t 2 =3.78µs =14 t IN (>5.5 t IN ) t 3 =163µs =601 t IN (>512 e <900 t IN ) t 4 =286µs =1055 t IN (>1024 e <1200 t IN )

Serial interface – timing ADS1210 Receives f SCLK =227.3kHz=X IN /16 t 38 =6.36µs=23t IN (>5.5t IN ) t 19 =3.8µs =14t IN (>5.5t IN ) t 20 =1.42µs =5t IN (>4t IN ) ADS1210 Transmits f SCLK =263.2kHz=X IN /14 t 38 =7.1µs =26t IN (>5.5t IN ) t 19 =6.7µs =25t IN (>5.5t IN ) t 20 =2µs =7t IN (>4t IN )

Conclusions ADS1210 offers: High Resolution Good flexibility … but low conversion speed ATmega8535 after received 24-bits data has the time for: Execute arithmetic operations for data conversion in Volts Transmit data converted to PC From the keyboard is possible to send 15 different instructions exploit the majority converter functions

INSTRUCTION SET SUMMARY