D2-D5 RENESAS [Renesas Technology Corp], D2-D5 Datasheet

no-image

D2-D5

Manufacturer Part Number
D2-D5
Description
Sample Program (Electronic Desktop Calculator)
Manufacturer
RENESAS [Renesas Technology Corp]
Datasheet
1.
(R0K33026AS000BE) and an extension board.
2.
REJ05B0812-0120 Rev.1.20
M16C/26A Group
Sample Program (Electronic Desktop Calculator)
This sample program provides the functionality of an electronic desktop calculator by using the Renesas Starter Kit for M16C/26A
The example described in this document applies to the microcomputers listed below:
This sample program runs on the Renesas Starter Kit for M16C/26A (R0K33026AS000BE).
Prepare an extension board available for the Renesas Starter Kit or create a circuit similar to the one shown in the circuit diagram on
page 15 and then connect it to the Starter Kit.
This program uses RSK_LIB. For details about RSK_LIB, see the RSK_LIB reference manual. (RSK_LIB is the library software
provided for use with the Renesas Starter Kit for M16C/26A.)
Input key
Summary
Introduction
Microcomputers: M16C26A
Calculation result display
2007.11
The extension board used here is a product
from PI System Co., Ltd.
Application Notes
Page 1 of 18

Related parts for D2-D5

D2-D5 Summary of contents

Page 1

M16C/26A Group Sample Program (Electronic Desktop Calculator) Summary 1. This sample program provides the functionality of an electronic desktop calculator by using the Renesas Starter Kit for M16C/26A (R0K33026AS000BE) and an extension board. 0 Input key Introduction 2. The example ...

Page 2

Port Arrangement 3. The key matrix and the buzzer are the facilities mounted on an extension board for the Renesas Starter Kit. To use these facilities, connect an extension board to the Starter Kit. Key matrix 10MHz REJ05B0812-0120 Rev.1.20 Sample ...

Page 3

Operational Outline 4. Calculation results are shown on liquid crystal display. The display shows the result of operation when calculation results are within 7 digits (from −9999999 to 9999999) or “E” when calculation results are equal to or more than ...

Page 4

Operational Specification 5. Example for 1  (1) The display shows the string “calc” and the numeral “0” immediately after the reset switch is pressed. ÷ × ...

Page 5

The “0” key is entered. ÷ × (6) The “=“ key is entered. ÷ × ...

Page 6

Definition of the RSK Functionality and the RSK_LIB APIs and Common Functions Used by the 6. Calculator 6.1 Definition of the RSK Functionality RSKdefine.h file In this application, the following functionalities (those shown in red) are set. /********************************************************* The boot ...

Page 7

APIs and Common Functions Used ApiStatusType RL_SetTimerReq( unsigned int TimerValue, char TimerMode, int *TimerNo, int *ERcode ); ApiStatusType RL_StartTimer( int TimerNo, int *ERcode ); ApiStatusType RL_CheckTimer( int TimerNo, int *ERcode ); ApiStatusType RL_Get_Key( int *Inkey, int *ERcode ); ApiStatusType ...

Page 8

Flowchart 7. Electronic desktop Clear display on LCD Show the initial screen Request timer setup Start timers Input keys Process buzzer Process calculations Process calculation results REJ05B0812-0120 Rev.1.20 Sample Program (Electronic Desktop Calculator) 2007.11 M16C/26A Group Page ...

Page 9

Tutorial 8. 1 Launch the HEW by double-clicking its icon. 2 Change the session name from “default Session” to “SessionM16C_E8_System.” REJ05B0812-0120 Rev.1.20 Sample Program (Electronic Desktop Calculator) 2007.11 M16C/26A Group Page ...

Page 10

Select “M30260F8A” for Device. Select “Download emulator firmware” for Mode. REJ05B0812-0120 Rev.1.20 Sample Program (Electronic Desktop Calculator) 2007.11 M16C/26A Group Page ...

Page 11

Check the box labeled “Power supply is carried out. (MAX 300mA)” and then select “5.0V.” REJ05B0812-0120 Rev.1.20 Sample Program (Electronic Desktop Calculator) 2007.11 M16C/26A Group Page ...

Page 12

In the program and the work RAM text boxes of Firmware Location Address, enter “FA0” and “0B8” respectively. Leave the box labeled “Debug a program using the WDT” unchecked. REJ05B0812-0120 Rev.1.20 Sample Program (Electronic Desktop Calculator) 2007.11 M16C/26A Group ...

Page 13

Choose Download from the Debug tab and download a module. The upper-side choices for Download show the location from which a project was downloaded. REJ05B0812-0120 Rev.1.20 Sample Program (Electronic Desktop Calculator) 2007.11 M16C/26A Group Page ...

Page 14

Click “Start after Reset” to start program execution. 7 Please do "Cancellation" when "The file is opened" window opens. REJ05B0812-0120 Rev.1.20 Sample Program (Electronic Desktop Calculator) 2007.11 M16C/26A Group Page ...

Page 15

... Circuit Diagram 9. Part List 10. Part name Part No. Tact switch SW1 -SW16 Switching diode PCB header JA1,JA2 REJ05B0812-0120 Rev.1.20 Sample Program (Electronic Desktop Calculator) Q’ty Manufacturer Type number 16 OMRON B3FS-1000P 4 ROHM 1SS355TE-17 2 Molex 10-88-1261 2007.11 M16C/26A Group Value Remark 26-pin Male, 2-row, vertical type ...

Page 16

Web Sitet 11. Renesas Technology Web site http://www.renesas.com/ REJ05B0812-0120 Rev.1.20 Sample Program (Electronic Desktop Calculator) 2007.11 M16C/26A Group Page ...

Page 17

Revision History Rev. Date of issue 1.00 2006.06.30 1.10 2007.07.12 1.20 2007.11.29 REJ05B0812-0120 Rev.1.20 Sample Program (Electronic Desktop Calculator) Content of revision Page - First revision issued - Contents of presentation improved - RSK_LIB APIs supported 2007.11 M16C/26A Group Points ...

Page 18

REJ05B0812-0120 Rev.1.20 Sample Program (Electronic Desktop Calculator) 2007.11 M16C/26A Group Page ...

Related keywords