Documente Academic
Documente Profesional
Documente Cultură
Target Device
H8/3687
Contents
1. 2. 3. 4. 5. 6. Specifications .................................................................................................................................... 2 Description of Functions ................................................................................................................... 2 Description of Operation ................................................................................................................... 3 Description of Software..................................................................................................................... 4 Flowcharts......................................................................................................................................... 5 Program Listing ................................................................................................................................. 6
REJ06B0112-0100Z/Rev.1.00
September 2003
Page 1 of 9
H8/300H Tiny Series Power-On Reset Operation using External Circuit 1. Specifications
A reset circuit (RC diode circuit) consisting of a resistor, capacitor and diode is connected to the H8/3687 externally to perform power-on reset operation. Figure 1.1 shows an example of connecting an external RC diode circuit.
2.
Description of Functions
In this sample task, an RC diode circuit is connected to the H8/3687 to perform power-on reset operation. Figure 2.1 is a block diagram of the RC diode circuit and H8/3687. Below the H8/3687 block diagram is described. Port data register 7 (PDR7) P74 of port 7 is set to 1 in order to confirm reset cancellation. Port control register 7 (PCR7) Sets P74 of port 7 to function as an output pin.
REJ06B0112-0100Z/Rev.1.00
September 2003
Page 2 of 9
H8/300H Tiny Series Power-On Reset Operation using External Circuit 3. Description of Operation
REJ06B0112-0100Z/Rev.1.00
September 2003
Page 3 of 9
H8/300H Tiny Series Power-On Reset Operation using External Circuit 4. 4.1 Description of Software Description of module
The module used in this sample task is described in table 1. Table 4.1 Description of module
Module name Main routine Label name main Function Output 1 from pin P74
4.2
Description of arguments
4.3
The internal registers used in this sample task are described below. PDR7
Bit 4
Address: 0xFFDA
Description Port data register 74 P74 = 0: Pin P74 output level Low P74 = 1: Pin P74 output level High
PCR7
Bit 4
Address: 0xFFEA
Description Port control register 74 PCR74 = 0: Set pin P74 as P74 input pin PCR74 = 1: Set pin P74 as P74 output pin
4.4
REJ06B0112-0100Z/Rev.1.00
September 2003
Page 4 of 9
H8/300H Tiny Series Power-On Reset Operation using External Circuit 5. Flowcharts
Main routine
REJ06B0112-0100Z/Rev.1.00
September 2003
Page 5 of 9
Program Listing
*/ */ */ */ */ */ */ */ */ */ */
/********************************************************************************************************************************/
/********************************************************************************************************************************/
#include
<machine.h>
/********************************************************************************************************************************/ struct BIT { unsigned char unsigned char unsigned char unsigned char unsigned char unsigned char unsigned char unsigned char }; b7:1; b6:1; b5:1; b4:1; b3:1; b2:1; b1:1; b0:1; /* bit7 */ /* bit6 */ /* bit5 */ /* bit4 */ /* bit3 */ /* bit2 */ /* bit1 */ /* bit0 */
/* Port Data Register 7 /* Port Data Register 7 bit4 /* Port Control Register 7 /* Port Control Register 7 bit4
*/ */ */ */
#pragma section
/* P
*/
REJ06B0112-0100Z/Rev.1.00
September 2003
Page 6 of 9
REJ06B0112-0100Z/Rev.1.00
September 2003
Page 7 of 9
H8/300H Tiny Series Power-On Reset Operation using External Circuit Revision Record
Description Rev. 1.00 Date Sep.29.03 Page Summary First edition issued
REJ06B0112-0100Z/Rev.1.00
September 2003
Page 8 of 9
REJ06B0112-0100Z/Rev.1.00
September 2003
Page 9 of 9