Vizier87
Active Member
Hi guys,
I recently managed a rudimentary data transfer via Xbees, although with a hiccup here and there.
I transmitted 0xAA, a nice output stayed at the receiver via PORTD connected to eight LEDs.
But when I transmitted 0xBB, the receiver (LEDs lighting up) initially shows the data correctly for a few seconds, then somehow flickered and all the LEDs light up without responding to further transmission. It's like a "computer hang".
Anyway, here's the code (Transmitter: 16F877A, connected to a keypad, the polling is for the keypad switch)
And here's the Receiver (18F4620, output at PORTD):
Both of them are configured at a 9.6 kbps Baud.
Please advise, gurus?.
Thanks.
Vizier87
I recently managed a rudimentary data transfer via Xbees, although with a hiccup here and there.
I transmitted 0xAA, a nice output stayed at the receiver via PORTD connected to eight LEDs.
But when I transmitted 0xBB, the receiver (LEDs lighting up) initially shows the data correctly for a few seconds, then somehow flickered and all the LEDs light up without responding to further transmission. It's like a "computer hang".
Anyway, here's the code (Transmitter: 16F877A, connected to a keypad, the polling is for the keypad switch)
C:
while (1){
if (rd3_bit==1 && trmt_bit==1){
txreg=0xaa;
}
if (rd2_bit==1 && trmt_bit==1){
txreg=0xbb
}
}
And here's the Receiver (18F4620, output at PORTD):
C:
while (1){
if (rcif_bit==1){
portd=rcreg;
}
}
Both of them are configured at a 9.6 kbps Baud.
Please advise, gurus?.
Thanks.
Vizier87