MC9S08SH - SCI Problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MC9S08SH - SCI Problem

993件の閲覧回数
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 */
}

ラベル(1)
0 件の賞賛
返信
1 返信

784件の閲覧回数
CarlosCba
Contributor II

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

0 件の賞賛
返信