ATTiny 85: SPI and Software Serial?

I have been playing with the little 433 MHz. transceivers, and decided the Moteino family has several serious drawbacks. So I am designing my own radio board. The idea is to tie an RFM-22B to an ATTiny, which only has the job of operating (receiving/sending) the radio. Ideally, the ATTiny will be able to receive multiple radio packets and buffer them until they are requested (based on memory, of course).

Now the RFM-22B radio has a 5 wire interface, MOSI, MISO, SCK, CS, and Interrupt (from the radio). However, if the radio is the only SPI device, I should be able to tie the CS pin high and save a pin. So I would need four pins for the radio. The question is, can I then use the remaining two data pins to set up a software serial link back to another processor? Has anyone played with software serial on these chips?

Thanks in advance for any insights.

You'd have to tie CS low, I think.

I think that could work, but you'd have to blow RST_DISBL to get the reset pin to act as an IO pin, and the chip is difficult to reprogram after you do that.

I would suggest the ATTiny841. It works with Arduino (use my core), it's got more pins, a real hardware SPI, and real hardware serial ports, so you don't have to use software serial. In fact, it's got TWO hardware serials, so you can put a bootloader on it and use serial0 to program it (as easily as if it were a pro mini), and serial1 for your radio thingie (if that makes sense for your application). They're not that expensive either (at least for bare chips - only a few cents more than an '84. I sell development boards with 841's on them )

I actually did much the same thing with the cheapo OOK 433mhz transmitter/receiver units. Take a look at the debris here (dates should give you an idea of what is recent and what isn't) for ideas: https://github.com/SpenceKonde/AzzyProjects/tree/master/433mhz

jrdoner:
I should be able to tie the CS pin high and save a pin.

i dont think so. cs must be toggled.

if cost is any consideration t841 or t84 would be a poor choice. m8 at about 1/4 the cost or even m328 at about half would be better. they have uart although there is probably no advantage over software serial in this application.

if space is an extreme requirement then qfp versions which are not much bigger than the soic14. mlf is actually smaller.

john1993:
i dont think so. cs must be toggled.

Maybe on some devices? I've certainly seen devices that tied CS low... Consult the datasheet, and see if it mentions anything specific happening on raising/lowering CS...

having considerable experience with the hoperf device and other si4432 designs i assure you cs cant be tied anywhere. its the basis for openlrs project with hundreds of thousands of users, probably #1 rc diy fanbase. if you could save a pin that way it would be big news.

unlike with i2c there are almost as many spi protocols as there are device types. in this case we dont get lucky.

this silabs chip is one of my favorite transceivers having more than 4 times the range of 2.4ghz units for same power output. and wonderful rssi capability and other features lacking in the popular and beloved nrf24l01. cheap modules too, specially if you avoid the hoperf products in favor of generic chinese versions.

i would be very impressed by anyone who could produce a custom design performing anywhere close to the commercial modules. many tried, few succeed.

john1993:
i would be very impressed by anyone who could produce a custom design performing anywhere close to the commercial modules. many tried, few succeed.

Oh, to be clear, I wasn't attempting that, just making serial bridge to a cheap wireless, because I had application where I needed remote control on something that couldn't handle the constant interrupts when there was no signal.

Shame you can't tie cs low with those.

you or op?

but yes, one of the major advantages of si4432 gfsk reception is no signal, no output. its the major drawback to ook modules that output continuous be it data or garbage. with a minor fm mod costing less than a penny however range for the 433mhz cheepies can be extended by a factor of at least 300x..

Oh, I thought that sentence was directed at my bit about making serial bridge to 433mhz CheapoRF. It looks like the OP is doing something similar, though - making a serial bridge to an SPI-controlled RF unit.

john1993:
range for the 433mhz cheepies can be extended by a factor of at least 300x..

I don't suppose you could share that secret?

not so much a secret since its well known fm has amazing range compared to noise plagued am. 75 miles using 50 cent 433mhz module with minor mod and cheap ebay walkie talkie:

regarding rf22b modules myself and dozens of others have personally received multiple reliable contacts over 2000km. thats KILOMETERS, not meters:

in both cases we are talking miles on milliwatts. its sad watching inconsiderate boobs splattering interference all over the neighborhood using illegal boosters when all thats really needed is efficient antenna design and a good low noise front end.