Greetings,
I am trying to toggle remote XBee I/O pin DIO4 with PIC firmware and API frame data. The test setup worked fine with Digi development boards, but with my breadboard circuits the API data is transmitted but nothing happens at the receiver. The coordinator code is below, does anyone see anything I am missing? Has anyone tried this before? It seems like a great way to avoid using a lot of command messages.
Thanks!
/* PIC to PIC transmit.c
Send API frame data to client from coordinator to toggle DIO4 */
#include <18f2520.h>
#fuses INTRC, NOLVP, NOWDT
#use delay(clock=8000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, bits=8, parity=N)
#include <stdlib.h>
// API frame data
#define DIO4_ON_51 “7E00101705000000000000000000510244340414”
#define DIO4_OFF_51 “7E00101705000000000000000000510244340513”
void main()
{
// int i;
setup_oscillator( OSC_8MHZ );
output_high(PIN_C4); // C4 = Pin 15
delay_ms(500);
output_low(PIN_C4);
while (TRUE)
{
printf(DIO4_ON_51);
delay_ms(950);
printf(DIO4_OFF_51);
delay_ms(950);
}
}