SPI - equity

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are all SPI interfaces created compatible ??. I know there are 4 different modes, and different bit orders, but I've run into a "SPI" that doesn't seem to match what the mega32 can do. The chip in question is the VDrive2 http://www.vinculum.com/documents/datasheets/DS_VDRIVE2.pdf Looking at page 4 - it shows the timing diagram -- they have slipped in 3 more bits (data direction, data/status register read/write, and finally a status bit after the data has been sent) The real kicker is that the frame starts when ChipSelect transitions low to high.

This doesn't sound at all like what I read in the Mega32 data sheets --

1) should I just bit bang this thing using their SPI protocall??
2) bit bang a serial (115200) connection. (the uart is dedicated to talking to the logged device).
3) ????

Any suggestions would be helpful.

TIA

LEs

next time for shure.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I cannot access your link but do they really call it "SPI"? It's usually very 8 bit centric - though if 11 bis are involved you might be able to do it by two SPI transfers (16 bits) on the basis that the last 5 are ignored. But if extra SCK pulses would cause it problems (presumably taken as the start of the next 11 bits?) then I think you need to bit-bang it and, to be honest that's probably actually easier done on two PORT pins yourself - not sure where your mention of bit-banged serial comes into this though - it's presumably synchronous rather than asynchronous?

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes they call it SPI --
I don't know why you can't get to that URL -- it is the same one that DigiKey posts as the datasheet....

VDrive2 can be accessed via serial or SPI - which is why I mention the UART -- and it is async.

heres the part of the bulleted list from the data sheet..

    • Uses F.T.D.I.’s VNC1L embedded USB host controller I.C. device. • USB A’ type socket to connect USB Flash disk.
    • Traffic indicator LED.
    • 2 mm (0.08”) pitch 8 pin connector.
    • 8-way header interconnect cable provided.
    • Only four signals to connect, excluding power and ground.
    • Jumper selectable UART or SPI interfaces.

next time for shure.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can now access the site (guess it just had a heavy load or something) and I see what you mean. Maybe you could leave SPEN off and then clock out the first 3 bits using bit-bang then enable SPI to do the actual data transfer. But that might end up being more complicated than simply bit-banging the whole thing. I do think they are pushing it to call it SPI though - it's really a more generic "synchronous clock and data".

Cliff

PS Having said that this page at Wikipedia:

http://en.wikipedia.org/wiki/Ser...

does say:

Quote:
Transmissions often consist of 8-bit words, and a master can initiate multiple such transmissions if it wishes/needs. However, other word sizes are also common, such as 16-bit words for touchscreen controllers or audio codecs, like the TSC2101 from Texas Instruments; or 12-bit words for many digital-to-analog or analog-to-digital converters.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the reply -- I'll write up some bit banging -- When I get it working I'll post the code here.. With all the interest in logging to SD chips, someone else will be wanting to setup logging and not have the room/memory for implimenting fat.

next time for shure.