HTEB1

User manual

3 Examples

HTEB1 is provided with some demonstration code.

On the supplied CD-R you should find a complete prepared workspace for IAR-EWH8.

\examples\demoapp\demoapp.prj

Please copy the complete directory to your hard disk in a directory c:\H8TinyIAR, so you will finally have the following directory (per example) “c:\H8TinyIAR\examples\demoapp\” with all application notes included.

Then start IAR-Ewh8 and select “open existing workspace”. Select one of the projects and do your exercises.

For all projects we need the same header file containing some definitions and the include file for the target microcontroller H8/3664F. So if you want to work with these files don’t forget to include the file “mydefs.h” first in your project file:

#ifndef _MYDEFS_H_ #define _MYDEFS_H_

#include "ioh83664.h"

// select processortype here

#include "inh8.h"

 

#include "icclbutl.h"

 

#define CPU_CLK 9830400

// select clk for diff. calc.

#ifndef NULL

 

#define NULL 0x00

 

#endif

 

#ifndef FALSE

 

#define FALSE 0x00

 

#endif

 

#ifndef TRUE

 

#define TRUE 0x01

 

#endif

 

typedef unsigned char u8;

 

typedef unsigned int u16;

 

#endif

 

 

 

Issue 0.2

Page 32

07/2002

Page 32
Image 32
IBM H8 user manual Examples