Christopher Allen Rubis

PORTD problem  MC13213

Discussion created by Christopher Allen Rubis on Dec 15, 2006
Latest reply on Dec 28, 2006 by Christopher Allen Rubis
Hi,

I can't compile if I enable portD (PTD7,PTD6,PTD5). Other ports are okey

here is my code

#include /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */
#include "MC9S08GT60.h"

#define PC0 PTCD_PTCD0
#define PC1 PTCD_PTCD1
#define PC2 PTCD_PTCD2
#define PC3 PTCD_PTCD3
#define PC4 PTCD_PTCD4
#define PC5 PTCD_PTCD5
#define PC6 PTCD_PTCD6
#define PC7 PTCD_PTCD7
#define PE0 PTED_PTED0
#define PE1 PTED_PTED1
#define ON 1
#define OFF 0
#define UP 1
#define DOWN 0

#define PD5 PTDD_PTDD5
#define PD6 PTDD_PTDD6
#define PD7 PTDD_PTDD7
#define PB0 PTBD_PTBD0
#define PB1 PTBD_PTBD1
#define PB2 PTBD_PTBD2
#define PB3 PTBD_PTBD3







void MCU_init(void); /* Device initialization function declaration */

void main(void) {

MCU_init(); /* call Device Initialization */




PTCDD=0xff;
PC0=OFF;
PC1=OFF;
PC2=ON;
PC3=ON;
PC4=ON;
PC5=ON;
PC6=ON;
PC7=ON;

PTEDD=0x03;
PE0=ON;
PE1=ON;

PTDDD=0xff;
PD5=OFF;
PD6=OFF;
PD7=OFF;

PTBDD=0x0F;
PB0=ON;
PB1=ON;
PB2=ON;
PB3=ON;


SOPT = 0x73; /* Turn off the watchdog. */

TPM1SC = 0x00;

for(;:smileywink: {
/* __RESET_WATCHDOG(); by default, COP is disabled with device init. When enabling, also reset the watchdog. */
} /* loop forever */
/* please make sure that you never leave main */
}




My Error
pls see attached.

Outcomes