1

I'm trying to set up a transmitter made by the following components :

  • Attiny85 (I need 1MHZ speed)
  • Cheap 433mhz transmitter (FS1000A)

The library I am using is the Manchester library GitHub. The attiny85 and the transmitter are powered with regulated 5V. I set up 1MHZ when burning the bootloader for the tiny.

I am successful at transmitting with 8 AND 16MHZ with my Attiny85, however, 1MHZ seems to malfunction. For 1MHZ on the tiny, this line need to be added in order to adjust timings :

man.workAround1MhzTinyCore();

Here is the complete code :

#include <Manchester.h>
/*
  Manchester Transmitter example
  In this example transmitter will send one 16 bit number
  per transmission.
  Try different speeds using these constants, your maximum
  possible speed will depend on various factors like transmitter
  type, distance, microcontroller speed, ...
  MAN_300 0
  MAN_600 1
  MAN_1200 2
  MAN_2400 3
  MAN_4800 4
  MAN_9600 5
  MAN_19200 6
  MAN_38400 7
*/
#define TX 2 //pin where your transmitter is connected

uint8_t transmit_data = 11;
void setup() {
  man.workAround1MhzTinyCore();
  //pinMode(RX, OUTPUT); 
  man.setupTransmit(TX, MAN_300);
  pinMode(1, OUTPUT);
}
void loop() {
  digitalWrite(1, HIGH);
  man.transmit(transmit_data);
  delay(100);
  digitalWrite(1, LOW);

  delay(200);
}

Someone else has/had this issue Can't transmit on @1MHZ attiny85, and i don't know if it has been fixed or not. I am unsure if the library is still updated, and if this issue isn't with the library itself.

Does anyone have any leads or fix for that issue ? That would greatly help, Thanks

5
  • The comments in the library code suggest, that this is a problem with the core. You can search in the issues of the core on github or open your own issue for it to find out if it is fixed. Though - as you report it not working without the workaround - I don't think it is fixed. Does the workaround not work for you?
    – chrisl
    Feb 22 at 11:24
  • Hi, thanks for answering quickly, no, the workaround does not work for me. Do you mean the core of the tiny library or the core of the Manchester library ?
    – BruceWawe
    Feb 22 at 11:30
  • A core in the Arduino world is the support package for specific groups of boards/microcontroller (as installed from the board manager). So it is the Tiny core and the Manchester library, not vice versa. So yes, with core I mean the Tiny core (or whatever core you have installed for the Attiny)
    – chrisl
    Feb 22 at 12:36
  • The linked issue of the Manchester library also states, that calls to delay() does not work correctly (a value of 5000ms giving only 1s delay). Does this also happen for you? Please also test delayMicroseconds() since that is the function used in the Manchester library
    – chrisl
    Feb 22 at 12:38
  • Ok thanks for the tip, I managed to test it and it would seem to be working correctly, I get approximately 5 seconds every time, with delay() and delayMicroseconds()
    – BruceWawe
    Feb 23 at 13:27

1 Answer 1

0

Ok funny story, I think I found a solution, not sure why, but : My setup (the same) :

  • Attiny85 (1MHZ (set on bootloader))
  • Cheap 433mhz transmitter (FS1000A)
  • Attiny microcontrollers library

When burning the bootloader with 1MHZ, and uploading sketch, it would seem that removing the line man.workAround1MhzTinyCore(); makes it work.

Without the line it's working, and with the work around it is NOT

Voila !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.