emulate SPI using UART

kelvin, You didn't say what processor you are trying to do this with, but the answer is, probably not.

Standar UARTs have an asynchronus receive, and an asynchronus transmit, and maybe a few handshaking signals. SPR requires a SYNCHRONOUS clock, transmit, and receive, as well as a chip select signal. They are very different beasts. If you have spare pins, you can bit-bang an SPI in software easier than try to manipulate the UARTs pins to emulate an SPI port.

Charlie

Reply to
Charlie Edmondson
Loading thread data ...

If you want to talk to a UART, either choose a micro with UART (PIC16F628), or bit-bang async serial data from the one you have.

Also, you could, in theory, set the UART for 7 bit data, one stop. Then 'fake' the start bit with a leading Zero from the SPI. The trailing One (past the end of the data) will be interpeted as a stop bit.

--
Luhan Monat (luhanis \'at\' yahoo \'dot\' com)
"The future is not what it used to be..."
http://members.cox.net/berniekm
Reply to
Luhan Monat

How would you ever get the data to agree with the SPI clock edges?

Reply to
Dave

On Thu, 12 May 2005 01:10:05 +1000, "Kelvin Chu" wroth:

Where is the UART? Is it on a microprocessor? Or is it on a desktop computer?

Jim

Reply to
James Meyer

Hi Group,

I'm a hardware newbie, so please excuse me if this seems like a dumb question.

I have a UART connection here which I'm trying to use to communicate with a SPI port... Is it possible to emulate SPI using a UART port?

I'm trying to do that, but I have read much documentation and it seems that it is impossible, but is there a really smart way that this can be done?

Thanks

Kelvin

Reply to
Kelvin Chu

Hi guys,

Thanks for all the replies so far, you guys have given me another direction to look at it from

I'm using a CC1010 processor by Chipcon (SPI to program it) and a FTDI232BM (provides a USB->UART, so PC->ftdi->chipcon)

(I know the FTDI2232C provides a SPI out front, but my school has too many FTDI232BMs left over :-P)

After reading some of your suggestions, I did some more research, and found that the FTDI232BM supports bit-bang mode !!! (I didn't think of this before), so I'm now looking into this direction

Again, thanks heaps!,

Kelvin

a

that

Reply to
Kelvin Chu

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.