Voice Recording and Playback: ISD1790. Version 1.0. August Cytron Technologies Sdn. Bhd.

Similar documents
PICNet 1. PICNet 1 PIC18 Network & SD/MMC Development Board. Features. Applications. Description

Welcome to the tutorial for the MPLAB Starter Kit for dspic DSCs

Voice Dialer Speech Recognition Dialing IC

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V th November L6470 Stepper Motor Shield

MD10C Enhanced 10Amp DC Motor Driver

ET-BASE AVR ATmega64/128

Lab Experiment 1: The LPC 2148 Education Board

MX PIC24F Educational Module User Manual

How To Program A Microcontroller Board (Eb064) With A Psp Microcontroller (B064-74) With An Ios 2.5V (Power) And A Ppt (Power Control) (Power Supply) (

GSM Interfacing Board

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

- 35mA Standby, mA Speaking pre-defined phrases with up to 1925 total characters.

Analog-to-Digital Converters

Chapter 13. PIC Family Microcontroller

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

POCKET SCOPE 2. The idea 2. Design criteria 3

AN-812 APPLICATION NOTE

EasyPIC4 User s Manual

An Introduction to MPLAB Integrated Development Environment

DATASHEET. ADAM Arduino Display Adaptor Module. Arduino Compatible Shield P/N: 4Display-Shield-FT843 For the 4D Systems 4DLCD-FT843 Display

Evo Laser Firmware Developer s Manual

SMARTCARD XPRO. Preface. SMART ARM-based Microcontrollers USER GUIDE

PolyBot Board. User's Guide V1.11 9/20/08

Android Controlled Based Interface

Web Site: Forums: forums.parallax.com Sales: Technical:

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor.

ARDUINO SEVERINO SERIAL SINGLE SIDED VERSION 3 S3v3 (REVISION 2) USER MANUAL

Tutorial for MPLAB Starter Kit for PIC18F

The Programming Interface

PIC-MAXI-WEB development board Users Manual

How To Use A Watt Saver On A Microcontroller (Watt Saver) On A Cell Phone Or Mp3 Player

QUICK START GUIDE FOR DEMONSTRATION CIRCUIT BIT DIFFERENTIAL ADC WITH I2C LTC2485 DESCRIPTION

Tire pressure monitoring

RC2200DK Demonstration Kit User Manual

MFRD52x. Mifare Contactless Smart Card Reader Reference Design. Document information

PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard

Real Time Clock USB Evaluation Board V3.0

Microtronics technologies Mobile:

Atmel Norway XMEGA Introduction

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A

User's Guide. Integrating Sound Level Datalogger. Model Introduction

Switch board datasheet EB

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

[F/T] [5] [KHz] [AMP] [3] [V] 4 ) To set DC offset to -2.5V press the following keys [OFS] [+/-] [2] [.] [5] [V]

Glolab Talking Phone Dial Monitor

Accurate Measurement of the Mains Electricity Frequency

User Guide FFFA

US-SPI New generation of High performances Ultrasonic device

User Guide Reflow Toaster Oven Controller

GTS-4E Hardware User Manual. Version: V1.1.0 Date:

Controller for AD9850 DDS Modules Andy Talbot G4JNT

Pmod peripheral modules are powered by the host via the interface s power and ground pins.

FlowKit in-circuit debug system

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

Information Board User s Guide

Allen-Bradley/Rockwell

WICE-SPI Hardware Operation Manual

BE635 User Manual. Rev. V Bolymin, Inc. All Rights Reserved.

Section 28. In-Circuit Serial Programming (ICSP )

TEECES DOME LIGHTING SYSTEMS

Fondamenti su strumenti di sviluppo per microcontrollori PIC

Designing an Induction Cooker Using the S08PT Family

KTA-223 Arduino Compatible Relay Controller

Designing VM2 Application Boards

Implementing a Digital Answering Machine with a High-Speed 8-Bit Microcontroller

Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II

DK40 Datasheet & Hardware manual Version 2

MEMS ACCELEROMETER BASED PASSWORD RECOGNITION SYSTEM USING GSM

ABACOM - netpio.

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

Objectives: Part 1: Build a simple power supply. CS99S Laboratory 1

Design and Construction of Variable DC Source for Laboratory Using Solar Energy

8-Channel RC RX MUX. User s Manual

MARTECH SPI Tools. MARTECH SPI Tools User Manual v1.0. User Manual

DS1307ZN. 64 x 8 Serial Real-Time Clock

M80 EVB User Guide M80. Quectel Cellular Engine. EVB User Guide M80_EVB_UGD_V1.2 M80_EVB_UGD_V1.2-0-

