-
1. Re: Programming XRT8000 Clock divider using SPI-- IN PSO3
vijay.subramanian May 27, 2011 7:28 AM (in response to vijay.subramanian)In the same project above mentioned, with the use of internal clock, the SCLK clock is not output at the GPIOS, can i have a example project for spi master alone.... i am facing problems using the example master slave spi communication with the development kit,,,,
-
2. Re: Programming XRT8000 Clock divider using SPI-- IN PSO3
gautamd_41 May 31, 2011 2:16 AM (in response to vijay.subramanian)Hi Viji,
You can use the same example project by deleting the slave part of it.
SPI has 4 modes, depending on 2 bits (CPOL and CPHA). By looking at the Timing diagram of XRT8000, you can decide which mode to use.
Make sure that the MOSI and MISO pins are unsynchronized on the SPI master component.
SPIM_Start( ) - initializes and starts the SPI component.
SPIM_WriteTxData(value) - is a blocking statement wich writes into the Write Buffer of the SPI Master component. The data will not over-write and will wait till the previous data is sent out.
You will observe the clock on sclk pin whenever the WriteTx command is issued. For a duration of 1 byte, the ss (Slave Select) will also go low (since it is an active low logic).
-
3. Re: Programming XRT8000 Clock divider using SPI-- IN PSO3
vijay.subramanian May 31, 2011 11:18 PM (in response to vijay.subramanian)Hi dasg,
Thanks for ur reply, how to read the spi slave registers, according to my SPI BASED CLOCK DIVIDER CHIP, it requires to send a 8bit value specifying read enable,and address to be read, so that when this value for read is written to spi, on the next (sclk) clock cycle spi value will output that value, i want to know in this case, what is API to be written for getting the data out from the SPI SLAVE. as u told the sclk will be available only on the SpiWriteData API execution. for ex: i have to write like this
1. 0x00 (write enable and address value)
2. 0x30 ( data to be written)
3. 0x80 (read enable and address value)
4. next sclk register data will out from spi.
i am attaching the datasheet of the spi clock divider IC, pls if possible give a sample code for the above.
with regards,
vijay s
-
xrt8000.pdf 180.2 K
-
-
4. Re: Programming XRT8000 Clock divider using SPI-- IN PSO3
gautamd_41 Jun 2, 2011 4:52 AM (in response to vijay.subramanian)Hi Vijay,
Based on your previous comment, a project is created and attached along with this mail.
Try interfacing the PSoC with XRT8000 using this code.
Based on your previous comment, the following is done in the project.
1) Four SPI Master writes are done.
a) First one is for Write Enable (0x00).
b) Second is the data to be written (0x30).
c) Third is the read enable and address value (0x80).
d) Fourth is a dummy byte write. This generates SCLK (clock) and SS (Slave Select) signals and the slave (XRT8000) will send the byte requested.
2) In the SPI protocol implementation, when the Master writes a byte into Slave, the Slave will also Write a byte into the Master's Rx Buffer (it may be a junk or valid data depending upon the command sent). Hence, the first 3 write operations will result in the accumulation of 3 junk values received from the slave. So, the first 3 read operation is done to read the junk values available in the Rx buffer. The 4th value read is the desired value and is displayed on LCD.
-
SPI_XRT_1.zip 263.2 K
-
-
5. Re: Programming XRT8000 Clock divider using SPI-- IN PSO3
sivananda.reddy Oct 3, 2012 1:44 AM (in response to vijay.subramanian)hi viji...
May i know from where u got XRT8000 device.........actually i also need it for my project....do you have any idea about its availability in India ?
-
6. Re: Programming XRT8000 Clock divider using SPI-- IN PSO3
akshay.phatak Oct 4, 2012 10:38 AM (in response to vijay.subramanian)It looks like it is there on digikey and they do ship to India. You can order it from them.
-
7. Re: Programming XRT8000 Clock divider using SPI-- IN PSO3
sivananda.reddy Oct 4, 2012 11:29 PM (in response to vijay.subramanian)hi QuickSilver.........thak you very much...........hope it will be useful to me........
-
8. Re: Programming XRT8000 Clock divider using SPI-- IN PSO3
romil.argi Jul 14, 2015 4:14 AM (in response to vijay.subramanian)Hello Reshmi,
The PSoC Creator 3.0 SP2 (3.0.0.3140) and the miniprog3 revision B.
The picture is attached.
I use the psoc program and have error. Check the image
Regards,
Romil
-
Psoc Program Error.png 66.9 K
-
PSoc3-Circuit.jpg 1.7 MB
-
-
9. Re: Programming XRT8000 Clock divider using SPI-- IN PSO3
user_14586677 Jul 14, 2015 5:49 AM (in response to vijay.subramanian)Did you make the recommended change in red by the programmer utility ?
Regards, Dana.
-
10. Re: Programming XRT8000 Clock divider using SPI-- IN PSO3
romil.argi Jul 15, 2015 6:40 AM (in response to user_14586677)hi Dana,
i try and the program failed.... see the image...
-
psoc-error2.png 73.9 K
-