Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[General] SPI Module PIC16f877

Status
Not open for further replies.

derser

Member level 1
Joined
Sep 24, 2008
Messages
33
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
1,502
Hello Friends.
I want to receive data from register-serial interface.
I try to do that with module Spi.I want to have clock signal on the SCK pin.
But when I start controller-I do not see anything.Can anyone tell some idea.

Bestregards:Barosov
 
Last edited by a moderator:

What do you mean by "register-serial interface" ?
Anyway, without showing your code or schematic, no one can help you unless guessing.
 

My guess is that you have not understood that SPI is an exchange of values between the 'master' and the 'slave' devices.
Also the SPI peripheral in your MCU only generates the SCK signal while it is exchanging values.
Therefore I assume that your MCU is the SPI master so what you need to do is:
- (option but recommended) set the 'slave select' line that goes to the slave device so that it is selected and listening
- write a value to the SPI SSPBUF - this will start the exchange process
- wait until the exchange is complete (check the BF bit in the SSPSTAT register)
- (optional but recommended) read the received value from the slave from SSPBUF
- (required if the first step was done) reset the 'slave select' line to the slave device
[Note that the MCU has an 'SS' pin that is connected to the SPI peripheral. However this is NOT the'slave select' line I'm talking about above as the 'SS' pin is only used when the SPI peripheral is in slave mode. Instead you will need to select a GPIO pin and use that to select the slave device from the master.]
Susan
 

What exactly you need.. brief explanation will gets you the proper answer..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top