ahmedragia21
Member
hi , im trying to write a manchester code/decode using Keil C with 8051 cuz my RF Tx,RX cant work with DC components like UART ... i read about it but still i need some more info ... ?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
// code for tx
void TX_Send(unsigned char a )
{
int i;
int j;
for (i = 0; i < 8; i++) {
b[i] = a & 1; a = a >> 1;
P2_0=b[i]; // b[8] , and P2.0
DELAY_Second();
}
// code for RX
for (i = 0; i < 8; i++) {
b[i]=P1_0; // read the bits and put them in an array
DELAY_Second();
}
for (c = 0; c < 8; c++) {
a|=b[i]<<c; // decode bits into one byte
}
ahmedragia21 said:would you please clarify the problem with sending a byte like 10110100 thru the RF tx , rx module ? what happens and why its not working ?
i send it using delay between bits ...
ahmedragia21 said:The pc will use hardware uart using hyperterminal to send the byte to be sent ... what's wrong with this ?