Professional Documents
Culture Documents
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 FEATURES
This document describes the development of Cytron PIC16F877A
Technologies DIY (Do It Yourself) Project No.17 - 8-bit microcontroller with 33 I/O
(PR17). This project will use PIC16F877A and - operate with 5V supply
ISD1790 to record and playback voice. Circuit - operating speed 20MHz
schematic and PIC source code will be provided. 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
SYSTEM OVERVIEW
LCD
ISD1790
SPI EEPROM
interface (nonvolatile
SPI line storage)
PIC16F877A
Control Control
line Unit ADC DAC Speaker
Push
Button LED
Microphone
Minimum
Sampling
Rosc Message Storage
Frequency
(kΩ) Duration Resolution
(kHz)
(msec)
12 53 60 83.3
8.0 80 90 125
6.4 100 112 156
Figure 1 5.3 120 135 187
4.0 160 180 250
Winbond® ISD1790 Chip Order® Series provides
high-quality, fully integrated, single-chip, Table 1
Record/Playback solutions for 90 second messaging
applications. In addition, it can be operated in either For detailed information about ISD1790, please refer to
standalone or SPI (microcontroller) mode. The CMOS the datasheet which can be found at ISD1790 Design
devices include an on-chip oscillator (with external Guide.
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
Figure 7
Figure 4
The basic connection for In-Circuit Serial Programmer
User can choose either AC to DC adaptor (not included (ICSP) is as displayed in Figure 5. There are several
in the DIY project set) or 9V-12V battery (not included types of USB in-circuit programmer can be found in
in the DIY project set) to power up the circuit. Higher Cytron, for example, UIC00B. However, programmer
input voltage will produce more heat at LM7805 is not included in this DIY project package since the
voltage regulator. Typical voltage is 12V. Anyhow, programmer can be reused for other projects.
LM7805 will still generate some heat at 12V. There are
two type of power connector for the circuit, DC plug For the instruction of using a PIC programmer, please
(J1) and 2510-02 (Power Connector). Normally AC to refer to the particular PIC programmer user’s manual at
DC adaptor can be plugged to J1 type connector. Cytron website (http://www.cytron.com.my)
Figure 8
Figure 5
One I/O pin is needed for one push button as input of Figure 8 is a 2X16 character LCD. LCD connection pin
PIC microcontroller. The connection of the push button and function of each pin is shown:
Mode 2: Standalone mode 3. The next step is to install MPLAB IDE and
Control ISD 1790 using I/O ports where it can HI-TECC C PRO into a computer. The
playback, record and forward to the next message. MPLAB IDE and HI-TECC C PRO can be
The number of message to be recorded is downloaded from www.cytron.com.my.
unlimited as long as the memory is not full yet. Please refer MPLAB IDE installation step
There are two options in recording sound clip document to install the software. The
which are either using mic or audio input. Beware
documents can be used to any version of
that before entering this mode, user is advised to
perform Global Erase operation if SPI mode is MPLAB IDE software.
used earlier to avoid overlapping of messages. If
the Alert LED flashes seven times, Global Erase 4. After the installation complete, open the
operation must be performed as an error has been project file provided using MPLAB IDE.
occurred. Please refer MPLAB Open Project document
to open the sample program.
Mode 3: Erase mode
In this mode, there are two options which are 5. Plug in power supply for the circuit. User can
Erase operation and Global Erase operation. For choose to use battery or AD to DC adaptor.
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.
TEST METHOD
SPI Mode
Erase operation to avoid overlapping of • User can only erase the first or the last
messages. Otherwise, user can skip this step. message each time.
• Choose Erase mode before entering 5. If user wants to delete all the messages,
Standalone mode. choose Global Erase operation under Erase
• Select Global Erase and press Enter. mode.
• LCD will display “Memory Cleared”. • LCD will display “Memory Cleared”.
• All messages have been erased. • All messages have been erased.
3. Press Select button and Enter button to choose
for Standalone mode. If all the steps mentioned above can be executed, your
4. Choose Record mode under Standalone mode. project is done successfully. Congratulation!!
• Select the methods of recording which
either using “1. Analog Input” or “2.
MIC”.
WARRANTY
¾ If “1. Analog Input” is selected;
connect the audio wire between No warranty will be provided as this is DIY project.
the jack socket and PC. It will Thus, user is advised to check the polarity of each
behave similarly as headset. electronic component before soldering it to board.
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**”.
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.
Appendix A
PCB Layout:
10K
LCD
10K
10K Reset
Button
Figure 14
Figure 15