View previous topic :: View next topic |
Author |
Message |
luckyboy
Joined: 19 Sep 2010 Posts: 4
|
Transfer data in SPI interface |
Posted: Mon Mar 14, 2011 11:51 pm |
|
|
Hi, everybody. I use SPI interface to transfer data between two pic 16f877a. I transfered integer very successful but when I transfer float data or string, I did not transfer. Can you help me to transfer float or string in SPI interface. I am using CCS. |
|
|
hayee
Joined: 05 Sep 2007 Posts: 252
|
|
Posted: Tue Mar 15, 2011 12:05 am |
|
|
You cannot directly send the floating or string through spi, you have to break the floating number into 4bytes and then send it using spi. |
|
|
luckyboy
Joined: 19 Sep 2010 Posts: 4
|
|
Posted: Tue Mar 15, 2011 12:33 am |
|
|
Thanks you, Can you write code for 16f877a in SPI interface. I try test code for 18f252 but I don't success. |
|
|
luckyboy
Joined: 19 Sep 2010 Posts: 4
|
|
Posted: Tue Mar 15, 2011 12:52 am |
|
|
Great, I transfer float data successful. |
|
|
semmoor
Joined: 09 May 2012 Posts: 46 Location: KSA
|
Hi |
Posted: Mon Jul 02, 2012 5:05 pm |
|
|
luckyboy wrote: | Great, I transfer float data successful. |
can you please share the code? if you don't mind. |
|
|
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
Posted: Mon Jul 02, 2012 10:30 pm |
|
|
Quote: | Can you write code for 16f877a in SPI interface |
I believe the general answer from the guys here will be a redundant: "NO"
... imagine people cursing while you read such answer the next time you ask somthing like that.
G. _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Mon Jul 02, 2012 10:44 pm |
|
|
Gabriel wrote: | Quote: | Can you write code for 16f877a in SPI interface |
I believe the general answer from the guys here will be a redundant: "NO"
... imagine people cursing while you read such answer the next time you ask somthing like that.
|
redundant and emphatic. _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
|