AN3998 Application note

ETEC Digital Controls PIC Lab 10 Pulse Width Modulation

DS1621 Digital Thermometer and Thermostat

phonostage RIP YOUR VINYL TO BITS, WITH A USB Design

Using Xbee in Serial Communication

EvB 5.1 v5 User s Guide

LEN s.r.l. Via S. Andrea di Rovereto 33 c.s CHIAVARI (GE) Tel Fax mailto: len@len.it url: http//

STK User Guide

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

QT1 Xplained Pro. Preface. Atmel QTouch USER GUIDE

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

RDF1. RF Receiver Decoder. Features. Applications. Description. Ordering Information. Part Number Description Packages available

Cellphone Based Device Control With Voice Acknowledgement

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

FLYPORT Wi-Fi G

DKWF121 WF121-A B/G/N MODULE EVALUATION BOARD

A DIY Hardware Packet Sniffer

DS1621 Digital Thermometer and Thermostat

The modular concept of the MPA-3 system is designed to enable easy accommodation to a huge variety of experimental requirements.

SPI. Overview and Use of the PICmicro Serial Peripheral Interface. Getting Started: SPI

UniPi technical documentation REV 1.1

Transcription:

Voice Recording and Playback: ISD1790 PR17B Version 1.0 August 2010 Cytron Technologies Sdn. Bhd. Information contained in this publication regarding device applications and the like is intended through suggestion only and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. No representation or warranty is given and no liability is assumed by Cytron Technologies Incorporated with respect to the accuracy or use of such information or infringement of patents or other intellectual property rights arising from such use or otherwise. Use of Cytron Technologies s products as critical components in life support systems is not authorized except with express written approval by Cytron Technologies. No licenses are conveyed, implicitly or otherwise, under any intellectual property rights. OVERVIEW This document describes the development of Cytron Technologies DIY (Do It Yourself) Project No.17 (PR17). This project will use and ISD1790 to record and playback voice. Circuit schematic and PIC source code will be provided. FEATURES - 8-bit microcontroller with 33 I/O - operate with 5V supply - operating speed 20MHz ISD1790 - single chip record and playback - on chip non-volatile memory - record up to 90 second - support SPI mode as well as standalone mode - able to control volume Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 1

SYSTEM OVERVIEW LCD ISD1790 SPI line SPI interface EEPROM (nonvolatile storage) Control line Control Unit ADC DAC Speaker Push Button LED Microphone GENERAL DESCRIPTION When we talk about voice recording, the first thing that comes to our mind is an old cassette player where we record voice, and playback the recorded voice. ISD1790 Figure 1 Winbond ISD1790 Chip Order Series provides high-quality, fully integrated, single-chip, Record/Playback solutions for 90 second messaging applications. In addition, it can be operated in either standalone or SPI (microcontroller) mode. The CMOS devices include an on-chip oscillator (with external resistor control), microphone preamplifier with automatic gain control (AGC), anti-aliasing filter, Multi-Level Storage (MLS) array, smoothing filter, volume control, Pulse Width Modulation (PWM) Class D speaker driver and current/voltage output. Furthermore, ISD1790 also supports an optional valert (voicealert) feature that can be used as a new message indicator. For example, if the valert blinks seven times continuously, it indicates that something unusual has occurred and the device fails to perform the requested operation. To solve this, Global Erase must be performed. Recordings are stored into on-chip nonvolatile memory cells, providing zero-power message storage. Voice and audio signals are stored directly into memory in their natural form, providing high-quality, solid-state voice reproduction. The sampling frequency of ISD1790 can be adjusted from 4 khz to 12 khz with an external resistor, providing greater flexibility in duration versus record quality. Table below demonstrates the sampling frequency of ISD1790 versus message duration as well as the minimum storage resolution. Also, Rosc is the oscillator resistor which influences the sampling frequency. Sampling Frequency (khz) Rosc (kω) Message Duration Minimum Storage Resolution (msec) 12 53 60 83.3 8.0 80 90 125 6.4 100 112 156 5.3 120 135 187 4.0 160 180 250 Table 1 For detailed information about ISD1790, please refer to the datasheet which can be found at ISD1790 Design Guide. Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 2

