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 Technologiess 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
PIC16F877A
- 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
SYSTEM OVERVIEW
LCD
ISD1790
SPI line
SPI
interface
EEPROM
(nonvolatile
storage)
PIC16F877A
Control
line
Push
Button
Control
Unit
ADC
DAC
Speaker
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
Rosc
(k)
Message
Duration
12
8.0
6.4
5.3
4.0
53
80
100
120
160
60
90
112
135
180
Minimum
Storage
Resolution
(msec)
83.3
125
156
187
250
Table 1
For detailed information about ISD1790, please refer to
the datasheet which can be found at ISD1790 Design
Guide.
PIC16F877A
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:
Figure 2
Figure 2 shows the pin diagram for PIC16F877A. 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
Name
REC
PLAY
FWD
VOL
Pin function
Record(Standalone)
Play(Standalone)
Forward(Standalone)
22
7
6
5
4
FT
SS
SCLK
MOSI
MISO
10
MIC+
11
MIC-
Feed-Through
Slave Select
Serial Clock
Master Out Slave In
Master In Slave Out
Non-inverting input
of differential
microphone signal
Inverting input of
differential
microphone signal
20
Rosc
Oscillator Resistor
18
AGC
Automatic Gain
Control
LED
LED
VCCD
Supply voltage
(digital)
28
VSSD
Ground (digital)
21
VCCA
Supply voltage
(analog)
VSSA
Ground (analog)
14
VCCP
16
VSSP1
12
VSSP2
19
HARDWARE
This project will require following hardware:
a.
b.
c.
d.
e.
f.
1 x PIC16F877A
1 x PR17 Printed Circuit Board (PCB)
1 x ISD1760
1 x 2x16 LCD
1x Jack Socket
Related electronic components
Volume Control
Supply voltage
(PWM Speaker
Driver)
Ground ( Positive
PWM Speaker
Driver)
Ground ( Negative
PWM Speaker
Driver)
15
SP+
SP+
13
SP-
SP-
Connection
RA0
RE2
RC0
Connect to
push button
RD3
RE1
RC3
RC5
RC4
Connected
to MIC
Connected
to MIC
Connected
to 82k
resistor
Connected
to 4.7uF
electrolytic
capacitor
Connected
to LED
Connected
to 5V
Connected
to GND
Connected
to 5V
Connected
to GND
Connected
to 5V
Connected
to GND
Connected
to GND
Connected
to positive
pin of
speaker
Connected
to negative
pin of
speaker
Table1
*For more information about pin that is not shown in
the table 1, please refer to ISD1790 datasheet.
ICSP
for
microcontroller
programming
PIC
Figure 3
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.
Push Button
microcontroller
as
input
for
PIC
Figure 8
Figure 5
One I/O pin is needed for one push button as input of
PIC microcontroller. The connection of the push button
Name
VSS
VCC
VEE
RS
R/W
7
8
9
10
11
12
13
14
15
DB0
DB1
DB2
DB3
DB4
DB5
DB6
DB7
LED+
16
LED-
Pin function
Ground
Positive supply
for LCD
Brightness adjust
Select
register,
select instruction
or data register
Select read or
write
Start data read or
write
Data bus pin
Data bus pin
Data bus pin
Data bus pin
Data bus pin
Data bus pin
Data bus pin
Data bus pin
Backlight positive
input
Backlight
negative input
Table 2
Connection
GND
5V
Connected to
a trimmer to
adjust LCD
brightness
RD6
11
4
12
10
15
13
19
16
GND
20
RD7
RB0
RB1
RB2
RB3
RB4
RB5
RB6
RB7
a resistor to
limit
excessive
current
GND
17
18
14
Figure 10
Component:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
Figure 9
13.
14.
15.
16.
17.
18.
19.
20.
SOFTWARE
Flow Chart:
Start
GETTING START
Initialize PIC
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.
Is Select
pressed?
Yes
Increase
mode
1.
No
Is Enter
pressed?
Yes
Execute
current mode
No
3.
4.
5.
AC to DC adaptor:
9.
Have fun!
TEST METHOD
SPI Mode
1.
2.
12V Polarity
Figure 11 (not included in DIY project set)
9V battery connector:
3.
Figure 13
6.
7.
8.
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).
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).
Test the functionality of the PCB board.
4.
5.
Standalone Mode
1. Reset the PIC
2. If user has recorded for both Message 1 and
Message 2, it is advisable to perform Global
3.
4.
5.
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.
5.
6.
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:
Adaptor
2510-02 Socket LM7805
Connector
20MHz
Crystal
E-Cap
10uF
c-cap 104
Box
Header
Preset 2510-02
E-Cap LM386 103 Connector
100uF
E-Cap
c-cap 562 220uF
ISD1790
PIC16F877A
E-Cap
4.7uF Jack Socket
Preset
502
Microphone
E-Cap
4.7uF
10K
LCD
10K
10K
Reset
Button
Figure 14
Figure 15