Pond Electronics - Home of the µFlash876 & µFlash876B embedded controllers, µStack & µConnect Bus.

h83664 Module

This module does not include any precompiled code, however h83664.h contains a number of useful macro definitions.

Macros allowing direct access to H8 I/O registers

h83664.h defines a number of macros allowing access to the H8 I/O registers as if they were declared variables. For example:

// In uc3664.h the definition:

#define BRR    (*(volatile BYTE *) (0xffa9))
// allows direct access to the SCI baud rate register,   
// like so:

BRR=0x51;    // load the baud rate register for 9600 baud   

Please refer to the H8/3664 Hardware Manual for a description of the I/O register set.

 

Macros allowing bit access to H8 I/O registers

These macros allow efficient bit access to the H8 I/O register set. Note that the bset, bclr & bnot macros should only be used with the pre-defined bit designators in uc3664.h.

The format for bit designators is : RNAME_BNAME

Where RNAME is the register name & BNAME is the bit name. For example TSRW_OVF indicates the OVF (overflow) bit in the TSRW (Timer Status Register W) register. Please see the H8/3664 Hardware Manual for a full list of registers and bit names.

bset

void bset(RNAME_BNAME);

Set the bit specified by RNAME_BNAME.

bclr

void bclr(RNAME_BNAME);

Clear the bit specified by RNAME_BNAME.

bnot

void bnot(RNAME_BNAME);

Invert the bit specified by RNAME_BNAME

Macros for interrupt control

Allows control of the H8 global interrupt enable bit. Note that these macros are intended to control interrupts over short critical code segments. Other functions may also affect interrupt status, in particular you should not rely on the status of this bit across any library call.

disable

void disable();

Disable interrupts.

enable

void enable();

Enable Interrupts


Home | Products | Technical Info | How to Order | Contact Us | Links