This powerful (200 nanosecond instruction execution) yet easy-to-program (only 35 single word instructions) CMOS FLASH-based 8-bit microcontroller packs Microchip's powerful PIC architecture into an 40- or 44-pin package and is upwards compatible with the PIC16C5X, PIC12CXXX and PIC16C7X devices. Features of the device: 256 bytes of EEPROM data memory self programming ICD (in circuit debugging function) 2 Comparators 8 channels of 10-bit Analog-to-Digital (A/D) converter 2 capture/compare/pwm functions synchronous serial port can be configured as either 3-wire Serial Peripheral Interface (SPI ) or the 2-wire Inter-Integrated Circuit (I²C ) bus Universal Asynchronous Receiver Transmitter (UART). All of these features make it ideal for more advanced level A/D applications in automotive, industrial, appliances and consumer applications. Figure 2 Figure 2 shows the pin diagram for. For more information about the PIC microcontroller, please refer to the datasheet. The datasheet can be found in microchip web site at: http://www.microchip.com HARDWARE This project will require following hardware: a. 1 x b. 1 x PR17 Printed Circuit Board (PCB) c. 1 x ISD1760 d. 1 x 2x16 LCD e. 1x Jack Socket f. Related electronic components Please refer to Appendix A for the PCB layout of PR17. The PCB layout is provided free therefore Cytron Technologies will not be responsible for any further modification or improvement. Interface with ISD1790 Pin Name Pin function Connection 24 REC Record(Standalone) RA0 23 PLAY Play(Standalone) RE2 26 FWD Forward(Standalone) RC0 19 VOL Volume Control Connect to push button 22 FT Feed-Through RD3 7 SS Slave Select RE1 6 SCLK Serial Clock RC3 5 MOSI Master Out Slave In RC5 4 MISO Master In Slave Out RC4 10 MIC+ 11 MIC- Non-inverting input of differential microphone signal Inverting input of differential microphone signal 20 Rosc Oscillator Resistor 18 AGC Automatic Gain Control 2 LED LED 1 VCCD Supply voltage (digital) 28 VSSD Ground (digital) 21 VCCA Supply voltage (analog) 8 VSSA Ground (analog) 14 VCCP 16 VSSP1 12 VSSP2 Supply voltage (PWM Speaker Driver) Ground ( Positive PWM Speaker Driver) Ground ( Negative PWM Speaker Driver) 15 SP+ SP+ 13 SP- SP- Table1 to MIC to MIC to 82kΩ resistor to 4.7uF electrolytic capacitor to LED to 5V to GND to 5V to GND to 5V to GND to GND to positive pin of speaker to negative pin of speaker *For more information about pin that is not shown in the table 1, please refer to ISD1790 datasheet. Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 3

