Vizier87
Active Member
Hi guys,
I have posted a similar question in MikroE but they took their time though, so I'm posting it here for extra input from the old-timers here. According to Uncle Nigel, the Manchester Code is the most suitable for the standard 315 MHz modules. I'm attempting a simple transmission between my 16F84A and 16F876, where the Tx continuously transmits 0xff and the Rx, upon receiving 0xff, turns on all PORTB pins, and all turned off if otherwise. I'm doing it real simple, the wires are connected to each other (Tx to Rx, and GND tied together, not using the RF modules yet), with the following code:
Tx:
Rx:
It doesn't work, but I believe code-wise that's enough to see the transmission work, right?
Thanks.
Vizier87
I have posted a similar question in MikroE but they took their time though, so I'm posting it here for extra input from the old-timers here. According to Uncle Nigel, the Manchester Code is the most suitable for the standard 315 MHz modules. I'm attempting a simple transmission between my 16F84A and 16F876, where the Tx continuously transmits 0xff and the Rx, upon receiving 0xff, turns on all PORTB pins, and all turned off if otherwise. I'm doing it real simple, the wires are connected to each other (Tx to Rx, and GND tied together, not using the RF modules yet), with the following code:
Tx:
Code:
extern sfr sbit MANTXPIN;
extern sfr sbit MANTXPIN_Direction;
sbit MANTXPIN at rb7_bit;
sbit MANTXPIN_Direction at trisb7_bit;
void main() {
Man_Send_Init();
while (1) {
Man_Send(0xff);
}
}
Rx:
Code:
extern sfr sbit MANRXPIN;
extern sfr sbit MANRXPIN_Direction;
sbit MANRXPIN at rc7_bit;
sbit MANRXPIN_Direction at trisc7_bit;
void main() {
trisb=0;
portb=0;
Man_Receive_Init();
while(1){
unsigned char data_ = 0, error = 0;
a_ = Man_Receive(&error);
if (a_==0xff){
portb = 0xff;
}
else portb=0;
}
}
It doesn't work, but I believe code-wise that's enough to see the transmission work, right?
Thanks.
Vizier87