AnsweredAssumed Answered

MC56F8013 - SCI Problem

Question asked by Bruno Silva on Mar 14, 2007
Latest reply on Mar 27, 2007 by Giacomo Petrini
Hi people!
I'm newbie in develop with MC56F8013 and I've had some problems in trying a serial communication between my microcontroller and a pc.
What I need is send an information through the RS-232 from pc to MC56F8013, but I'm not getting it.
I've already tried to make that using SPI and SCI, but I don't think that I'm making in a correct way...
I have many doubts about how to connect SCI or SPI with the RS-232 connector in the board. Is it already connected with the SCI and SPI service, or Do I have to set something to link that with those services?
This is my current code, where I tried to make a interruption when I try to receive something in RS-232 of the board:
Code:
#include <stdio.h> #include "MC56F801x.h" #include "isr.h"void initIsr () { asm (bfclr #$0300,sr);           /* allow lowest priority *//* SCI */     asm(bfset #$C000,X:IPR2);   /* Setting Interrupt register to priority 2 */   
asm(move.w #$00D0,X:SCI0_BR);  /* Setting Baud Rate register to value 208 (9600) */  
asm(bfset #$1234,X:SCI0_CR);  /* Setting Control register (0001001000110100) */ asm(bfclr #$FFFF,X:SCI0_SR);  /* Setting register to Baud Rate
  be controled only by the Baud Rate register */ 
}#pragma interruptvoid iserial () {  printf("Test"); }

In the Interrupt Vector:
jsr >Fiserial        ; SCI Receiver Error
jsr >Fiserial        ; SCI Receiver Full 
So, when I try to send something by HyperTerminal, only to test, my code should go to the function iserial, is not it?
Plz, What Am I doing of wrong? Is it missing to set something??? How could I test if my interruption is working well???
Tks a lot!!!! ^_^

Alban Edit: FSL Part Number in Subject line + split/moved to appropriate location.

Message Edited by Alban on 2007-03-14 02:56 PM

Outcomes