I’m trying to use the SPI interface of a BasicRX.
I made a small test program.
It basically keeps on writing.
There are a few things I need to know:
1 - is this the right way to use the SPI?
2 - is the buffer the hex number passed as a string?
3 - Even though I don’t know what to expect with the buffer I used, I at
least expected to see something in the BasicRX SPI pins, which I
can see some periodic bursts on the clock pin but nothing on the signal.
Thanks in advance for any help you can give me.
The code I’m using is the one below:
from gnuradio import gr
from gnuradio import window
from gnuradio import usrp, howto
from gnuradio import audio
decimation = 256 center_frequency = 10.7e6 self.u = usrp.source_c(0, decimation,
self.subdev_spec = (0,0)
self.subdev = usrp.selected_subdev(self.u, self.subdev_spec)
self.u.tune(0, self.subdev, center_frequency)
g = self.subdev.gain_range()
gain = float(g+g)/2
if name == “main”:
print “Creating flowgraph…” ,
tb = TunerFlowGraph()
print "Starting flowgraph...", tb.start() print "[DONE]" while(1): print "Writing to SPI...", usrp.sink_s()._write_spi(0, usrp.SPI_ENABLE_RX_A,
View this message in context:
Sent from the GnuRadio mailing list archive at Nabble.com.