- Mon Feb 18, 2008 8:58 pm
#43046
Was having a hard time getting data transfer using the ASK (another way of saying OOK) RF modules between a pair of PICs.
I'd been used to the Linx LC series in which the OOK receiver data was squelched. The constant hash present in the Spark Fun RX module data out presented a synchronizing challenge.
I created an assembly subroutine similar to a software receive UART except it uses the interrupt on change feature available on PORTB 4:7 pins to insure the bits were noise free. In addition, I also rotated the bits in to a 16 bit buffer doing a comparison after each bit received, looking for a sync byte and the start/stop bits in the right order.
Then the program switches over to the standard software receive UART.
So far it's been rock solid. The project is still quite beta, but this was a happy step forward.
I'd been used to the Linx LC series in which the OOK receiver data was squelched. The constant hash present in the Spark Fun RX module data out presented a synchronizing challenge.
I created an assembly subroutine similar to a software receive UART except it uses the interrupt on change feature available on PORTB 4:7 pins to insure the bits were noise free. In addition, I also rotated the bits in to a 16 bit buffer doing a comparison after each bit received, looking for a sync byte and the start/stop bits in the right order.
Then the program switches over to the standard software receive UART.
So far it's been rock solid. The project is still quite beta, but this was a happy step forward.
Resonance is the key