Go Down

Topic: LED and GPIO pins from external chip (Read 1 time) previous topic - next topic

3Dtj

Hi!   I used an Arduino UNO to program an ATtiny85 chip to run a sketch connected to a Adafruit LoRa RFM95 chip.  I've used all the pins on the ATtiny85 but I need one more output port for illuminating a LED and the LoRa chip has 5 GPIO ports.  What code is needed to activate a LED from one of the GPIO ports?  Is it as simple as pinMode (GPIO11, OUTPUT) and digitalWrite(GPIO11, HIGH)??


Appreciate any suggestions.
3Dtj
 

ieee488

I am guessing you have the breakout board and not the Feather.

If you don't get an answer here, the Adafruit people are responsive on their forum, and you should ask there.


3Dtj

Yes just the ATtiny85 and RFM95 on a breakout board.

Thanks for the suggestion on Adafruit.  I'll hit them up for recommendation/tip.

septillion

No, it's not going to be that simple. Which library do you use to control the Adafruit LoRa RFM95?

For example, I don't see a function for it in the  LowPowerLab's RFM69 Library but it does give the opportunity to read/write registers of the RFM95. But you have to dive into the datasheet to find out which register to write.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

3Dtj

I'm using the Lora.h library from Sandeepmistry in github.

Adafruit has all sorts of datasheets thus what should I be focusing on digital IO mapping diagrams or some other illustration?  No response yet to my question to Adafruit's forum.

3Dtj

septillion

No response yet to my question to Adafruit's forum.
For the future, that's considered too be rude, especially if you do't link to it ;)

But you need the datasheet of the chip that has the IO namely the RFM95.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

PaulRB

For the future, that's considered too be rude, especially if you do't link to it ;)
It was suggested to the OP by another forum member.

But you need the datasheet
Good luck working that out! Page 64 says they are general purpose I/O pins, but the tables underneith seem to imply that they have a number of configurable purposes, based on the mode the rfm95 is used in and a configuration register. I can't immediately see anything that would allow the attiny to control their output values programmatically, but I could have missed something.

3Dtj

I'm still learning the social etiquette with these forums and will be more careful.   

I'll dig into the datasheet.  Based on your experience, if I find the correct GPIO address should I be able to activate it with some relatively simply code?

Thanks!
3Dtj

ieee488

I'm still learning the social etiquette with these forums and will be more careful.   


No worries.

septillion did not read the entire short thread from the start.
If he had, he would know that that comment he made was unfounded.


PaulRB

Based on your experience, if I find the correct GPIO address should I be able to activate it with some relatively simply code?
I've never tried to do what you are trying to do. Other I/O expanders I have used have been straight forward, but they were designed for that purpose. Although the GPIO pins on the rfm95 are called that, the designers may not have been thinking that anyone would want to use them the way you want, so it's very hard to say if it will be possible, with simple code or horribly complex code.

septillion

@ieee488, I did read all, only that was 24h ago and in the mean time I have a job to do :) And in this case, I think the "go ask somewhere else" is a bit weird, it's just a chip...

But yeah, looks like they can only be used for defined things. Because of Adafruit referring them as GPIO. So I was under the impressing you could also control them yourself. But the datasheet just calls them DIO and they seem only be capable of displaying some status info.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

3Dtj

Per Adafruit's product sheet:

"The radio's have another 5 GPIO pins that can be used for various notifications or radio functions. These aren't used for the majority of uses but are available in case you want them! All are 3.3V logic with no level shifting." 

Wouldn't that suggest I should be able to activate an LED?

PaulRB

#12
Mar 04, 2018, 08:12 am Last Edit: Mar 04, 2018, 08:55 am by PaulRB
Wouldn't that suggest I should be able to activate an LED?
I'm not sure it does. Let's hope AdaFruit can come up with some example code for you.

septillion

@3Dtj, yeah, that's what threw me off. But after looking at the datasheet where they call hem DIO I don't see a way of turning them on under micro control. :/
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

Go Up