13192-EVB Board - Zigbee applications

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

13192-EVB Board - Zigbee applications

894 Views
MMG135
Contributor I

Hi there,

 

I have a 13192-EVB board that uses a MC9S08GT60 MCU. I have some code that works on this board to get temperature readings from a DS1822 digital temperature sensor. I am now trying to transmit this information wirelessly to another 13192-EVB or 13192-SARD board. I am just looking for some general information on the options I have available to accomplish this. I have already tried to use an sample Zigbee application and modify it to transmit the temperature information but it doesn't seem to work. I may have to use another sample program which generates an interrupt when the temperature conversion is done and then transmits the data at that time. I was reading over the Beestack Application Development Guide and the example in there is similar it seems. It uses the onboard accelerometer data and when the result is available from the A/D converter it then transmits the data using Zigbee. This is very similar to what I want to do except the temperature sensor is a digital one so I'm not using the A/D converter unit. I have tried to modify the smac-per-tx application for this purpose but it doesn't seem to be working. When I transmit to the other board I get all zero's for some reason. When I manually input a value to transmit such as 26, the value shows up fine on the other end. I will post my code here and perhaps people can take a look at it and give me an idea of where I may have gone wrong. I have also shown the part of the code where the transmitting is happening and where I try to call my temperature function to transmit the result. Thanks for your help.

 

switch (app_status) {   case INITIAL_STATE:  //Walk the LEDs    //For TX    LED1 = LED_OFF;  //Turn off all LEDs    LED2 = LED_OFF;    LED3 = LED_OFF;    LED4 = LED_OFF;        LED1 = LED_ON;         //Lights LED1    for (loop = 0; loop < LED_DELAY; loop++);      LED1 = LED_OFF; LED2 = LED_ON;     //Lights LED2, Turns off LED1    for (loop = 0; loop < LED_DELAY; loop++);    LED2 = LED_OFF; LED3 = LED_ON;     //Lights LED3, Turns off LED2    for (loop = 0; loop < LED_DELAY; loop++);    LED3 = LED_OFF; LED4 = LED_ON;     //Lights LED4, Turns off LED3    for (loop = 0; loop < LED_DELAY; loop++);    LED4 = LED_OFF;         //Turns off LED4    LED1 = LED_ON;     app_status = IDLE_STATE; //Switch app status to TX_STATE            temp=Temperature();                       tx_data_buffer[0] = 0;         tx_data_buffer[1] = temp;         tx_data_buffer[2] = temp;         tx_data_buffer[3] = temp;         tx_data_buffer[4] = temp;                    tx_data_buffer[5] = temp;                              tx_data_buffer[6] = temp;                              tx_data_buffer[7] = temp;                              tx_data_buffer[8] = temp;                              tx_data_buffer[9] = temp;               tx_packet.u8DataLength = 10; //Set the data length of the packet.  in this case, 6.        packet_count=0;    break;

 

          /* See if START TX has been hit */               if ((gu16Events & KBI2_EVENT) != 0) {            #if BUZZER_ENABLED               BUZZER = BUZZER_ON;            #endif               delay(10);            #if BUZZER_ENABLED               BUZZER = BUZZER_OFF;            #endif               gu16Events &= ~KBI2_EVENT; /* Clear the event */               packet_count=0;               setLedsMode(LED_DIGIT_MODE, (UINT16) 8421, 10, LED_NO_FLAGS);                            temp=Temperature();                                           tx_data_buffer[0] = 0;         tx_data_buffer[1] = temp;         tx_data_buffer[2] = temp;         tx_data_buffer[3] = temp;         tx_data_buffer[4] = temp;                              tx_data_buffer[5] = temp;                              tx_data_buffer[6] = temp;                              tx_data_buffer[7] = temp;                              tx_data_buffer[8] = temp;                              tx_data_buffer[9] = temp;                                  //Set the data length of the packet.  in this case, 6.       tx_packet.u8DataLength = 10;       packet_count=0;               app_status = TX_STATE;        }

 

I just wanted to mention as well that each Zigbee packet in this case is 10 bytes(modified from the original 18) and it requires that I transmit a '0' to begin. This is why every transmission starts with a zero and then I transmit the temperature information 9 times after that. I should also mention that it is not necessary for me to use the smac_per_tx application to transmit the DS1822 temperature information. If you know of a simpler zigbee application that I could use, I would gladly use that as well. I am basically looking for the simplest way to take the data from the DS1822 and transmit it via Zigbee to another 13192 EVB-board. The number of transmissions I require is not more than 10 measurements per day for example but more measurements would not be a bad thing if that is easier to implement. I suspect it is the same difficulty to implement 10 measurements or greater than 10.

Labels (1)
0 Kudos
4 Replies

543 Views
MMG135
Contributor I

I realize that the MC9S08GT60 and the 13192-EVB is older hardware, but I am just looking for a rough idea of how to create a custom Zigbee application based on interrupts. Is there anyone with experience in creating custom Zigbee applications that can give me some suggestions or pointers? It may help if you just explain the general steps of how you were able to create a custom Zigbee application to transmit data wirelessly from a temperature sensor for example or some other device with constantly updated data. Any help would be very much appreciated. Thanks.

0 Kudos

543 Views
MMG135
Contributor I

Hi everyone,

 

I'm  hoping someone can help me at least conceptually. I have tried three demo applications and they work fine as they are written. They are: Wireless UART, SMAC Per Tx, Accelerometer Demo. These 3 applications work perfectly fine, doing what they were programmed to do. My question is: which one of these demo programs would be easiest to modify in order to transmit temperature data instead of accelerometer data (in the case of the accelerometer demo), data from the hyperterminal (in the case of wireless UART). The temperature sensor data is only 1 byte in length. I have shown the temperature function that returns the temperature value in the previous postings. I would really appreciate all of your ideas on which zigbee demo application would be easiest to modify for my purposes. I am using Codewarrior 6 at the moment and the MCU has been listed in the previous post. Any help would be greatly appreciated. Thanks everyone.

0 Kudos

543 Views
MMG135
Contributor I

Hi everyone,

 

I am trying to use the PER Test RX application right now in HCS08 Codebase 1.0.5. As far as I understand, this application uses CLK0 for it's clock. Does anyone know if it's possible to use this CLK0 to interface with a 1-wire device (temperature sensor)? Does anyone have experience with interfacing external sensors (1-wire, I2C, etc) with the CLK0 signal from the transceiver? Any direction or tips would be very much appreciated. So far, I have not received any feedback whatsoever. Even some explanation of what others have done would be helpful at this point.

0 Kudos

543 Views
MMG135
Contributor I

I have managed to get the data from the 1-wire temperature sensor to transmit using the SMAC-PER-TX application. Now I am trying to move to the MyStarNetwork demo application. Does anyone know how to change the clock or bus speed from 16 Mhz to 8 Mhz in this application. I read the MyStarNetwork application guide and there doesn`t seem to be any mention of how to change the bus speed in there. Thanks for your help.

0 Kudos