#include /* for EnableInterrupts macro */ #include "derivative.h" /* include peripheral declarations */ #include /* for sprinf() function */ /* Global Variables */ unsigned char length_of_string; char text[50]; /* Function prototypes */ void Data_Serial (void); void SCI_Init(void); void Send_string (char *ptr, unsigned char length); /********************************** SCI INITIALIZATION ********************************************/ void SCI_Init(void) { MODRR0 = 0x08; //SCI1 to PT4, PT5 pins SCI1BD = 0x028B; //SCI baud rate = bus clock / (SBR[15:0] = 6.25MHz/651 = 9600kbps) SCI1CR2 = 0x08; //transmitter enable } /******************************* SEND DATA TO SERIAL LINE *****************************************/ void Send_string (char *ptr, unsigned char length) { unsigned char i; for (i=0; i