AnsweredAssumed Answered

Help for using MC9s08gt60

Question asked by Damien Vassallo on May 30, 2008
Latest reply on May 30, 2008 by David Payne
Hello

I have to use a MC9s08gt60 .

I would like to communicate with a computer with a zigbee connection.

I use a XBEE pro module.

For the moment I would like to send information to the computer by zigbee and I have some difficulties

Can you help me


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


/****************************************************************
Function:smileyfrustrated:CI1INT
Input parameters: void
Output Parameters: Void
Description:This has the SCI 1  initializations
***************************************************************/
 
 void SCI1INT (void) {
  SCI1BDL=0x0D;
  SCI1C2=0x0C; 
  SCI1C1=0x00;
  SCI1BDH=0x00;
}


/***************************************************************
Function:smileysurprised:UT_ZIGBEE
Input parameters: char *a
Output Parameters: Void
Description:This functions sends data to Zigbee transciever through SCI1.
***************************************************************/


void OUT_ZIGBEE (char *a)
{
  while (*a != '\0')
  {
    while (!(SCI1S1 & 0x80));
    SCI1D = *a++;
  }
}


void main(void) {

char tab[1];
int i=0;

  for(;:smileywink: {
  tab[0]=i;
  OUT_ZIGBEE(tab);
  i++;
  if(i>9)
  i=0;

  } /* loop forever */
  /* please make sure that you never leave main */
}


Outcomes