No, you can't bit bang the SPI.
Why not? I've done so many times. Not using the SPI hardware of course, just pick 3 pins and wiggle the bits.
Dude! Did you really mean to use km? Kilometers? Really?
Well I haven't actually tried it
, but if you use RS-485 drivers and run fairly slow I don't see why not. RS-485 is rated for 1200m at 100kbps but would do longer at slower speeds I would think.
It's a synchronous transfer. The Master and Slave have to be in close proximity. Like... on the same PCB.
That's basically true and the way it's normally used, but you can think outside the square.
Of course if you really needed that line length SPI would not usually be the best choice. OTOH say you want a 7-segment display running from a few shift registers 300m away. If you use async you have to add a remote processor, with SPI you just need a shift register.
(note I use the term SPI to mean any clock/data style sync protocol which may or may not use real SPI hardware)