SPI Interface

Started by tombhandley December 3, 2004

Does anyone know of any SPI examples, other than Peter Anderson's
(you have to buy his products to access the examples)?

I've designed with SPI with a variety of uPs (PICs, etc) for years
but I'm having trouble with the BX-24 interface. I can easily bit-
bang routines but I wanted to use the built-in hardware. I'm using a
BX-24 with a male header added to the SPI lines and OpenSPI()/SPICmd
(). I've tried all combinations of CPOL/CPHA and SCLK rates. I have a
dedicated pin for Slave Select. Also, why can't you send a constant
(like SPI_Channel) to SPICmd? I have to add a variable and assign a
channel, etc.

Failing the dedicated hardware approach, I was considering shutting
off the SPI hardware at the register level while still using the
extra pins. Has anyone tried that?

Thanks,

- Tom




--- In , "tombhandley" <gr13tbs@c...> wrote:
>
> Does anyone know of any SPI examples, other than Peter Anderson's
> (you have to buy his products to access the examples)?
>

There may be something of use at
http://www.basicx.com/codeexamples/examplecode.htm




Don, thanks. The SPIOpen() example is basically what I'm doing and
seems to work fine. The other examples come from a site that no
longer exists... My problem seems to be with SPICmd(). I have a Tek
TDS2024 DSO but it's hard to track the signals since the SPI lines
are also talking to the EEPROM... I know it works and I'm just doing
something 'stupid'... I wish they would have included SPI examples in
the BasicX docs.

- Tom

--- In , "Don Kinzer" <dkinzer@e...> wrote:
>
> --- In , "tombhandley" <gr13tbs@c...> wrote:
> >
> > Does anyone know of any SPI examples, other than Peter Anderson's
> > (you have to buy his products to access the examples)?
> >
>
> There may be something of use at
> http://www.basicx.com/codeexamples/examplecode.htm