Thanks guys, I'll try with the led debugging stuff you suggested and let you know!
Quick question, do I need to have the receiver portion working to test the transmitter (i.e. is there any acknowledge that the tx is expecting from the rx) ? Or I can just setup the attiny with the "debugger" code you posted and start transmitting without any receiver device?
fgasparri:
Thanks guys, I'll try with the led debugging stuff you suggested and let you know!
Quick question, do I need to have the receiver portion working to test the transmitter (i.e. is there any acknowledge that the tx is expecting from the rx) ? Or I can just setup the attiny with the "debugger" code you posted and start transmitting without any receiver device?
Thanks so much,
Fabio
Nope. That's the best thing about it, it's just there to test the wiring on the attiny.
raedon:
someone could run the library with ATTINY44?
Ship me an ATTINY44 and I'll do it for you
Otherwise, just take a look at the SPI85 class and change the pins. You'll need to find which are the correct pins for MOSI, MISO, SCK, etc.. for the ATTINY44 and put them there. Good luck!
raedon:
someone could run the library with ATTINY44?
Ship me an ATTINY44 and I'll do it for you
Otherwise, just take a look at the SPI85 class and change the pins. You'll need to find which are the correct pins for MOSI, MISO, SCK, etc.. for the ATTINY44 and put them there. Good luck!
Funny enough I've done this with an 84 and for some reason, haven't had any luck.
I have a couple of 84s on the way. I have had some very thourough experience with the 85s, and have routines ready that can check if all the wiring, etc.. is OK. I think, if there's a way, I'll probably manage, the only problem is if I have time to do it. I will share the wiring and code if I manage.
Really, do take a look at the SPI85 class man. One of the files is literally something like
mosi = PA5;
miso = PA6;
etc.. Where PA5 and PA6 are pin names.
Then, find the datasheet for the ATTINY44:
PA5 (ADC5/DO/MISO/OC1B/PCINT5)
PA6 (PCINT6/OC1A/SDA/MOSI/DI/ADC6)
PA4 (ADC4/USCK/SCL/T1/PCINT4)
Those are the important ones. CE and CSN are probably variable.
Finally, make sure everything is wired correctly. Then use the code I've posted previously to check the wiring. Sorry I can't help any more, really busy.
sorry if bother you was not my intention, my question was just to ask if it was possible to make it work, do not spend more time on this library because I had found the one I posted recently, now I have at least two options to try.
raedon:
sorry if bother you was not my intention, my question was just to ask if it was possible to make it work, do not spend more time on this library because I had found the one I posted recently, now I have at least two options to try.
I actually had used that out of desperation in those four days I spent debugging. You'll find my name on that page as "David"
You may find it is not easy to get it up and running. You will need to install WinAVR, programmer's notepad and set up the makefile to get it to compile and send it to the ATTiny44. Fortunately I have the Makefile already set up, it's in one of the dropbox links in one of my questions on that page.
You can try but I don't recommend it. You will waste lots of time setting it up, and even if you manage to get it to work, the arduino libraries are missing in AVR, and it's a whole different level of coding. Don't know what's your experience in that area. If you have time, go ahead, nothing to lose but try!
I already make the changes to the file to make it work with the ATTINY44, also change files mirf.cy mirf.h setup.c fail me burn only the ATtiny, I'll do that tomorrow also see what I can do I'll take a look at your code because I have only one module NRF24L01 free to use
Watch out, by the way. I've managed to burn 3 nRF modules by swapping around the ground and VCC at 3 AM. Happened for a second or two and from then on it just wouldn't receive anything. It would return 0 or 255 randomly as status instead of working. I can confirm this as when I replaced it with a different card, it worked.
Davste:
I've managed after five days of mucking around with it
Remember to try different channels. That may have been one of the problems for me.
Here's the code I'm using right now (that works):
I can't seem to find the below *85 header files, which libs are they from ?? #include <SPI85.h> #include <Mirf85.h> #include <nRF24L0185.h> #include <MirfHardwareSpiDriver85.h>
Or could you just zip up all the attiny & headers and shared it as a dropbox links ?
the address is flipped when configure in mirf (no idea why???) :-
byte TADDR[] = {0xe3, 0xf0, 0xf0, 0xf0, 0xf0}; will match RF24 :-
const uint64_t pipes[2] = { 0x7365727631LL, 0xF0F0F0F0E3LL };
Default CRC for mirf is 8bit so set the RF24 radio.setCRCLength(RF24_CRC_8) or change mirf85.h line 38 :- #define mirf_CONFIG ((1<<EN_CRC) | (1<<CRCO) ) // 1 << CRC0 is 16bit/2bytes
Default data rate for nRF24L01/mirf is 2Mbps, so set the RF24 radio.setDataRate(RF24_2MBPS)
Channels can be confusing, so use 0x50 or whatever in HEX ( 0xnn) when setting the channel for both
Enable dynamic payload ( I enable them for all my RF24 receivers ) in mirf :-
I made an 6-pin adapter on top of the attiny85 for easy uploading of hex to the attiny85 and I put an LED at Pin2 to blink 3 times during the 1 sec delays when isSending is successful..
Drawing 3.3V power from a breadboard power supply and USBtinyISP as my programmer...
attiny85
Mirf.rfsetup = 0x06; // RF_SETUP settings :- 0x06 = 1Mbps, max power, 0x0e for 2Mbps, max power
mirf85.cpp
Nrf24l::Nrf24l(){
cePin = 3;
csnPin = 4;
channel = 40;
payload = 5;
rfsetup = 0x06; // 1Mbps, max power
spi = NULL;
}
void Nrf24l::config()
// Sets the important registers in the MiRF module and powers the module
// in receiving mode
// NB: channel and payload must be set now.
{
// Set RF channel
configRegister(RF_CH,channel);
// Set RF_SETUP
configRegister(RF_SETUP,rfsetup);
// Set length of incoming payload
configRegister(RX_PW_P0, payload);
configRegister(RX_PW_P1, payload);
// Start receiver
powerUpRx();
flushRx();
}
mirf85.h
/*
* Rate is RF_SETUP, 0x06 is 1Mbps, Max power
*/
uint8_t rfsetup;
Stanley:
I've compiled all the files, headers and examples and made a github repo for future references :-
Pls let me know if you need me to add examples to the repo...
Thanks for sharing your success. I think a test example is always a good idea for these, so yes please.