to the I/O pin is as shown in Figure 5. The I/O pin should be pull up to 5V using a resistor (with value range 1K-10K) and this configuration will result an active-low input. When the button is being pressed, reading of I/O pin will be in logic 0, while when the button is not pressed, reading of that I/O pin will be logic 1. Figure 3 ICSP for programming PIC microcontroller Power supply for the circuit Figure 7 Figure 4 User can choose either AC to DC adaptor (not included in the DIY project set) or 9V-12V battery (not included in the DIY project set) to power up the circuit. Higher input voltage will produce more heat at LM7805 voltage regulator. Typical voltage is 12V. Anyhow, LM7805 will still generate some heat at 12V. There are two type of power connector for the circuit, DC plug (J1) and 2510-02 (Power Connector). Normally AC to DC adaptor can be plugged to J1 type connector. Refer to Figure 4, the D1 is used to protect the circuit from wrong polarity supply. C1 and C3 are used to stabilize the voltage at the input side of the LM7805 voltage regulator, while the C2 and C4 are used to stabilize the voltage at the output side of the LM7805 voltage supply. LED is a green LED to indicate the power status of the circuit. R13 is a resistor to protect LED from excessive current that will burn the LED. The basic connection for In-Circuit Serial Programmer (ICSP) is as displayed in Figure 5. There are several types of USB in-circuit programmer can be found in Cytron, for example, UIC00B. However, programmer is not included in this DIY project package since the programmer can be reused for other projects. For the instruction of using a PIC programmer, please refer to the particular PIC programmer user s manual at Cytron website (http://www.cytron.com.my) Interface LCD (2x 16 Character) with To use the LCD display, users have to solder 16 pin header pin to the LCD display. LCD used in this project is RT1602C, for other type of LCD, please refer to its data sheet. Push Button as input for PIC microcontroller Figure 5 One I/O pin is needed for one push button as input of PIC microcontroller. The connection of the push button Figure 8 Figure 8 is a 2X16 character LCD. LCD connection pin and function of each pin is shown: Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 4

Pin Name Pin function Connection 1 VSS Ground GND 2 VCC Positive supply 5V for LCD 3 VEE Brightness adjust to a trimmer to adjust LCD brightness 4 RS Select register, RD6 select instruction or data register 5 R/W Select read or GND write 6 E Start data read or RD7 write 7 DB0 Data bus pin RB0 8 DB1 Data bus pin RB1 9 DB2 Data bus pin RB2 10 DB3 Data bus pin RB3 11 DB4 Data bus pin RB4 12 DB5 Data bus pin RB5 13 DB6 Data bus pin RB6 14 DB7 Data bus pin RB7 15 LED+ Backlight positive input a resistor to limit excessive 16 LED- Backlight negative input Table 2 Figure 9 current GND PCB circuit board 2 1 8 5 3 Component: 4 6 11 9 20 12 10 15 Figure 10 1. 2510-02 connector, (to use either 9V battery or 12V battery to power up the circuit). 2. Slide switch (to ON or OFF the circuit). 3. AC-DC adaptor socket (to use power supply from AC-DC adaptor). 4. Power indicator LED (to indicate the power status of the circuit). 5. Crystal (20MHz). 6. PIC 16F877A (the main brain of the system). 7. Push buttons. 8. Diode (to protect the circuit from wrong polarity power input). 9. Capacitor (to stabilize the output voltage of the 7805 voltage regulator). 10. LED. 11. LM7805 (voltage regulator, supply 5V for PIC). 12. ICSP box header (to connect to PIC programmer to program the microcontroller). 13. ISD1760 (chip to record and playback voice). 14. Reset button (to reset the microcontroller). 15. ISD1760 support component. 16. Microphone (to record voice). 17. 2510-02 connector, (to connect to an external speaker). 18. LM386 (Low Voltage Audio Power Amplifier) 19. Audio Socket 20. LCD (2x16 characters) 13 18 7 14 17 19 16 Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 5

SOFTWARE Flow Chart: For more information about the software for this system, please refer to the source code provided. The explanation of each instruction is provided in the source code as the comment of each line. Is Select pressed? No Is Enter pressed? No Start Initialize PIC Yes Yes Increase mode Execute current mode Mode 1: SPI mode Control ISD 1790 using SPI interface (Play and record messages at certain locations). There are two options in recording sound clip which are either using mic or audio input. Beware that before entering this mode, user is advised to perform Global Erase operation if Standalone mode is used earlier to avoid overlapping of messages. If the Alert LED flashes seven times, Global Erase operation must be performed as an error has been occurred. Mode 2: Standalone mode Control ISD 1790 using I/O ports where it can playback, record and forward to the next message. The number of message to be recorded is unlimited as long as the memory is not full yet. There are two options in recording sound clip which are either using mic or audio input. Beware that before entering this mode, user is advised to perform Global Erase operation if SPI mode is used earlier to avoid overlapping of messages. If the Alert LED flashes seven times, Global Erase operation must be performed as an error has been occurred. Mode 3: Erase mode In this mode, there are two options which are Erase operation and Global Erase operation. For Erase operation, it can delete message row by row, however, it is restricted to first or last message only. For Global Erase operation, all messages are deleted at once. The source code is provided free and Cytron Technologies will not be responsible for any further modification or improvement. GETTING START User can obtain the hardware set for this project (PR17) either by online purchasing (www.cytron.com.my) or purchase it in Cytron Technologies Shop. 1. Once user has the hardware set, soldering process can be started. Please solder the electronic components one by one according the symbols or overlays on the Printed Circuit Board (PCB). Ensure the component value and polarity is correctly soldered. Please refer to PCB Layout in Appendix A. Caution: Make sure all the connectors (2510) are soldered in proper side. Those electronic components have polarity such as capacitor, diode, PIC, LM7805 and LED should be soldered in right polarity or it may cause the circuit board fail to work. Warning: Before the battery (Power) is plugged in, make sure the polarity is correct to prevent explosion. Wrong polarity of capacitor also may cause explosion. 2. Please download the necessary files and document from Cytron Technologies website. These included documentation, sample source code, schematic, component list and software. 3. The next step is to install MPLAB IDE and HI-TECC C PRO into a computer. The MPLAB IDE and HI-TECC C PRO can be downloaded from www.cytron.com.my. Please refer MPLAB IDE installation step document to install the software. The documents can be used to any version of MPLAB IDE software. 4. After the installation complete, open the project file provided using MPLAB IDE. Please refer MPLAB Open Project document to open the sample program. 5. Plug in power supply for the circuit. User can choose to use battery or AD to DC adaptor. Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 6

AC to DC adaptor: 9. Have fun! TEST METHOD SPI Mode 12V Polarity Figure 11 (not included in DIY project set) 9V battery connector: Figure 12 (not included in DIY project set) Connection to the PCB board: Figure 13 6. Build the project and load the hex file into the PIC microcontroller using the USB In-Circuit Programmer (UIC00B). When user builds the project, MPLAB IDE will generate hex file. The hex file generated from MPLAB IDE will be named according to project name, not C file name. Cytron Technologies also provides hex file for user. Do not forget to switch ON the power. The programmer is not included in the hardware set but it can be found at Cytron website. (User manual is provided at website as well). 7. User can modify this program. After modification, build the project once again and load the hex file into the PIC microcontroller using Cytron USB In-Circuit Programmer (UIC00B). 8. Test the functionality of the PCB board. 1. Switch ON the power Power Led (green) will turn ON. LCD will display Select Mode and 1. SPI Mode. 2. Press Enter button LCD will display Switch Mode and 1. Play. When press Select button, the second line of LCD display will change to 2. Record 3. Choose Record operation Select the methods of recording which either using 1. Analog Input or 2. MIC. If 1. Analog Input is selected; connect the audio wire between the jack socket and PC. It will behave similarly as headset. Then, play music using PC. However, if 2. MIC is selected; the sound clip will be recorded via MIC by putting the source near the MIC. Select the location user wishes to store at. If 1. Message 1 is selected, ISD1790 will start to record for around 46 seconds. While recording, the LCD will display **recording the first message**. When 46 seconds has reached, the LCD will display ***halt*** to indicate that recording process has finished. The procedures are the same if user chooses to record for Message 2. 4. Press Reset button 5. Choose Play under SPI mode. If user wants to play back the Message 1 that has recorded, choose Message 1 for the Location. LCD will display **playing the first message** and will display ***halt*** when 46 seconds are over. If user wants to play back the recorded Message 2, press Select button again and choose for Message 2. Same procedures for playing back Message 2. Standalone Mode 1. Reset the PIC 2. If user has recorded for both Message 1 and Message 2, it is advisable to perform Global Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 7

Erase operation to avoid overlapping of messages. Otherwise, user can skip this step. Choose Erase mode before entering Standalone mode. Select Global Erase and press Enter. LCD will display Memory Cleared. All messages have been erased. 3. Press Select button and Enter button to choose for Standalone mode. 4. Choose Record mode under Standalone mode. Select the methods of recording which either using 1. Analog Input or 2. MIC. If 1. Analog Input is selected; connect the audio wire between the jack socket and PC. It will behave similarly as headset. Then, play music using PC. However, if 2. MIC is selected; the sound clip will be recorded via MIC by putting the source near the MIC. It will start recording and Alert LED will turn ON. LCD will display **record** and select to stop If user wishes to stop recording, press Select button. LCD will display **stop recording**. User can only erase the first or the last message each time. 5. If user wants to delete all the messages, choose Global Erase operation under Erase mode. LCD will display Memory Cleared. All messages have been erased. If all the steps mentioned above can be executed, your project is done successfully. Congratulation!! WARRANTY No warranty will be provided as this is DIY project. Thus, user is advised to check the polarity of each electronic component before soldering it to board. If user to wish to record another sound clip, repeat step 3 and 4 after pressing Reset button. 5. To play back the recorded sound clip, press Select and Enter button to choose Play under Standalone mode. Alert LED will flash continuously while playing the recorded sound clip ISD 1790 will stop automatically when a sound clip is finished playing and Alert LED will stop blink and turn OFF. 6. To play the next sound clip, one has to forward the playback pointer. To do this, choose Forward under Standalone mode. The Alert LED will flash twice and LCD will display **forward** at the second line. Do not press any buttons while Alert LED is flashing. User can now repeat step 5 if wants to play back the next sound clip. Erase Mode 1. Reset PIC. 2. Press Select and Enter buttons to choose Erase mode. 3. Press Select and Enter buttons to choose Erase mode. 4. If user wants to erase message one by one, user can choose Erase operation. However, this mode is not suitable for SPI mode. Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 8

Appendix A PCB Layout: Adaptor 2510-02 Socket Connector 20MHz Crystal LM7805 10uF c-cap 104 Box Header 100uF ISD1790 Preset 2510-02 LM386 103 Connector c-cap 562 220uF 4.7uF 4.7uF Preset 502 Jack Socket Microphone 10K LCD 10K 10K Reset Button Figure 14 Figure 15 Created by Cytron Technologies Sdn. Bhd. All Rights Reserved 9