??? 10/19/04 13:34 Read: times |
#79566 - RE: Just use SPI Responding to: ???'s previous message |
Oleg,
I do not wish to start a flame here Me too. But the devil sits in details. OK, but where is a problem with SPI clock for this project? The problem is that you said about SLAVE mode that this mode may accept clock duration up to 1 machine cycle (1us at 12MHz clock) I said Put the device into SLAVE mode. In this mode you can receive bit at any baud rate up to 1 machine cycle (1us at 12MHz clock). And I am adding now: for AT89LS53. Should I add this words every time to be not flamed(:-)? If somebody will try to use SPI in slave mode with such frequency (not for vocoder but in another project) then are you need to be claimed for these words? That’s the theatre of the Absurd. Somebody has to get an idea first, and then refer to the specific datasheet. Again, my suggestion is only one possible way how to implement hardware SPI for the vocoder specified in the original post. Have you known the OCS frequency which original poster works with? I do not know but I have read that he said in one of posts above: "I am worry about missing data if use Fosc at 230400 Hz." Not exactly. He just tried to work with the USART mode 0. For 19200 baud this case gives 19200*12=230400 Hz system clock. I don’t know the original frequency but I suppose to do this job properly 24 MHz will be enough. Your question. But my question is: which SPI mode should be used? Your answer. There are four SPI modes from 0 to 3. Because TX data from vocoder is shifted out with rising edge of SCK so SLAVE should lock them at falling edge when they are stabilized. So we may select SPI mode 1 or 2. Mode 1 requires /SS pin to be toggled high and then low between each byte transmitted for correct work. In mode 2, Slave requires one extra clock as start transmission signal. As for me, so I would prefer to use mode 2 but only if it is possible to run SPI with rising edge of CHAN_TX_STRB signal. For it we need either connect inverter before /INTx or use polling method or utilize derivative which supports positive edge interrupt (an input of PCA of AT89C51RD2 for instance). Why asking if you know the answer? Should we design the vocoder project here on the forum (:-)? Have fun, George |
Topic | Author | Date |
interface 16-bit Synchronous serial data | 01/01/70 00:00 | |
RE: interface 16-bit Synchronous serial data | 01/01/70 00:00 | |
RE: interface 16-bit Synchronous serial data | 01/01/70 00:00 | |
RE: interface 16-bit Synchronous serial data | 01/01/70 00:00 | |
RE: interface 16-bit Synchronous serial | 01/01/70 00:00 | |
RE: interface 16-bit Synchronous serial | 01/01/70 00:00 | |
RE: interface 16-bit Synchronous serial | 01/01/70 00:00 | |
RE: interface 16-bit Synchronous serial | 01/01/70 00:00 | |
RE: interface 16-bit Synchronous serial | 01/01/70 00:00 | |
RE: interface 16-bit Synchronous serial | 01/01/70 00:00 | |
Just use SPI | 01/01/70 00:00 | |
RE: Just use SPI | 01/01/70 00:00 | |
RE: Just use SPI | 01/01/70 00:00 | |
RE: Just use SPI | 01/01/70 00:00 | |
RE: Just use SPI![]() | 01/01/70 00:00 |