easy psoc4 key features 4 connecting the … · mmc/sd (multimedia card) 24 ... in order to use the...
TRANSCRIPT
Easy PSoC4 KEY FEATURES 4
CONNECTING THE SYSTEM 5
INTRODUCTION 6
Switches and Jumpers 7
MCU Sockets 8
Power Supply 10
On-board USB 2.0 Programmer 11
RS-232 Communication 12
RS-485 Communication 13
Real Time Clock 14
CAN-SPI 15
DS1820 Digital Thermometer 16
LEDs 17
Push-Buttons 18
2x16 Character LCD 19
Graphic LCD 20
Touch Panel 21
A/D Converter Test Inputs 22
Direct Port Access 23
MMC/SD (multimedia card) 24
CONTENTS
EASY PSOC4
KEY FEATURES
1. External power supply 8v- 16v AC/DC;
2. On-board USB 2.0 programmer circuit;
3. RS-232 communication circuit;
4. RS-485 communication circuit;
5. Real time clock circuit;
6. CAN-SPI circuit (Controller Area Network);
7. DS1820 temperature sensor circuit;
8. LCD 2x16 connector;
9. LCD contrast potentiometer;
10. A/D converter test inputs;
11. 48-pin PSOC card with SMD CY8C27643-24PVXI chip;
12. MCU sockets;
13. MCU socket for additional MCU cards;
14. DIP switch SW1 to SW4 used for enabling/disabling on
board components;
15. Direct port access;
16. LEDs showing logical states of MCU pins;
17. Reset push button;
18. Push buttons;
19. GLCD connector;
20. Touch panel connector;
21. GLCD contrast potentiometer;
22. Touch panel controller; and
23. MMC/SD multimedia card slot.
4
CO
NN
EC
TIN
G T
HE
SY
ST
EM
CONNECTING THE SYSTEM
Apart from this manual, the development system box contains development system, product CD,
USB cable, RS232 cable and Installing USB drivers manual. In order to use the Easy PSoC4 prop-
erly, it is necessary to go through the following steps:
Step no.1 Take the development system and product CD out of the box. Insert the
product CD into CD drive. Please, do not connect the development system
to a PC yet.
Step no.2 Install PSoC flash programmer software to enable a program to be trans-
ferred from PC to the microcontroller chip.
Step no.3 Install USB drivers on your PC to enable programmer's hardware to ope-
rate properly on the Easy PSoC4 board. For detailed installation instruc-
tions refer to the Installing USB drivers manual.
Step no.4 Connect the Easy PSoC4 to PC using USB cable. Please use one of the
USB ports on the back of the PC as they are directly connected to the
computer motherboard. If you turn ON the power supply switch on the Easy
PSoC4 board for the very first time, your PC will automatically detect a new
hardware. You will be immediately prompted whether Windows should
search for new drivers update or not. Select the option No, not this time and
click Next. Another window appears, click Next and the operating system
will automatically find the drivers. Click Finish to complete this process and
run PSoCflash.
After these four steps, your Easy PSoC4 is successfully installed and ready for use. You can read a
program from the chip or write another one into it. The product CD provides numerous simple pro-
gram examples to make your first steps Easy...
5
INT
RO
DU
CT
ION
INTRODUCTION
The Easy PSoC4 is a full-featured development system for Cypress PSoC microcontrollers. It is
designed to allow students and engineers to easily test and explore the capabilities of PSoC micro-
controllers. It also allows PSoC microcontrollers to be interfaced with external circuits and a broad
range of peripheral devices. The user can therefore concentrate on software development only.
Figure 1 illustrates the development system. There are identification marks next to each component
on a silkscreen, both on the top and bottom. These marks describe connection to the microcon-
troller, operation modes and provide additional useful information so that there is almost no need for
additional schematics.
6
Figure 1 Easy PSoC4 development system
SW
ITC
HE
S A
ND
JU
MP
ER
S
7SWITCHES
The Easy PSoC4 development system features a number of peripheral devices. In order to enable
them before programming, the appropriate jumpers or switches have to be properly set. Switches
are mechanical devices used to establish or break connection between two contacts. The Easy
PSoC4 development system has four groups of switches.
DIP switch SW1 is used to enable/disable RS-232, RS-485 and MMC-CS;
DIP switch SW2 is used to enable/disable DS1820, CAN and SPI;
DIP switch SW3 enable/disable I2C, RTC-INT and touch panel controller; and
DIP switch SW4 enable/disable LEDs.
JUMPERS
Similarly, jumpers are used to break or establish connection between two points. Under the plastic
cover of a jumper, there is a metal contact which establishes connection when a jumper is placed
over two pins.
Jumper is commonly used as a selector between two possible connections via 3-pin connector. As
illustrated in Figure 3, the middle connector pin can be connected to the left or right pin, depending
on the jumper’s position.
Figure 2 Switch group SW4Switches 1, 2, 3 and 4 are ON,
whereas 5, 6, 7 and 8 are OFF
Figure 3 Jumper as a selector
Jumper is not
placed and
middle pin is
unconnected.
Jumper is placed
on the left side
connecting mid-
dle and left pin.
Jumper is placed
on the right side
connecting middle
and right pin.
MC
U S
OC
KE
TS
MCU SOCKETS
The Easy PSoC4 comes with a 48-pin CY8C27643-24P microcontroller soldered on MCU card that
fits in DIP48 socket. The user can remove this card and insert another one in DIP48, DIP28, DIP20
or DIP8 packages with adequate pin-out. Wide MCU cards on which you can solder microcontrollers
in QFN, TQFP, SOIC and SSOP packages can be used as well.
Easy PSoC MCU cards are used for microcontrollers
having no appropriate on-board DIP socket. For large
number of pins these microcontrollers have, they
should be soldered on an MCU card and placed in
DIMM socket. The advantage of the cards is that they
can be used for connecting microcontrollers in differ-
ent packages using only one on-board socket.
Note: Since all packages have parallel connections, there must not be more than one microcon-
troller on the board at a time.
8
Figure 4 MCU sockets
MC
U S
OC
KE
TS
The microcontroller pins are routed to various peripherals as illustrated in Figure 5. All MCU ports
are directly connected to Direct Port Access 2x5(10-pin) connectors. These are normally used for
connecting external peripherals to the board, as well as points for digital logic probe connecting.
All ports are connected to LEDs and push-buttons, which allows you to easily test and monitor dig-
ital pins state.
Some of the pins are connected to on-board peripherals such as DS1820 temperature sensor, RS-
232 communication module, RS-485 communication module, LCD, etc.
9
Figure 5 System connection
PO
WE
R S
UP
PLY
POWER SUPPLY
The Easy PSoC4 can use one out of two power supply sources - PC power supply over USB cable
(by default) or external power supply (external AC/DC power adapter). When using power supply
over USB cable, jumper J1 should be set in the right-hand position.
When using external power supply, the Easy PSoC4 board produces +5V using LM7805 voltage
regulator. The external power supply can be AC or DC, while its voltage ranges between 8 and 16V.
In this case, jumper J1 should be set in the left-hand position. Figure 7 illustrates USB and external
power supply circuit diagram.
10
J1 in the right-hand position:
system is powered from PC
over USB cable.
J1 in the left-hand position:
system is powered from the
external AC/DC power adapter.
Figure 6 Power supply
Figure 7 Power supply circuit diagram
ON
-BO
AR
D U
SB
2.0
PR
OG
RA
MM
ER
ON-BOARD USB 2.0 PROGRAMMER
There is no need to use external equipment during
programming as the Easy PSoC4 development sys-
tem has its own on-board USB 2.0 programmer. All
you need to do is to connect the system to PC using
the USB cable. Load your program into the microcon-
troller via the PSoCflash programming software sup-
plied with the Easy PSoC4.
Note: There is no need to reset MCU after programming because it will be automatically
reset the MCU automatically.
11
Figure 8 USB 2.0 programmer
Figure 9 USB 2.0 programmer circuit diagram
RS
-232
CO
MM
UN
ICA
TIO
N
RS-232 COMMUNICATION
RS-232 communication module enables point-to-point data transfer. It
is commonly used in data acquisition applications to transfer data
between the microcontroller and PC. Since the voltage levels of the
microcontroller and PC are not directly compatible with each other, a
level converter, such as MAX232, must be used. In order to provide
more flexible system, the microcontroller is connected to the MAX232
via first four switches of the DIP switch SW1. The first and third switch
are used to connect Rx and Tx lines with P0[0] and P0[1] pins, while
the second and fourth switch are used to connect these lines with P0[6]
and P0[7] pins.
12
Figure 11 RS-232 communication circuit diagram
Figure 10 RS-232 communication
RS
-485
CO
MM
UN
ICA
TIO
N
RS-485 COMMUNICATION
Similarly, RS-485 communication module is commonly used for data
transfer between several microcontrollers. ADM485 interface transceiver
is used for transforming signal from microcontroller’s Rx and Tx lines in
to a differential signal on “+” and “-” output lines.
The Easy PSoC4 development system has one RS-485 communication device. In order to provide more
flexible system, the microcontroller is connected to the ADM485 via three switches (5, 6 and 7) of the
DIP switch SW1. These switches are used to connect Rt, Rx, and Tx microcontroller lines to RS-485.
13
Figure 12 RS-485 communication
Figure 13 RS-485 communication circuit diagram
RE
AL
TIM
E C
LOC
K (
RT
C)
REAL TIME CLOCK (RTC)
Most hardware projects need a real time clock or delay source.
For this reason the Easy PSoC4 development system is provided
with the PCF8583P chip (clock/calendar with 240x8-bit RAM). It
uses I2C serial communication to exchange data with the micro-
controller. Besides, it has one interrupt output. In order that
PCF8583P works properly, both interrupt and I2C communication
lines must be connected to the microcontroller using switches 1, 2
and 3 of the DIP switch SW3.
14
Figure 14 Real time clock
Figure 15 Real time clock circuit diagram
CA
N-S
PI
CAN-SPI
CAN (Controller Area Network) is a serial network initially designed for
the use in automotive industry, but has also become a very popular bus
in industrial automation and other applications as well. CAN is a network
established among microcontrollers. It is a two-wire, half-duplex, high-
speed network system. Half-duplex means that the microcontroller can
send and receive data, but either operation at a time.
The Easy PSoC4 development system has one CAN communication
device. Microcontroller is connected to CAN controller through SPI
communication, so you just need to turn on the appropriate switches
of the DIP switch SW2 (3, 4, 5, 7 and 8).
15
Figure 16 CAN-SPI
Figure 17 CAN-SPI circuit diagram
DS
1820
DIG
ITA
L T
HE
RM
OM
ET
ER
DS1820 DIGITAL THERMOMETER
The DS1820 digital thermometer is convenient for environmental
temperature measurement. It can measure temperature in the range
between -55Co and 125Co with +/-0.5Co accuracy. It must be prop-
erly placed in the 3-pin socket provided on the Easy PSoC4, as
marked on the board (see Figure 19). Otherwise, the DS1820 could
be permanently damaged.
16
Figure 18 DS1820 digital thermometer
Figure 19 DS1820 digital thermometer circuit diagram
DS1820 socket
LED
S
LEDs
Light Emitting Diode (LEDs) are compo-
nents used for displaying pin digital
state. The EasyPSoC4 has 64 LEDs
connected to the microcontroller ports:
PORT0, PORT1, PORT2, PORT3,
PORT4, PORT5, PORT6 and PORT7.
LEDs can be enable/disable using the
appropriate switch of the DIP switch
SW4 depending on port you want to
use.
17
Figure 20 LEDs
Figure 21 LEDs circuit diagram
PUSH BUTTONS
The Easy PSoC4 has 64 push buttons which can be
used to change states of digital inputs on the
microcontroller ports. There is also one red push-
button that acts as a RESET.
Figure 23 illustrates connection between push but-
tons and PORT0 and PORT1 as well as reset but-
ton connection. There are six more ports not shown
on this circuit diagram, but connected to push but-
tons in the same way as PORT0 and PORT1.
PU
SH
BU
TT
ON
S
18
Figure 23 Push buttons circuit diagram
Figure 22 Push buttons
2X16
CH
AR
AC
TE
R L
CD
2X16 CHARACTER LCD
A standard character LCD is probably the most widely used data visualization component. It usual-
ly displays messages in two lines, containing up to 16 alphanumeric characters each. The charac-
ter LCD communicates with the microcontroller via 4-bit data bus. Figure 25 illustrates its connec-
tion to the microcontroller.
Note: Have in mind that LCD should be placed or removed from the Easy PSoC4A only after the power
supply is turned off. Otherwise, it could be permanently damaged.
19
Figure 24
Figure 25
2x16 LCD in 4-bit mode
2x16 LCD circuit diagram
GR
AP
HIC
LC
D
GRAPHIC LCD
A graphic LCD (GLCD) provides an advanced method for dis-
playing visual messages. While a character LCD can display
only alphanumeric characters, a GLCD can be used to dis-
play messages in the form of drawings and bitmaps. The
most commonly used graphic LCD has the screen resolution
of 128x64 pixels.
The GLCD contrast can be adjusted using the potentiometer P4
placed next to GLCD.
Note: Have in mind that GLCD should be placed or removed from the Easy PSoC4 development system only
after the power supply is turned off. Otherwise, it could be permanently damaged.
20
Figure 28 GLCD circuit diagram
Figure 26 GLCD contrast adjustment potentiometer
GLCDFigure 27
TO
UC
H P
AN
EL
21TOUCH PANEL
Touch panel is a thin self-adhesive, transparent panel
that could be placed over the screen of graphic LCD. It
consists of two separate foils which form a “sandwich”
structure. It is very sensitive to press so that even a soft
touch causes some changes on the output signal. It is
used in various user-friendly devices in combination with
graphic LCD. Connector CN4 enables this device to be
connected to on-board touch panel controller the active
part of which consists of 5 discrete transistors. Four
switches of the DIP switch SW3 enable or disable con-
nection between this controller and P0[2], P0[3], P3[4]
and P3[4] pins.
Figure 29 Touch panel
Figure 31 Touch panel circuit diagram
Figure 30 Touch panel controller
A/D CONVERTER TEST INPUTS
A/D conversion has a wide range of applications. The microcontroller takes an analog signal from
its input pin and converts it into a digital value. Basically, it is possible to measure any analog sig-
nal that fits in the range acceptable by the microcontroller. As for the Easy PSoC4, this range is
between 0 and 5V.
The Easy PSoC4 development system has three
potentiometer used to adjust the level of analog sig-
nals in order to test the operation of analog-to-digi-
tal converter (ADC). The potentiometer outputs
have voltage in the range of 0-5V. These analog sig-
nals can be connected to three different analog
input pins simultaneously. Jumper groups J3, J4
and J5 are used for connecting potentiometer P1,
P2 and P3 to the appropriate MCU pins.
Figure 32 A/D converter test inputs
Figure 33 A/D converter test inputs circuit diagram
A/D
CO
NV
ER
TE
R T
ES
T I
NP
UT
S
22
DIR
EC
T P
OR
T A
CC
ES
S C
ON
NE
CT
OR
S
DIRECT PORT ACCESS CONNECTORS
All microcontroller input/output pins can be accessed via
IDC10 connectors (2x5) placed along the right side of the
board. For each microcontroller port there is one connector
providing up to eight port pins and two additional pins con-
nected to VCC and GND.
These connectors can be used to connect
the system to external peripherals such as
Serial Ethernet, Compact Flash, MMC/SD,
ADC, DAC, CAN, RTC, RS-485 etc. If on-
board and external peripherals use the
same pins then on-board peripherals must
be disconnected from the microcontroller
by setting the appropriate jumpers. The
connectors can also be used for attaching
logic probes or other test equipment.
23
Figure 35Direct port access flat cable connection Figure 34 Direct port access
Figure 36 Direct port access circuit diagram
MU
LTIM
ED
IA C
AR
D (
MM
C/S
D)
MULTIMEDIA CARD (MMC/SD)
MMC card is used as a data storage media for portable devices. With MMC reader you can easily trans-
fer data from MMC card to your PC. The microcontroller placed on the Easy PSoC4 communicates
with Multi Media Card via SPI communication.
To enable MMC card it is necessary to turn on switch 8 of the DIP switch SW1 and switches 6, 7
and 8 of the DIP switch SW2. In this way, MMC Chip Select line (MMC-CS) and SPI communica-
tion lines (SCK, MISO and MOSI) are connected with the microcontroller. The operating voltage of
the Easy PSoC4 is 5V DC, whereas that of MMC card is 3.3V DC. For this reason, there is an on-
board voltage regulator provided with MMC card (MC33269DT-3.3). Data lines connecting the
microcontroller and MMC card must also be adjusted to 3.3V It is done using resistor voltage
dividers shown in Figure 38.
24
Figure 37 MMC/SD (multimedia card)
EasyPSoC4 Expand your development
system with our extra
boards:
Package content:
Development system: EasyPSoC4 with CY8C27643-24P included
CD: mikroE product CD with software
Cables: USB and RS-232 cable
Documentation: User manual for EasyPSoC4, driver installation guide Installing USB drivers
System specifications:
USB programmer: USB type B
Power supply: External AC/DC 8-16V
PC over USB cable (5V DC)
Power consumption: >100mA (depends on connected peripherals)
Size: 25 x 21cm (9,8 x 8,2 inch)
Weight: 393g (0.866 lbs)
MikroDRIVE board
Empty MCU cards
MCU cards with soldered
microcontroller
mikroBuffer Board
... and many others. Please,
visit our website:
www.mikroe.com