|
|
View previous topic :: View next topic |
Author |
Message |
Guest
|
|
Posted: Tue Aug 24, 2004 7:41 am |
|
|
in the QT3View, I saw the SPI speed is 2.553khz, and all the others are the same three digits after"." how can I set timer2 to these spi speeds. just for my case, clock is 8mhz. |
|
|
Guest
|
|
Posted: Tue Aug 24, 2004 12:49 pm |
|
|
I have been working on it for three days, anyone would help? I am a little frustrated by it. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Aug 24, 2004 1:05 pm |
|
|
Quote: |
In the QT3View, I saw the SPI speed is 2.553khz, and all the others are the same three digits after"." How can I set timer2 to these spi speeds. Just for my case, clock is 8mhz. |
Quote: | I have been working on it for three days, anyone would help? I am a little frustrated by it. |
I think you should write a test program, similar to the sample
shown in the following link.
http://www.ccsinfo.com/forum/viewtopic.php?t=20279&start=1
Then experiment with the parameters in the setup_spi() function,
while looking at the output waveforms with an oscilloscope.
Experiment with the parameters until you understand how the function
works, and find the correct parameters to produce your desired SPI
clock frequency. You may find that you can't get a frequency as
low as you desire. You might have to reduce your PIC clock frequency.
I don't know. But when you do the experiments, you will find out.
And, when you do these tests, you learn how to solve problems for
yourself. |
|
|
Guest
|
|
Posted: Tue Aug 24, 2004 2:32 pm |
|
|
what kinds of osciloscope should I use, I did not have one, I shold buy one according to your suggestions. |
|
|
Guest
|
|
Posted: Wed Aug 25, 2004 11:58 am |
|
|
QT300 is setup as SPI idle low, slave mode, I setup_spi(SPI_MASTER|SPI_H_TO_L|SPI_CLK_T2) is this correct. |
|
|
Guest
|
|
Posted: Wed Aug 25, 2004 2:48 pm |
|
|
I have setup QT300 as slave as QT guys told me., still nothing happened. I also posted my program there waiting for help.
SOS |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|