Attiny13 Manchester Transmission

Hi everybody, recently I adapted Nick Gammon´s code to make a Attiny13 transmit Manchester encode. It is running at 600KHz (4.8MHz / 8Div) and surprisingly it works, but just wired. When I put it to work thru RF 433MHz ASK modules, it does not work so well. Sometimes transmit a data sequence with no errors and sometimes a bunch of nonsense data. I need help to find the error in view that the transmit code is very simple and very lean for Attiny 1Kb flash memory. My adapted code is attached. Thanks.

main.c (2.86 KB)

Most of the cheap ASK RF modules don't support data rates of 600 kHz. Start with something much slower, like 2 kHz and increase if you need to.

Sorry, I expressed myself wrong. I meant to say the MCU is running at 600KHz and not the data transmission.

What do you think your bit rate is?
How are you receiving and demodulating the data?
What do you use for antennas?

Manchester coding doesnt eliminate errors.
All it does is eliminate any DC state in the data being sent and guarantees continuous data transitions
regardless of what is being sent which is what is needed for radio transmission.
But those cheap 433 Mhz ASK modules are extremely noisy, and you will still get errors unless you write some kind of error detection code to eliminate them.
Why not use Virtualwire which does all this for you.

I tried all other kinds of codings, but no one was so small to portable on the 1Kb flash memory from Attiny13. This code is fine, works fine sometimes. I guess I make a mistake but dont know where, if on the receiver or on transmitter.

Mauried is right -- radio is inherently noisy. If it works sometimes, you can always follow the approach taken by most remote weather sensors. Add a checksum byte to the message and send more than one copy of the message. Some weather sensors send as many as 10 copies of each report.

Neither of those options will add more than a few bytes to your code.

I haven't tried 433 MHz transmission on a tiny13, but have on an 85, using the 'cheap' Tx/Rx pair.
Never bothered by 'noise'. Sometimes I lose a transmission, but never got it garbled.

worth nothing though is that the transmitter is quite good, but the receiver is crap. Nevertheless, still usable with a decent antenna. I have tried the 17.2 cm wire antenna which didn't give me much coverage. Now I am using a simple coil loaded antenna and that has made all the difference: Coil loaded 433 MHz Antenna – Arduino, ESP8266, ESP32 & Raspberry Pi stuff The original is from Ben Schueler in Elektor Magazin