RF interface with keypad 3x4 & LCD 16x2 (PIC16F877A) - mikro-c compiler

Status
Not open for further replies.
Kon'nichiwa annwar,

check the help on manchester coding. It is self clocking code, can be easily implemented in your project.

I do not use RF 315 modules, I prefer Radiometrix TX2 and RX2 433 MHz ones.

HTH
 

really?... in manchester code can a signal to be send?... i want to make RF as a controller for controlling lamp n fan using RF.. will u help me?.. how using mancester code could help this?... u said ur using Radiometrix TX2 and RX2 433 MHz ..? can u give me links.. on this module>.. is it the same as RF 315 basic module?.. THANKS FOR ALL UR HELP>>> REALLY NEEDED IT> arigatougozaimasu
 

Reactions: annwar

    annwar

    Points: 2
    Helpful Answer Positive Rating
Reactions: annwar

    annwar

    Points: 2
    Helpful Answer Positive Rating
I found a 2 byte to 3 byte encoding scheme with C code and docs. It's a little simpler than Manchester encoding.

See attached files below:
 

Attachments

  • 2ByteTo3Byte.zip
    132.3 KB · Views: 74
Reactions: annwar

    annwar

    Points: 2
    Helpful Answer Positive Rating
thanks for the files... the coding help me a little.. but have o study how the program works.... but the pdf file u give me... is currupt.. icant see the file..
what is this coding for actually? for RF data sending?

---------- Post added at 00:37 ---------- Previous post was at 00:37 ----------

thanks for the files... the coding help me a little.. but have o study how the program works.... but the pdf file u give me... is currupt.. icant see the file..
what is this coding for actually? for RF data sending?

---------- Post added at 00:39 ---------- Previous post was at 00:37 ----------

thanks for the files... the coding help me a little.. but have o study how the program works.... but the pdf file u give me... is currupt.. icant see the file..
what is this coding for actually? for RF data sending?

---------- Post added at 00:39 ---------- Previous post was at 00:39 ----------

thanks for the files... the coding help me a little.. but have o study how the program works.... but the pdf file u give me... is currupt.. icant see the file..
what is this coding for actually? for RF data sending?
 

Yes, I've used it for SubGHz TX/RX like the 315MHz and 415MHz systems. I've attached another copy of the PDF uncompressed. You can also use PWM, which the 16F877A has two channels.
 

Attachments

  • an401.pdf
    151.3 KB · Views: 74

See my example **broken link removed**. See video.
At transmitter, I send 3 byte UART. 0xFF, upper 4 bit PORTB, lower 4 bit PORTB
At receiver, I receive and store in 3 array. rf[0], rf[1], rf[2]. Then combine rf[1] and rf[2] to get PORTB.
 
Last edited:

HELLO ...

I HAVE A PROBLEM ABOUT RF PROGRAMMING

I have a project about RF using PIC16F877A n mikroc compiler..
My project is about RF control switch... n have done my coding.. in mikroc compiler.. .. after compile.. all the codes are able to succsecssfully compiled...
but,.. the problem is , when i simulte in PROTEUS software... i dont know whats the problem.. CAN U HELP ME SIR>>.. is it about the programming part...

Here i attach my coding on Tx n Rx.. and alsoo the circuit basic structure.. This is just a testing for 2input button.. 2LED output.. using RF....

CAN U CHECK ON MY PROGRAMMING>>>

REALLY APPRECIATED IT.... THANKS>.



/////////////////////////// TX coding /////////////////////////////////

// Manchester module connections
sbit MANRXPIN at RC7_bit;
sbit MANRXPIN_Direction at TRISC7_bit;
sbit MANTXPIN at RC6_bit;
sbit MANTXPIN_Direction at TRISC6_bit;
// End Manchester module connections



int i=0;
void main()
{
Man_Send_Init(); // Initialize transmitter


TRISC=0;
TRISD=0B11111111;
//Man_Send_Config (&PORTC,0);

do{ Man_Send(0xC3); Delay_ms(10); i++; } while(i<10); //the same data 10 times for sync.


while(1) //this is prototype with only two buttons
{

if((PORTD.f0==1)&&(PORTD.f1==0) ) // to be sure that one button is pressed

{ Man_Send(0x3e); delay_ms(10); }


if((PORTD.f0==0)&&(PORTD.f1==1) )

{ Man_Send(0x3f); delay_ms(10);}

if((PORTD.f0==1)&&(PORTD.f1==1) )

{ Man_Send(0x3a); delay_ms(10); }

if((PORTD.f0==0)&&(PORTD.f1==0) ) //if no button is pressed

{ Man_Send(0xFC); delay_ms(10); }

}

}



////////////////////////RX coding//////////////////////////////////

// Manchester module connections
sbit MANRXPIN at RC7_bit;
sbit MANRXPIN_Direction at TRISC7_bit;
sbit MANTXPIN at RC6_bit;
sbit MANTXPIN_Direction at TRISC6_bit;
// End Manchester module connections



unsigned char error = 0, ErrorCount = 0, temp = 0;
//short fork,poy,spoon;
void main()
{

TRISC=0B11111111; //CIRCUIT IS RX.
TRISB=0;
PORTB=0;

//Man_Receive_Config (&PORTC,6);

while(1)
{
GET_BYTE:
temp = Man_Receive(&error); // Attempt byte receive
if (error != 0) goto ERROR_BYTE; // if comm's error goto error handler
if(temp==0xc3)
{
PORTB.F6 = 1; goto DISPLAY_BYTE;
} //light successfull sync. led

ERROR_BYTE:
PORTB.F7 = 1; // light error led
ErrorCount++; // Update error counter
if(ErrorCount > 5)
{
TRISC7_bit; ErrorCount=0;
}
goto GET_BYTE;


DISPLAY_BYTE:

do
{
temp = Man_Receive(&error); // Attempt byte receive
if (error!= 0)
{
TRISC7_bit;
}
if (temp == 0x3e) PORTB.F0 = 1;
if (temp == 0x3f) PORTB.F1 = 1;
if (temp == 0x3a) { PORTB=0B00000011; } // in case two buttons are pressed
}
while (temp != 0xFC);
goto STOP_BYTE;



STOP_BYTE:
if (temp == 0xFC)
{
PORTB=0B01000000;
}
goto DISPLAY_BYTE;

}
}

My Attachments

 


Hello friend.... I am building similar project can u help me? Are u using Manchester lib?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…