MC9S08SH - SCI Problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MC9S08SH - SCI Problem

469 Views
CarlosCba
Contributor II

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 */
}

Labels (1)
0 Kudos
1 Reply

260 Views
CarlosCba
Contributor II

The code is OK, i had hardware problems...sorry

0 Kudos