21.01.2014 Views

3.22EjemploDRM007 Co..

3.22EjemploDRM007 Co..

3.22EjemploDRM007 Co..

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Source <strong>Co</strong>de<br />

7.2 Include Files<br />

7.2.1 MR8IO.H<br />

;<br />

/*****************************************************************************\<br />

* <strong>Co</strong>pyright (c) 2002, Motorola Inc.<br />

*<br />

* Motorola <strong>Co</strong>nfidential Proprietary<br />

*<br />

* --------------------------------------------------------------------------- *<br />

* File name : mr8io.h *<br />

* Project name: Brushless DC Motor Drive with the MR8 Microcontroller<br />

*<br />

* --------------------------------------------------------------------------- *<br />

* Author : Jorge Zambada *<br />

* Email : Jorge.Zambada@motorola.com *<br />

* Department : Mexico Applications Lab - SPS *<br />

* *<br />

* Description : All the MCU registers and some bit mask values are declared<br />

*<br />

* in this document as defines to interface with most of the *<br />

* microcontroller registers and peripherals<br />

*<br />

\*****************************************************************************/<br />

/* PORTS section<br />

*/<br />

#define PORTA (*(volatile char*)(0x00)) /* port A */<br />

#define PORTB (*(volatile char*)(0x01)) /* port B */<br />

#define PORTC (*(volatile char*)(0x02)) /* port C */<br />

#define DDRA (*(volatile char*)(0x04)) /* data direction port A */<br />

#define DDRB (*(volatile char*)(0x05)) /* data direction port B */<br />

#define DDRC (*(volatile char*)(0x06)) /* data direction port C */<br />

/* A TIMER section<br />

*/<br />

#define TASC (*(volatile char*)(0x0E)) /* timer A status/ctrl register */<br />

#define TACNT (*(volatile int*)(0x0F)) /* timer A counter register */<br />

#define TACNTH (*(volatile char*)(0x0F) /* timer A counter high */<br />

#define TACNTL (*(volatile char*)(0x10)) /* timer A counter low */<br />

#define TAMOD (*(volatile int*)(0x11)) /* timer A modulo register */<br />

#define TAMODH (*(volatile char*)(0x11)) /* timer A modulo high */<br />

#define TAMODL (*(volatile char*)(0x12)) /* timer A modulo low */<br />

#define TASC0 (*(volatile char*)(0x13)) /* timer A channel 0 status/ctrl */<br />

#define TACH0 (*(volatile int*)(0x14)) /* timer A channel 0 register */<br />

#define TACH0H (*(volatile char*)(0x14)) /* timer A channel 0 high */<br />

#define TACH0L (*(volatile char*)(0x15)) /* timer A channel 0 low */<br />

#define TASC1 (*(volatile char*)(0x16)) /* timer A channel 1 status/ctrl */<br />

DRM007<br />

BLDC Motor <strong>Co</strong>ntrol Board for Industrial and Appliance Applications<br />

104 Source <strong>Co</strong>de MOTOROLA

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!