libftdi Archives

Subject: Adventures with the Semtech SX1211 (packet radio) USB device.

From: John Oyler <john.oyler@xxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 31 Aug 2010 15:23:41 -0500
Well, for the past two days I've been using the oscilloscope in analog mode... 
which limited me to 4 channels, I couldn't look at both chip selects at the 
same time. And, I think that was the biggest problem of all, when you're trying 
to toggle one but not the other, I was either confusing myself and not 
bothering to run the executable twice, switching things out, or I don't know 

Our resident EE seems to always be out, but helped me get the digital channels 
hooked up.

I'm looking at 6 channels, ADBUS0-4 and ADBUS7 (as a control).

They are in the picture as follows:

0  -  SCK   - ADBUS0
1  -  MOSI - ADBUS1
2  -  MISO - ADBUS2
3  -  CS     - ADBUS3  (NSS_CONFIG in the Semtech data sheet)
4  -               ADBUS4  (also chip select, NSS_DATA in the Semtech data 
5  -               ADBUS7

If both ADBUS3 and 4 are low, it's as if I selected ADBUS3. I've had some 
decent luck moving data both in and out for that (NSS_CONFIG, the radio's 
config registers, a few read-onlys).

I've yet to have any luck with reading from NSS_DATA (the radio's fifo where it 
stores incoming packets, or where you write to to send out packets). But I 
think this gives a clearer picture. (My apologies for the image quality... I have a 
crappy camera phone.)

As you can see, ADBUS4 goes low, the clock starts wiggling... MOSI and MISO are 
both low. ADBUS3/CS is high... so my chip selects are where I want them to be.

On page 38 of It says that 
it's compulsory to toggle NSS_DATA (ADBUS4) high between each byte read. No 
commands need be put on MOSI, if you start toggling the clock with ADBUS4 low 
(and ADBUS3 high), MISO should start spitting out data.

Now, it could *possibly* be that there's no data to read... but on the serial 
port version of this radio, I'm seeing a packet coming in about every second 
here in the office. And since I keep trying to read one byte at a time, for as 
long as several minutes, I should get *something*. All zeros, the whole way.

Another possibility is that the radio's not in receive mode, but this seems 
even less likely than that there are no packets in the fifo.

Now, if I don't toggle NSS_DATA/ADBUS4 high, I shouldn't expect to keep getting 
bytes. But I should get something the first time around. And I'm not.

The other thing is, in the data sheet it says    "To read bytes from the FIFO 
the timing diagram below should be carefully followed by the uC."   So, maybe 
I'm not doing it as perfect as I should be, my code is still rather sloppy.

To look at their diagram, the clock starts up no more than 1 cycle  after 
ADBUS4 goes low. But on the scope, I'm seeing at least 3 or 4 cycles worth. Is 
that the problem? And how do I tell this dumb thing to toggle high again more 

John O.
libftdi - see for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx

Current Thread