MB95560H/570H/580H Series
8-bit Microcontroller
8FX Family Starter Kit MB2146-510-01-E
Setup Guide
Doc. # 002-05587 Rev. *A
Cypress Semiconductor
198 Champion Court
San Jose, CA 95134-1709
Phone (USA): 800.858.1810
Phone (Intnl): +1.408.943.2600
www.cypress.com
Copyrights
Copyrights
© Cypress Semiconductor Corporation, 2011-2016. This document is the property of Cypress Semiconductor Corporation
and its subsidiaries, including Spansion LLC ("Cypress"). This document, including any software or firmware included or referenced in this document ("Software"), is owned by Cypress under the intellectual property laws and treaties of the United
States and other countries worldwide. Cypress reserves all rights under such laws and treaties and does not, except as specifically stated in this paragraph, grant any license under its patents, copyrights, trademarks, or other intellectual property
rights. If the Software is not accompanied by a license agreement and you do not otherwise have a written agreement with
Cypress governing the use of the Software, then Cypress hereby grants you a personal, non-exclusive, nontransferable
license (without the right to sublicense) (1) under its copyright rights in the Software (a) for Software provided in source code
form, to modify and reproduce the Software solely for use with Cypress hardware products, only internally within your organization, and (b) to distribute the Software in binary code form externally to end users (either directly or indirectly through resellers and distributors), solely for use on Cypress hardware product units, and (2) under those claims of Cypress's patents that
are infringed by the Software (as provided by Cypress, unmodified) to make, use, distribute, and import the Software solely
for use with Cypress hardware products. Any other use, reproduction, modification, translation, or compilation of the Software
is prohibited.
TO THE EXTENT PERMITTED BY APPLICABLE LAW, CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, WITH REGARD TO THIS DOCUMENT OR ANY SOFTWARE OR ACCOMPANYING HARDWARE, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. To the extent permitted by applicable law, Cypress reserves the right to make changes to this document without further notice. Cypress does not assume any liability arising out of the application or use of any product or circuit described in
this document. Any information provided in this document, including any sample design information or programming code, is
provided only for reference purposes. It is the responsibility of the user of this document to properly design, program, and test
the functionality and safety of any application made of this information and any resulting product. Cypress products are not
designed, intended, or authorized for use as critical components in systems designed or intended for the operation of weapons, weapons systems, nuclear installations, life-support devices or systems, other medical devices or systems (including
resuscitation equipment and surgical implants), pollution control or hazardous substances management, or other uses where
the failure of the device or system could cause personal injury, death, or property damage ("Unintended Uses"). A critical
component is any component of a device or system whose failure to perform can be reasonably expected to cause the failure
of the device or system, or to affect its safety or effectiveness. Cypress is not liable, in whole or in part, and you shall and
hereby do release Cypress from any claim, damage, or other liability arising from or related to all Unintended Uses of Cypress
products. You shall indemnify and hold Cypress harmless from and against all claims, costs, damages, and other liabilities,
including claims for personal injury or death, arising from or related to any Unintended Uses of Cypress products.
Cypress, the Cypress logo, Spansion, the Spansion logo, and combinations thereof, PSoC, CapSense, EZ-USB, F-RAM, and
Traveo are trademarks or registered trademarks of Cypress in the United States and other countries. For a more complete list
of Cypress trademarks, visit cypress.com. Other names and brands may be claimed as property of their respective owners.
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
2
Contents
1. Product Overview
1.1
1.2
1.3
1.4
1.5
Objective and Deliverable ............................................................................................7
System Block ...............................................................................................................7
Handling Precautions...................................................................................................8
Feature ........................................................................................................................8
Hardware Setup...........................................................................................................8
2. BGMA Manual
2.1
2.2
2.3
2.4
2.5
25
Topic List ...................................................................................................................25
Project Structure ........................................................................................................25
Source Code File Description ....................................................................................26
5. Development Platform Quick Start
5.1
5.2
5.3
16
EV board Overview....................................................................................................16
Function List .............................................................................................................17
EV-board Schematic..................................................................................................18
HW Module Description and Jumper settings............................................................19
4. Sample Code Manual
4.1
4.2
4.3
9
BGMA Overview ..........................................................................................................9
Function List ..............................................................................................................10
IDC10 Interface Description.......................................................................................10
BGM Adapter USB Configuration ..............................................................................10
LED description .........................................................................................................14
3. EV board Introduction
3.1
3.2
3.3
3.4
7
29
Tools Setup Sequence ..............................................................................................29
Open Project and Start Debug...................................................................................29
Operation Precautions ...............................................................................................29
6. Additional Informations
30
Revision History
31
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
3
Preface
Thank you for purchasing the New 8FX Family Starter Kit: MB2146-510-01-E*1.
This product is a starter kit for New 8FX MB95560H/570H/580H series, which comes with MB214607-E (New 8FX Family All Series MCU BGM Adaptor)*2, MB2146-510-E (New 8FX Family
MB95560H/570H/580H Series Evaluation Board)*3, and F2MC8L/8FX Family SOFTUNE
Professional Pack Evaluation Version*4.
This manual explains how to use the Starter Kit. Be sure to read this manual before using the
product.
For mass production/evaluation MCUs for this product, consult with sales representatives or support
representatives.
*1Referred below as the “Starter Kit”.
*2Referred below as the “BGMA”.
*3Referred below as the “EV-Board”.
*4Referred below as the “SOFTUNE”.
SOFTUNE is a trademark of Cypress Semiconductor Limited, Japan.
■Handling and use
Handling and use of this product and notes regarding its safe use are described in the manuals for
products bundled with the Starter Kit.
Follow the instructions in the manuals to use this product.
Keep this manual at hand so that you can refer to it anytime during use of this product.
■European RoHS compliance
Products with a -E suffix on the part number are European RoHS compliant products.
■Notice on this document
All information included in this document is current as of the date it is issued. Such information is
subject to change without any prior notice.
Please confirm the latest relevant information with the sales representatives.
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
4
Preface
■Caution of the products described in this document
The following precautions apply to the product described in this manual.
WARNING
Indicates a potentially hazardous situation which could result in death or
serious injury and/or a fault in the user’s system if the product is not used
correctly.
Electric shock,
Damage
Before performing any operation described in this manual, turn off all the
power supplies to the system.
Performing such an operation with the power on may cause an electric
shock or device fault.
Electric shock,
Damage
Once the product has been turned on, do not touch any metal part of it.
Doing so may cause an electric shock or device fault.
CAUTION
Cuts, Damage
Cuts
Damage
Damage
Damage
Damage
Indicates the presence of a hazard that may cause a minor or moderate
injury, damages to this product or devices connected to it, or may cause
to loose software resources and other properties such as data, if the device is not used appropriately.
Before moving the product, be sure to turn off all the power supplies and
unplug the cables. Watch your step when carrying the product. Do not
use the product in an unstable location such as a place exposed to strong
vibration or a sloping surface.
Doing so may cause the product to fall, resulting in an injury or fault.
The product contains sharp edges that are left unavoidably exposed,
such as jumper plugs.
Handle the product with due care not to get injured with such pointed
parts.
Do not place anything on the product or expose the product to physical
shocks. Do not carry the product after the power has been turned on.
Doing so may cause a malfunction due to overloading or shock.
Since the product contains many electronic components, keep it away
from direct sunlight, high temperature, and high humidity to prevent condensation. Do not use or store the product where it is exposed to much
dust or a strong magnetic or electric field for an extended period of time.
Inappropriate operating or storage environments may cause a fault.
Use the product within the ranges given in the specifications.
Operation over the specified ranges may cause a fault.
To prevent electrostatic breakdown, do not let your finger or other object
come into contact with the metal parts of any of the connectors. Before
handling the product, touch a metal object (such as a door knob) to discharge any static electricity from your body.
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
5
Preface
Damage
Damage
Damage
Damage
When turning the power on or off, follow the relevant procedure as described in this document.
Before turning the power on, in particular, be sure to finish making all the
required connections. Furthermore, be sure to configure and use the
product by following the instructions given in this document.
Using the product incorrectly or inappropriately may cause a fault.
Always turn the power off before connecting or disconnecting any cables
from the product. When unplugging a cable, unplug the cable by holding
the connector part without pulling on the cable itself. Pulling the cable itself or bending it may expose or disconnect the cable core, resulting in a
fault.
Because the structure of the MCU socket does not allow an evaluation
MCU to be mounted in the incorrect orientation, be very careful of the orientation of the evaluation MCU when mounting it.
Inserting the evaluation MCU in the wrong orientation may damage the
MCU, causing the MCU to become faulty.
Because the product has no casing, it is recommended that it be stored
in the original packaging. Transporting the product may cause a damage
or fault. Therefore, keep the packaging materials and use them when reshipping the product.
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
6
1.
Product Overview
This product is a set of Starter Kit of MB95560H/570H/580H series. It is composed of a BGMA and
an EV-board. Combining the SOFTUNE Workbench on PC, the Starter kit enables the quick start of
development before the user system is ready.
1.1
Objective and Deliverable
The Starter kit provides users a complete development platform. Before start using the Starter Kit,
make sure that the following devices are placed in the package:
1.2
■
BGMA : 1
■
EV-board : 1
■
USB cable: 1
■
CD-ROM (SOFTUNE user manuals, sample code): 1
■
Hardcopy (China RoHS report, quick start guide) : 1
System Block
To setup a debugging system, connect a PC, a BGMA and an EV-board together as shown below:
Figure 1-1. BGMA overview
Easy design and study MB95560/
570H/580H MCU with BGMA and
SOFTUNE
Sample
code
Host PC
SOFTUNE
IDE
BGMA
MB95560H/570H/580H
MCU
USB
Target Board
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
7
Product Overview
1.3
Handling Precautions
The Starter Kit can be used in connection with its bundled products. To ensure correct use of this
product in a proper environment, observe the following guideline:
Follow the instructions described in each manual for the bundled product to use this product.
1.4
Feature
The MB95560H/570H/580H Series starter kit is the best for a performance and functional evaluation,
and a check of operation before including MB95560H/570H/580H Series in a user's system.
Below, the feature of the BGM debugger for MB95560H/570H/580H Series is shown.
1.5
■
Microcomputer operation voltage. It corresponds to +2.4V to +5.5V.
(The maximum and minimum of microcomputer operation voltage and frequency of operation differs with each MCU. refer to the documents (a data sheet, hardware manual, etc.) of each device
relation for the operation voltage and frequency of MCU of operation.)
■
Compact development environment, a light and small BGM Adaptor.
■
Since a monitor program is performed in exclusive memory space, it does not consume user
memory space.
■
Continuation execution, step execution and break correspondence.
■
It connects with a host computer by the USB interface.
Hardware Setup
In the hardware setup procedure, you configure and connect the hardware products. This chapter
includes the configuring and connecting procedure for each product in order. Check the contents and
complete the hardware setup.
■
Configuring EV-Board
■
Connection of each product
❐
Connecting BGMA and EV-board
❐
Connecting EV-Board power supply
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
8
2
2.1
BGMA Manual
BGMA Overview
Below is the close look of the BGMA.
It provides a debug platform for the New 8FX MCU (except MB95200H/210H/220H) in a small size
(58mm (W) 90mm (D) 20mm (H)) .
Figure 2-1. BGMA overview
BGM Adaptor: MB2146-07-E
BGM Adaptor
BGM Adaptor Power LED
BGM Adaptor status LED
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
9
BGMA Manual
2.2
Function List
Function description
Remarks
Support MB95560 Series MCU
MCU MAX machine clock: 16.25 MHz
MCU power voltage: 2.4V*2 to 5.5V*1
Break pointer
256 software breakpoints
3 hardware breakpoints
USB interface to PC/SOFTUNE
Compatible to USB protocol version 2.0
1-Line UART interface to the MB95560
Series MCU
The Baud rate is 62,500 bps, and can be up to
500kbps (set in SOFTUNE)
Support the MCU flash programming for
engineering development
The MAX program and read speed can be arrived to
4000B/s | 5000B/s roughly.
*1The value varies depending on the operating frequency, the machine clock or the analog guaranteed range.
*2The value is 2.88 V when the low-voltage detection reset is used.
2.3
IDC10 Interface Description
Pin Number
2.4
Pin Name
Description
1
UVCC
Target MCU Vcc
2
GND
Target MCU Vss
3
RSTIN
Target MCU reset input
4
RSTOUT
Target MCU reset output
5
RSV
Reserved
6
POUT3V
Supply 3V power out, when this function enabled
7
RSV
Reserved
8
DBG
Target MCU debug pin
9
RSV
Reserved
10
RSV
Reserved
BGM Adapter USB Configuration
The BGMA is provided with a USB cable. Connect the BGMA to a PC with a USB cable. If the connection is right, the following window will pop up. Follow the instructions displayed, and then click
“Next”,
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
10
BGMA Manual
Figure 2-2. Install BGMA in Windows (1)
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
11
BGMA Manual
Select “Install from a list or specific location (Advanced)", then click “Next",
Figure 2-3. Install BGMA in Windows (2)
Select “…\Drivers” from the folder where SOFTUNE is installed, click “Next”,
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
12
BGMA Manual
Figure 2-4. Install BGMA in Windows (3)
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
13
BGMA Manual
Select BGMA (MB2146-07) as displayed below, and then click “Next”,
Figure 2-5. Install BGMA in Windows (4)
Windows will install the driver automatically. Click “Finish” after the driver has completed the
installation normally. Then users can find the BGMA is recognized as MB2146-07 in Windows
system.
Figure 2-6. BGMA is installed in Windows
2.5
LED description
First, only plug USB cable to PC, checking the Power LED on BGMA turns Green.
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
14
BGMA Manual
Figure 2-7. BGMA Power LED (1)
USB Plugged to PC
Green
Second, plug IDC10 cable to the EV-board (target MCU board), then turn on EV-board. After that
check Power LED on the BGMA turns Orange.
Figure 2-8. BGMA Power LED (2)
5V Power Supplied
IDC Cable
Orange
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
15
3.
3.1
EV board Introduction
EV board Overview
MB95560 MCU EV-board is provided as a user-friendly introductory and evaluation platform for the
MB95560H/570H/580H MCU Family microcontrollers. Below is a close look of EV-board.
Figure 3-1. EV-board Overview
Jumpers left open when debug
Debug Interface to BGMA
Buzzer circuit
Power supply either
from batteries (below
the PCB) or from
2-pin header
Potentiometer to
MCU AD pin
Circuit for
LIN-UART Peripheral
Communication
MB95560H/570H/580H
MCU
LEDs to MCU
I/O port pins
Jumpers to set MCU pins connected
to external circuits or not
Switch circuit to MCU External Interrupt pins
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
16
EV board Introduction
3.2
Function List
The EV-board consists of a board and a sample firmware. The board provides a useful platform for
using the MCU and its peripherals. It is a useful development platform together with a BGMA and a
SOFTUNE. It features the following functions,
■
Clock and sub-clock
■
USB 5V power IF, external 5V power IF and the battery
■
Reset circuit and reset key
■
Provide IDC10 debug interface
■
LEDs for general use, LED1 indicates DBG pin work status
■
Provide one buzzer to demonstrate timer output
■
2 keys for general use
■
Potentiometer and temperature sensor
■
RS-232 level converter and DB9 interface (MAX232)
■
LIN circuit reserved
■
SIO 4 pins reserved
■
All MCU ports are easy accessible through test pins
■
Optional Starter kit to support each available MCU packages
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
17
1
2
Y1
22pF/25V
3
1
SHELL
J?
2
D3
1
C15
10uF/25V
1n4004
1M
R24
BL M21PG600
+5V
VI N
IC4
0.01uF/25V
0.1uF/25V
C8
C
C11+5V
PF0
PF1
PG2
PG1
J2
PF2
JUMPER2X4
SW3
2
4
6
8
1
C7
3
5
22pF/25V
22p
F/25V 7
22pF/25V
4MHz
C5
22pF/25V
BLM21PG600
L3
22pF/25V
C9
Y2
32.768kHz
C10
1
P12
L1
VUSB
DBL M21PG600
D+
ID
L2
USBGND
BT1
AA*4
2
3
DC Socket
CN6
1
2
3
4
5
6
7
8
9
5V
DBG
3.3V
UVCC_EV
GND
RSTIN
RSTOUT
PF0
PF1
GND
PG2
PG1
+5V
C
PF2
P62
P63
CN7
USB MINI
TEST PIN
1
2
3
4
5
6
7
8
9
10
CN3
IIDC10
1
2
3
4
5
6
7
8
9
10
2
PF1
5
PG1
P
+5V
8
9
PF2
P62
P63 10
7
C
6
4
PG2
3
1
MB95560- SOP
TP2
TP1
+5V
R23
3
VOUT
+
1K
C12
C22
22u/50V 0.1uF/25V
TO11/P63
TO10/P62
RSTX/PF2
Cpin
VCC
X0A/P G1
X0A/PG1
X1A/P G2G2
X1A/PG2
VSS
X1/PF1
F1
X0/PF0
IC1
C2
0.1uF/25V
R4
10K
PF0
100/1W
R28
S3
SW-PB
+5V
LP38691-5
GND
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
2
LED
LED
LED
LED
1K
R9
1K
R8
1K
R5
1K
R1
P06/INT06/TO01
P07/INT07
P12/ECO/DBG
LED4
LED3
LED2
LED1
LED5
LED
Q1
2SC2412K
BUZZER
BUZ1
R20
1K
R18
1K
+5V
4.7K
R26
Buz
P64/EC1
P00/AN00
P01/AN01
P02/I
P02/INT02/AN02/SCK
P03/INT03/AN03/SOT
P04/INT04/AN04/SI N/HCL K1/EC0
P04/INT04/AN04/SIN/HCLK1/EC0
P05/INT05/AN05/TO00/HCL K2
P05/INT05/AN05/TO00/HCLK2
LED4
LED3
LED2
LED1
+5V
+5V
R12
4.7K
VR1 4.7K
10K
VR3
11 P64
12 P00
13 P01
14 P02
15 P03
16 P04
17 P05
18 P06
19 P07
20 P12
+5V
+5V
1
3
5
7
9
11
13
15
17
19
2
4
6
8
10
12
14
16
18
20
R25
R19
1
3
1
3
J3
AN01
AN00
C13
C14
0.1uF/25V 0.1uF/25V
2
S2
C17
10K
R7
10K
R3
0.1uF/50V
0.1uF/50V
C18
0.1uF/50V
33K
R11
4.7K
R6
S1
4.7K
R2
Vbat
R10
10K
LED1
INT07
J5
INT06
LED2
R15 2
SIN
0
SOT
R16
0
J6
SCK
R17
0
AN01
AN00
LED3
JUMPER 2X10
R27 4.7K
4.7K
4.7K
P12
P07
P06
P05
P04
P03
P02
P01
P00
P64
SW2
R14
4.7K
+5V
0.1uF/25V
I
INT06
C3
0.1uF/25V
I
INT07
C1
5
11
10
12
9
3
4
1
C2T1in
T2in
R1out
R2out
C1C2+
C1+
6
8
1K
R21
4.7K
R13
IC3
MAX232
T1out
T2out
R1in
R2in
V-
V+
C20
14
7
13
8
1
2
3
4
5
6
7
8
9
10
CN2
1
6
2
7
3
8
4
9
5
RS232
CN5
LIN
1
2
3
CN4
C23
22u/25V
1n4004
TEST PIN
SLAVE
OFF
Vbat
D2
C19
0.1uF/50V
0.1uF/50V
6
2
J4
+
P12
P07
P06
P05
P04
P03
P02
P01
P00
P64
MASTER
ON
C6
220pF/100V
LIN
INH
1n4148
C16+5V
TJA1020
EN
WAK E
WAKE
RXD
TXD
0.1uF/50V
2
3
1
4
IC2
J17
D1
C4
0.1uF/25V
+5V
7
GND V S
5
16
V CC
GND
3.3
15
CN1
EV board Introduction
EV-board Schematic
Figure 3-2. EV-board Schematic
18
EV board Introduction
3.4
HW Module Description and Jumper settings
3.4.1
Power Module
EV-board has 4 kinds of power supply for user to choose. Please read below instructions before
using.
■
DC Adaptor: 9V DC:
Output voltage: 9V
Connection: Connector (CN6)
■
Battery:
QTY: 4PCS;
Model: AA;
Nominal voltage: 1.5V.
Connection: Socket for Battery
■
External Power Supply:
There are 2 test points (TP1&2) on EV-board which can supply power to target board (EV-board).
Power on method: short L3 on EV-board; then connect anode of DC power to TP1 (MCU Vcc)
and cathode to TP2 (MCU GND).
■
USB cable:
The Mini-B USB receptacle is only for supplying power to EV board by PC USB port. The current
and power of this method is limited in 100mA/0.5W.
Please make sure to supply stable power via the Mini-B USB receptacle while operation.
If any of the power supplies is connected to the EV-board correctly, power LED (LED5) on the
EV-board will be on.
Figure 3-3. Power Module
9V
CN6
J1
BAT.
CN7
LED5
The following two power supplies are recommended. Please follow the settings below,
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
19
EV board Introduction
Table 3-1. Power Supply Selection
Power supply
Header name
Settings
9V
4 AA batteries from BT1 on
the back of the EV-board.
J1
J1: BAT.
BAT.
9V
9V DC from CN6
J1
J1: 9V.
BAT.
BGMA Interface
To start the debug using a BGMA, users shall connect IDC10 socket from the BGMA to CN1 on an
EV-board, and J2 shall be closed to enable reset key S3.
Figure 3-4. Debug Interface.
CN1
J2
S3
Table 3-2. J2 Setting
MCU Mode
Debug, normal mode
Header name
Settings
J2
J2
This setting is effective just when BGMA (MB2146-07-E) is connecting to STK board (MB2146-510E). The other BGMA circuit is different from MB2146-07-E. When STK board connects to other
BGMA that may broke the MCU of STK board, so please use the products in this package. For the
package information please refer to “1.1 Objective and Deliverable”.
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
20
EV board Introduction
Clock Settings
The MB95560H/570H/580H series MCU uses an internal main CR as a clock source by default.
Users can select on-board crystal as a main clock and a sub-clock. Follow the settings below:
Table 3-3. SW3 Setting
Clock
Main clock
Header name
Settings
SW3: X1, X0
SW3
Sub-clock
SW3: X1A, X0A
SW3
Buzzer Module
A buzzer module is provided to demonstrate an 8/16 composite timer output (a continuous mode).
To enable buzzer module, follow the table below:
Table 3-4. SW1 Setting
Modules
Buzzer:
BUZ1
Header name
Settings
SW1: BUZ.
SW1
LED4 BUZ
A/D Module
VR1 and VR3 are to demonstrate a MCU A/D converter usage. Select VR1 or VR3 by the following
table.
VR1 is connected to MCU A/D channel 1, and VR3 is connected to MCU A/D channel 0.
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
21
EV board Introduction
Table 3-5. SW2 A/D Setting
MCU Mode
Header name
Settings
SW2
A/D:
SW2: VR1
VR1
LED3
VR3
VR1
SCK SOT SIN
ADC
LIN UART
LED2 S2 S1
KEY
SW2
A/D:
SW2: VR3
VR3
LED3
VR3
VR1
SCK SOT SIN
ADC
LIN UART
LED2 S2 S1
KEY
LED Module
There are four LEDs on EV-board to demonstrate the I/O function.
Enable LED2, LED3 and LED4 in the following table,
Table 3-6. SW2 LED Setting
Modules
Header name
Settings
SW2
SW2:
LED2, LED3
LED3
LED*:
VR3
VR1
SCK SOT SIN
ADC
LED2, LED3, LED4
LIN UART
LED2 S2 S1
KEY
SW1: LED4
SW1
LED4 BUZ
*LED module has four LEDs in total, but P12 (LED1) is not active in a debug mode using
BGMA.
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
22
EV board Introduction
Key Module
Key S1 and key S2 are provided to demonstrate an external interrupt function. Enable these two
keys by the following table.
Key S1 is connected to external Int7, and key S2 is connected to external Int6.
Table 3-7. SW2 Key Setting
Modules
Header name
Settings
SW2
Key:
S1, S2
SW2: S1, S2
LED3
VR3
VR1
ADC
SCK SOT SIN
LED2 S2 S1
LIN UART
KEY
Lin-UART Module
Lin-UART module can be configured as a LIN or an UART module. Enable each module by the following table.
The UART module features an RS232 transceiver and a standard DB9 interface with PC.
Lin module enables an easy setup of Master/Slave communication by a Lin bus.
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
23
EV board Introduction
Table 3-8. UART Setting
Modules
Header name
Settings
SW2
SW2: SOT, SIN
LED3
VR3
VR1
ADC
UART
SCK SOT SIN
LIN UART
RX
UART
J5: UART
LED2 S2 S1
KEY
LIN
J5
J6: UART
J6
UART
TX
LIN
SW2
SW2:
SCK, SOT, SIN
LED3
VR3
VR1
ADC
LIN*
J5: LIN
SCK SOT SIN
LIN UART
RX
UART
LED2 S2 S1
KEY
LIN
J5
J6: LIN
J6
UART
TX
LIN
*LIN module is optional; contact your local distributor for the EV-board with a LIN module.
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
24
4.
4.1
Sample Code Manual
Topic List
The following sample codes are provided with MB95560H/570H/580H MCU Starter Kit,
4.2
■
IO_LED project
In this example, the LED2 will be twinkle.
■
A/D_Potentiometer project
In this example, the 3 LEDs will display “on” or “off” according to the arrow direction of VR3.
■
Timer_Buzzer project (Continuous timer)
In this example, Buzzer will be on once by pressing Key S1; Buzzer will be on twice by pressing
Key S2.
■
ExInt_Key Project
Press Key S1, the 3 LEDs will be on in the following sequence:
...->LED4->LED3->LED2...
Press Key S2, the 3 LEDs will be on in the following sequence:
...->LED2->LED3->LED4...
■
UART project
In this example, the MCU works in an asynchronous mode.
(9,600bps, 1 stop bit, no parity)
After a reset, the MCU will send "Welcome to the LIN-UART (asynchronous mode) of
MB95560series (8FX)" to RS232 transceiver.
Then the MCU feedbacks any bytes it received.
■
SIO project
This example uses two EV-boards to demonstrate the SIO (synchronous mode) function.
(9600bps)
One MCU keeps sending data while the other keeps receiving. One LED is toggled to indicate the
communication is correct.
■
LIN slave
In this example, the MCU is running in a Lin Slave mode. After a reset, the MCU is waiting for
data from the Master. If the data is received correct, LED4 starts twinkling.
■
LIN master
In this example, the MCU is running in a Lin Master mode. After a reset, the MCU starts sending
data to a Slave. If the Master gets correct data from the Slave, the MCU restarts sending. While
sending data to the Slave, LED2 keeps twinkling.
Project Structure
The Sample code is organized by the following structure in each project. Here take IO_LED project
for example shown in Figure 4-1.
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
25
Sample Code Manual
Figure 4-1. I/O_LED Project Structure
4.3
Source Code File Description
Six files are available in each sample code source code folder shown below,
Figure 4-2. Source Code Files
4.3.1
Header Files
The MB95560.h and the _f2mc8fx.h are header files, included MB95560H/570H/580H MCU I/O registers definition;
Here take PDR0 for example. In MB95560.h, PDR0 is defined as below.
/* REGISTER BIT STRUCTURES */
#ifdef __IO_DEFINE
#pragma segment IO=IO_PDR0, locate=0x0
#endif
typedef union {
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
26
Sample Code Manual
__BYTEbyte;
struct {
__BYTE
P00:1;
__BYTE
P01:1;
__BYTE
P02:1;
__BYTE
P03:1;
__BYTE
P04:1;
__BYTE
P05:1;
__BYTE
P06:1;
__BYTE
P07:1;
__BYTE
P00:1;
__BYTE
P01:1;
__BYTE
P02:1;
__BYTE
P03:1;
__BYTE
P04:1;
__BYTE
P05:1;
__BYTE
P06:1;
__BYTE
P07:1;
PDR0STR
IO_PDR0;
} bit;
struct {
} bitc;
} PDR0STR;
__IO_EXTERN
#define
_pdr0
(IO_PDR0)
#define
PDR0
(IO_PDR0.byte)
#define
PDR0_P00
(IO_PDR0.bit.P00)
#define
PDR0_P01
(IO_PDR0.bit.P01)
#define
PDR0_P02
(IO_PDR0.bit.P02)
#define
PDR0_P03
(IO_PDR0.bit.P03)
#define
PDR0_P04
(IO_PDR0.bit.P04)
#define
PDR0_P05
(IO_PDR0.bit.P05)
#define
PDR0_P06
(IO_PDR0.bit.P06)
#define
PDR0_P07
(IO_PDR0.bit.P07)
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
27
Sample Code Manual
4.3.2
Startup.asm File
The Startup.asm is the MB95560H/570H/580H MCU initialization file including stack settings, register bank settings and watchdog settings etc;
4.3.3
Vectors.c File.
The Vectors.c contains the MB95560H/570H/580H MCU Interrupt vectors definition.
User can pre-set all interrupt control registers in function InitIrqLevels(). It can be used to set all interrupt priorities in static applications. For example, to set the external interrupt ch.0 to level 0, change
the following code:
ILR0 = 0xFF;
// IRQ0: external interrupt ch.0 | ch.4
// IRQ1: external interrupt ch.1 | ch.5
// IRQ2: external interrupt ch.2 | ch.6
// IRQ3: external interrupt ch.3 | ch.7
To
ILR0 = 0xFC;
// IRQ0: external interrupt ch.0 | ch.4
// IRQ1: external interrupt ch.1 | ch.5
// IRQ2: external interrupt ch.2 | ch.6
// IRQ3: external interrupt ch.3 | ch.7
And declare the interrupt function as in Vectors.c below,
... ...
__interrupt void external_int00 (void);
... ...
#pragma intvect external_int00 0 // IRQ0: external interrupt ch.0 | ch.4
Then user can write his own interrupt sub-routine in Main.C shown as
below.
/*--------------------- INTERRUPT SERVICE ROUTINE --------------------------*/
__interrupt void external_int00 (void)
{
//User code
}
4.3.4
Main.c File
Main.c contains the user code.
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
28
5.
5.1
Development Platform Quick Start
Tools Setup Sequence
Start the debugging system in the following sequence:
5.2
■
Connect a BGMA to the PC using a USB cable, confirm the LED on the BGMA is Green;
■
Connect an EV-board to BGMA IDC10 socket;
■
Select the EV-board power supply and turn on the EV-board, confirm the power LED on the
BGMA is Orange and the Power LED on the EV-board is on.
Open Project and Start Debug
Users can start a debug from a PC software SOFTUNE workbench in the following sequence. Here
take IO_LED project for example.
■
Start the SOFTUNE from "Startup Menu>Programs> SOFTUNE V3> FFMC-8L Family
SOFTUNE Workbench" in Windows;
■
Click "Open workspace" from "File" Menu in SOFTUNE;
■
Select "IO_LED.wsp" in "Open Space" window;
■
Click "Start debug" from "Debug" Menu.
If the entire procedure goes right, a debug will start normally.
5.3
Operation Precautions
■
All pins of MB95560H/570H/580H MCU are connected to Testing Pin on the EV-board. If the user
wants to test separate pin performance, do disconnect the header of related peripheral modules.
■
For the power of STK EV-board, do not use the different power supply (single-3 battery or 9V DC)
at the same time
■
Since the device and BGMA may be broken, please use the bundled BGMA with STK EV-board.
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
29
6.
Additional Informations
For more informations please visit our websites:
http://www.cypress.com/documentation/development-kitsboards/mb2146-510-01-e
Please contact your local support team for any technical question.
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
30
Revision History
Document Revision History
Document Title: MB95560H/570H/580H Series 8-bit Microcontroller 8FX Family Starter Kit MB2146-510-01-E
Setup Guide
Document Number: 002-05587
Revision
**
*A
ECN#
Issue Date
Origin of
Change
Description of Change
11/24/2011
HUAL
Initial release
5309214 05/16/2016
HUAL
Migrated to Cypress format
MB95560H/570H/580H Series MB2146-510-01-E Setup Guide, Doc. # 002-05587 Rev. *A
31