CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

SPI

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
udarapriyankara



Joined: 01 Aug 2009
Posts: 1

View user's profile Send private message Send e-mail

SPI
PostPosted: Sat Aug 01, 2009 2:46 am     Reply with quote

Sad Sad Sad Sad Sad

Dear all

I want to use pic16f877a as spi slave for st7540 powerline modem. I can't read spi but i can't write spi.

I want to send and receive 24 bits at once via spi.
How should I use spi_xfer for transmit 24 bit at once.

Please help me
Rohit de Sa



Joined: 09 Nov 2007
Posts: 282
Location: India

View user's profile Send private message Visit poster's website

PostPosted: Sat Aug 01, 2009 7:08 am     Reply with quote

Read the manual!!!! In particular, search for the '#use SPI'. This is an example statement:
Code:
#use spi(DI=PIN_B1, DO=PIN_B0, CLK=PIN_B2, ENABLE=PIN_B4, BITS=24)

I haven't tried it myself, but it should work.

Rohit
davis256



Joined: 18 Jan 2011
Posts: 4

View user's profile Send private message

PostPosted: Tue Jan 18, 2011 9:45 pm     Reply with quote

Hello udaya,

Are u done with the project?
Could you post the code and schematics?
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Tue Jan 18, 2011 9:53 pm     Reply with quote

he probably just followed the schematics in the datasheet.

I did a project with the TDA5150 and just followed the datasheet... added a PIC18F26j11 and it everything worked fabulously.

read the datasheet....

It's your friend.
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
davis256



Joined: 18 Jan 2011
Posts: 4

View user's profile Send private message

SPI
PostPosted: Mon Jan 24, 2011 9:56 pm     Reply with quote

Hi bkamen,

This is on ST7540.
I have the schematic from data sheet. Need a precise answer.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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