hello
i will make rf communication using tx433 and rx433 with 16f876
2 led in recepteur and 2 buttom in emetteur
programme emetteur
Code:#include <16F876.h> #fuses XT,NOWDT,PROTECT,NOBROWNOUT,PUT #use delay(clock=4M) #use rs232(baud=2400, xmit=PIN_C6, rcv=PIN_C7) void main() { char var; int i; set_tris_b(0xff); while(true) { if (input(pin_b0)) { putc('a');} while (input (pin_b0)) ; if (input(pin_b1)) { putc('b'); } while (input (pin_b1)) ; }}
recepteur
this work perfectly in isis proteus (if i change to 10 mhz clock and baud 9600)Code:#include <16F876.h> #fuses XT,NOWDT,PROTECT,NOBROWNOUT,PUT #use delay(clock=4M) #use rs232(baud=2400, xmit=PIN_C6, rcv=PIN_C7) #include <stdlib.h> void main() { char c; set_tris_b(0x00); output_b (0); port_b_pullups (TRUE); while(true) { c=getc(); delay_ms(20); if (c=='a') { output_high(pin_b1); output_low(pin_b0); } else if (c=='b') { output_low(pin_b1); output_high(pin_b0); } }}
this will work ????
-----