Carlos dL

MC9S08SH - SCI Problem

Discussion created by Carlos dL on Mar 19, 2012
Latest reply on Mar 20, 2012 by Carlos dL

Hello, I am trying to do a very very simple communication between a S08SH and my PC with hyperterminal.

I do not why the SCID register not charge.

The circuit to the RS232 is a MAX232.

 

Somebody can help me??

 

This is the Code:

 

#include <hidef.h> /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */



unsigned int caracter;

void main(void) {

SOPT1 = 0x02;

SCIBDH = 0x00;
SCIBDL = 0x34; //Baud Rate = 9600

SCIC1 = 0x00;
SCIC2 = 0x08;

EnableInterrupts;

 caracter = 2;
for(;:smileywink:{
if (SCIS1_TDRE == 1){

SCID = caracter;
}


}

//for(;:smileywink: {
//__RESET_WATCHDOG(); /* feeds the dog */
//} /* loop forever */
/* please make sure that you never leave main */
}

Outcomes