View previous topic :: View next topic |
Author |
Message |
udarapriyankara
Joined: 01 Aug 2009 Posts: 1
|
SPI |
Posted: Sat Aug 01, 2009 2:46 am |
|
|
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
|
|
Posted: Sat Aug 01, 2009 7:08 am |
|
|
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
|
|
Posted: Tue Jan 18, 2011 9:45 pm |
|
|
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
|
|
Posted: Tue Jan 18, 2011 9:53 pm |
|
|
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
|
SPI |
Posted: Mon Jan 24, 2011 9:56 pm |
|
|
Hi bkamen,
This is on ST7540.
I have the schematic from data sheet. Need a precise answer. |
|
|
|