-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
GDO0 & GDO2 on different pins #31
Comments
hi, |
ok i just see 0 is d3 at esp8266 |
I was planning to use a Arduino UNO R3, but due to many reasons I have free for GDOs pins only D0, D1, D2, D3 therefore I was thinking to use as: Though, I wasn't sure where to declare these changes. |
ok then so in the setup: |
which example do you use? |
Well, I was planning to use the samples types within these dirs:
But before wiring the CC1101 was trying to figure out how to change the GDO0/GDO2 Pins or if they are needed at all for those sketches above. |
ok I understand. |
Ok gotcha, thanks man! |
so, the gdo pins are not used for sending or receiving in the internal send / receive examples. the data for sending are written to the internal memory (fifo) via spi. then an instruction is given that the data is sent from the memory. when broadcasting, the cc1101 pulls up the gdo0 pin. when it is low again, the arduino knows that the transfer is complete. it is the same with reception. the arduino knows when the gdo0 pin is high and then low again that something has been received. here the cc1101 saves the received in fifo and thus that the gdo0 pin is high and then low again, the arduino knows that it can now read out the internal memory of the cc1101. The internal memory is not used for rcswitch and the gdo pins are configured so that when the cc1101 receives something, it is forwarded directly to the gdo pins. it is looped through directly so that the arduino can evaluate the signal. when the cc1101 is put into send mode it is the same as what goes into gdo0 is sent directly. So like the cheap receivers and transmitters. everything analog. by the way gdo0 can receive and send. gdo2 can only receive. if you hang a small loudspeaker between gdo0 and gnd you can hear the signal from your remote control. Conclusion. when the cc1101 is used like the cheap receiver. then specify (example rcswitch) where the send pin is connected and where the receive pin. rswitch then switches the corresponding arduino digital pin to receive input and send output. the cc1101 gdo pins are switched with setTx as input and setRx as output. it is nothing more. because what does set gdo do. it only sets the pins on input and output for aurdino. at rcswitch, rcswitch does it for the arduino. |
This is the best explanation ever seen in a Github issue! |
Feel free to either close the issue or keep it open as reminder for others. :) |
nice that I could bring you some light in the dark. I hope that everything is understandable. if some things sound strange then i apologize for my bad english. I would also like to add that setCCmode 1 configures the pins for the internal send / receive functions. if you set setCCmode back to 0 then the pins are configured for rcswitch and co in the same way. for rcswicht alone it does not have to be set since it is standard 0. but switching back and forth would also allow switching between rcswitch and internal send functions in one sketch. |
Forgot one thing... since I will have also to attach another SPI device on the same Arduino UNO + CC1101... since the D10 is used as SS_PIN (but in my case will be already used)... I guess I can change it in https://github.com/LSatan/SmartRC-CC1101-Driver-Lib/blob/master/ELECHOUSE_CC1101_SRC_DRV.cpp#L255
With an unused Pin I have available. Example D0 or D1. Correct? |
yes, you can easily create your own.
the 1 at the end for ss pin as d1. is also described in the readme. it is best to insert the whole thing before the init command. in the setup area |
Great, thanks man! |
with pleasure. I am available for further questions. by the way, there will be an update tomorrow. improved frequency calculator, calibration of the frequencies. and bug fixes. if you need debug function you can use my debug tool to match the cc1101 lib. there are also advanced features like set data rate and so on. |
Hi,
In Arduino UNO/NANO the GDO0 and GDO2 are allocated as follow:
D6 > GDO0 (TX)
D2> GDO2 (RX)
Questions:
Thanks a bunch for the reply!
The text was updated successfully, but these errors were encountered: