V 0.21 Audio Record/Playback Maxim 517 Audio mini jack OUT0 DIP Switch + - Vout DAC LM386PIC RA0/AN0 I2C bus Open for record Closed for playback EEPROM.

Slides:



Advertisements
Similar presentations
IEEE 1284 I/O. IEEE 1284 Overview Four parallel port interfaces through ENI 40 pins Uses external latching transceivers Host-side only No IEEE negotiation.
Advertisements

Computer Architecture
I/O Organization popo.
Serial Communications Interface (SCI) Michael LennardZachary PetersBao Nguyen.
MM Player Supervised by: Dr. Luai Malhis. Prepared by: Mustafa Assaf & Mahmoud Musa.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
MC68HC11 System Overview. System block diagram (A8 version)
LOGO Lab Supervisor – Dr. WH Lau EE3271 Design Laboratory.
EXTERNAL COMMUNICATIONS DESIGNING AN EXTERNAL 3 BYTE INTERFACE Mark Neil - Microprocessor Course 1 External Memory & I/O.
Programmable Interval Timer
TK2633 Introduction to Parallel Data Interfacing DR MASRI AYOB.
8086.  The 8086 is Intel’s first 16-bit microprocessor  The 8086 can run at different clock speeds  Standard 8086 – 5 MHz  –10 MHz 
I/O Unit.
Proximity Sensor Theremin Khoa Nguyen Walter Hudson Dennis Gilbert G. Hewage Thushara.
I Power Higher Computing Multimedia technology Audio.
Oscilloscope Watch Teardown. Agenda History and General overview Hardware design: – Block diagram and general overview – Choice of the microcontroller.
Mark Neil - Microprocessor Course 1 Digital to Analog Converters.
Introduction of Holtek HT-46 series MCU
Proximity Sensor Board: Final Report Sarat Bhogavalli Nathan Ellefsen Ryan Fig Michel Kinsy Mentor: John Winters.
20 Feb 2002Readout electronics1 Status of the readout design Paul Dauncey Imperial College Outline: Basic concept Features of proposal VFE interface issues.
EET Advanced Digital Parallel Ports. n In contrast to serial ports, parallel ports ‘present’ all bits at one time. n ‘The parallel port reflects.
Guitar Effects Processor Critical Design Review October, 07, 2003 Groups Members: Adam Bernstein Hosam Ghaith Jasenko Alagic Matthew Iyer Yousef Alyousef.
Serial Peripheral Interface (SPI)
Coordinate Based Tracking System
Getting the O in I/O to work on a typical microcontroller Ideas of how to send output signals to the radio controlled car. The theory behind the LED controller.
PDACS Final Presentation Michelle Berger John Curtin Trey Griffin Aaron King Michael Nordfelt Jeffrey Whitted.
Getting the O in I/O to work on a typical microcontroller Activating a FLASH memory “output line” Part 1 Main part of Laboratory 1 Also needed for “voice.
Synchronous Serial IO Send a separate clock line with data
Objectives: Lead Switching Circuitry/Control Analog to Digital Converter Write to Computer.
DEEPAK.P MICROPROCESSORS AND APPLICATIONS Mr. DEEPAK P. Associate Professor ECE Department SNGCE 1.
Secure Embedded Processing through Hardware-assisted Run-time Monitoring Zubin Kumar.
General System Architecture and I/O.  I/O devices and the CPU can execute concurrently.  Each device controller is in charge of a particular device.
EE 1106: Introduction to EE Freshman Practicum
Peripherals and their Control An overview of industrially available “peripheral devices” that use “pulse-width modulation” for information passing. Review.
V 0.21 Timers A timer on a  C is simply a counter The input clock frequency to a timer can be prescaled so that it is some fraction of the system clock.
System Clocks.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
NAND boot over I2C example
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage structure.
ELN5622 Embedded Systems Class 7 Spring, 2003 Aaron Itskovich
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
I/O Interfacing A lot of handshaking is required between the CPU and most I/O devices. All I/O devices operate asynchronously with respect to the CPU.
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
1 Synchronous Serial IO Send a separate clock line with data –SPI (serial peripheral interface) protocol –I 2 C (or I2C) protocol Encode a clock with data.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
13-Nov-15 (1) CSC Computer Organization Lecture 7: Input/Output Organization.
1 © Unitec New Zealand Interrupt Lecture 6 Date: - 20 Sept, 2011 Embedded Hardware ETEC 6416.
1 ARM University Program Copyright © ARM Ltd 2013 Using Direct Memory Access to Improve Performance.
Interrupts Microprocessor and Interfacing
S4525A Peripherals & Enhanced FLASH 1 © 1999 Microchip Technology Incorporated. All Rights Reserved. S4525A Peripherals & Enhanced FLASH 1 Peripherals.
Programmable Interrupt Controller (PIC)
Basic LED Interface.
1 Microprocessors CSE – 341 Basic I/O Interfacing.
Features of the PIC18 microcontroller - 8-bit CPU - 2 MB program memory space (internal 32KB to 128KB) bytes to 1KB of data EEPROM - Up to 4096 bytes.
EE/CS-352: Embedded Microcontroller Systems Part V The 8051 Assembly Language Interrupts.
بسم الله الرحمن الرحيم MEMORY AND I/O.
8255:Programmable Peripheral Interface
ADAPTIVE BABY MONITORING SYSTEM Team 56 Michael Qiu, Luis Ramirez, Yueyang Lin ECE 445 Senior Design May 3, 2016.
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.
8255 Programmable Peripheral Interface
Chip Config & Drivers – Required Drivers:
Serial I/O Port.
Microcontrollers, Basics Tips and Tricks with PIC MCUs
Operating Systems (CS 340 D)
SERIAL PORT PROGRAMMING
Project Title EVM IN PIC Under the Guidance of Submitted by.
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
8259 Programmable Interrupt Controller
ADC and DAC Data Converter
Presentation transcript:

V 0.21 Audio Record/Playback Maxim 517 Audio mini jack OUT0 DIP Switch + - Vout DAC LM386PIC RA0/AN0 I2C bus Open for record Closed for playback EEPROM 24LC515 Audio saved to EEPROM by PIC PIC then reads EEPROM contents, sends to DAC for playback DIP switch is optional, use a wire if you want to.

V 0.22 Audio Record The file audio.c already provides the record function. Timer2 and double buffering technique (two 64-byte buffers) used to save audio to EEPROM. All 64K bytes of EEPROM is used to save audio sample. Sampling rate is set by Timer2. Playback must be done at same sampling rate as record was done!!!!!

V 0.23 How long can we record? For voice, 8 KHz is acceptable quality Period = ms Can store 64Kbytes, 64K * ms = seconds Not very long is just store raw samples. Many, many compression techniques available for voice. However, we will just store raw 8-bit samples.

V 0.24 LM 386 Audio Amplifier The LM386 is an opamp hooked up in a configuration that gives a fixed gain of 20. Use Media player from PC to playback audio – signal out of audio jack needs amplification. + - Vout LM386 Use the volume control on your PC to adjust input signal level. Use ‘calibrate’ mode of ‘audio.c’ to set this value so that you get a decent fluctuation of output values for audio input. Output signal will vary about Vdd/2

V 0.25 LM386 – Datasheet view Not needed Output is pin 5 10K pot is not needed

V 0.26 Playback Strategy Initialize EEPROM address to 0 Enable tmr2 interrupt 0 Read byte from EEPROM Wait for interrupt Interrupt_flag? interrupt_flag=0 Write byte to DAC Current address read from EEPROM. Timer2 interrupt determines the playback rate CAREFUL- it will be tough to achieve an 8KHz playback rate!

V 0.27 Playback Performance Tips Goal will be to reach a 8KHz playback rate First get it working for 4KHz, then optimize Flatten the subroutine calls to i2c subroutines –Copy code for subroutine into main loop so that don’t have overhead of call/return –Remove idle() checks Run the i2c bus above spec! –I have gotten the i2c bus to work up to about 550 KHz –This is cheating, and you would NOT do this in a product, but you can do it in this lab.

V 0.28 How do you know if code is too slow? When code reaches the ‘wait for interrupt’ check, if interrupt flag ALREADY set, then code too slow. –Audio quality will be degraded –Print a ‘!’ to the serial port if you detect that your code is too slow – this will help you know if you need to speed up the code. The i2c bus and to some degree, the software overhead is the limiting factor of the playback –If used a DAC with a parallel interface could achieve a faster playback