Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Manchester encoding speed - Nigel's Tutorials

Status
Not open for further replies.

gregmcc

Member
I've put together 2 x 16f628 pics and have followed Nigel's pic on RF transmission using Manchester encoding.

If I connect the PIC tx pin to the other PIC rx pin the word "Nigel" is sent on the one PIC and received and displayed on the serial port correctly. Everything A-ok.

I've now put a 433Mhz receiver and transmitter in the loop as per tutorial 12.1 and when transmitting "Nigel" its only received about 50% correctly on the receiver side. Most of the time one of the letters is missing (ie. Ngel or Nige)

I think its got to do with the 433Mhz modules I've got - they are only 2400 baud (Sparkfun tx and rx

In the transmit:
Code:
mtx_init	movlw 	.115 		; 350 usec
		movwf 	mtx_delay
		return

And receive code:
Code:
T		EQU		.39 ; half frame 350 usec (= T * 9 usec)

I figured these are the values that sets the timing.

My first question - is the tutorial code configured for 9600 over wireless? It says 9600 baud but I think thats for the RS232 comms.

I thought to change it to 2400 baud I could just multiply the .115 and .39 by 4 - clearly its a total guess as it didn't work. After changing that I don't receive anything.

How would I go about changing the code to work with a 2400 rx/tx? I hope its something simple as I'm so close to get it working :)

Here's the for Nigel's tut.

Otherwise I might be completely on the wrong track and its not a timing issue.
 
Last edited:
Changing those values should be all that is required.

However, the delay in those routines is (according to the comment) 350us for 1 half bit. This gives a baud rate of ~1400 baud and so maybe too slow. Try halving the delay in case your modules have AGC and the rate is too slow.

Note, I only looked at tut12_1.

Mike.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top