Need help SPI component.
-
- Posts: 12
- Joined: Wed Oct 01, 2008 5:49 pm
- Location: Da Nang University of Technology-VietNam
- Contact:
Need help SPI component.
I can write data but not read data with SPI interface. Matrixmutilmedia's supporter can help me an example SPI interface ???
Thank in advanced
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Need help SPI component.
Hello,
Sure we can help. Here are a few quick questions to get started.
What are you interfacing to via SPI?
How do you know writes are working ok?
Do you have a demo program you are using that I could look at? (you can attach Flowcode programs to the forum if you need to)
Sure we can help. Here are a few quick questions to get started.
What are you interfacing to via SPI?
How do you know writes are working ok?
Do you have a demo program you are using that I could look at? (you can attach Flowcode programs to the forum if you need to)
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 12
- Joined: Wed Oct 01, 2008 5:49 pm
- Location: Da Nang University of Technology-VietNam
- Contact:
Re: Need help SPI component.
Ok Benj.
I uses TC72 to measurement temperature. When power on, TC72's configure register is 05h. Then i write cnfigure word 04h to TC72 active. I uses Proteus VSM to simulation circuit. So i know i can write data to TC72 but i can't read temprature. please see picture attacth

I uses TC72 to measurement temperature. When power on, TC72's configure register is 05h. Then i write cnfigure word 04h to TC72 active. I uses Proteus VSM to simulation circuit. So i know i can write data to TC72 but i can't read temprature. please see picture attacth

Thank in advanced
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Need help SPI component.
Hello
Are you toggling the CS enable line as shown in page 5 of the datasheet.
http://ww1.microchip.com/downloads/en/D ... 21743a.pdf
Basically send the CS line high then perform the read and when you are finished send the CS line low again.
Are you toggling the CS enable line as shown in page 5 of the datasheet.
http://ww1.microchip.com/downloads/en/D ... 21743a.pdf
Basically send the CS line high then perform the read and when you are finished send the CS line low again.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 12
- Joined: Wed Oct 01, 2008 5:49 pm
- Location: Da Nang University of Technology-VietNam
- Contact:
Re: Need help SPI component.
Ever have an example I2C EEprom on MM website
http://www.matrixmultimedia.com/Downloa ... .php?id=39
and then i do I2c very well. I sucessfuly to read time from DS1307 RTC with I2C protocol

I think MM'supporters have an example about SPI component. I will learn in these example.
Thanks
http://www.matrixmultimedia.com/Downloa ... .php?id=39
and then i do I2c very well. I sucessfuly to read time from DS1307 RTC with I2C protocol

I think MM'supporters have an example about SPI component. I will learn in these example.
Thanks
Thank in advanced