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.

Trouble sending SPI message from PIC16f876a to slave SPI device

Status
Not open for further replies.

gl1

Junior Member level 1
Joined
Sep 21, 2010
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,421
Hi,
I am having difficulty sendind a message from my 16F876a to SPI slave,

<PIC = Master> <SPI Device = Slave> I do not care what information Slave sends back,
I am using PIC Assembler.
I am using 8MHz XTAL
I initialize my PIC like this:see attachment

I am working off example from Microchip see attachment,
When i scope my CLK line of PIC I can not see it clocking the SPI at all.
So I believe i am missing something fundamental, or is PIC not able operate SPI at 8MHz atal, there is no indication of this in data sheet
 

Attachments

  • SPI help.txt
    2.1 KB · Views: 89
  • spi on microchip.pdf
    167.1 KB · Views: 88

Setting ADCON1 does not turn off analog functions. You also need to set the appropriate bits of CMCON. See the datasheet for the value of bits CM2:CM0 of CMCON.
 

after chacking data sheet i believe default value for CMCON is ok
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top