Author |
Message |
Topic: SPI master problem, spi_read not working PIC16F887 |
derrickbez
Replies: 12
Views: 13674
|
Forum: General CCS C Discussion Posted: Mon Mar 31, 2008 6:36 pm Subject: SPI master problem, spi_read not working PIC16F887 |
I just got it to work. I had an LED that was taking the voltage down.
Thank you for your time and your help.
working Code:
#include <16F887.h>
#FUSES INTRC,NOWDT,NOPUT,NOMCLR,NOPROTECT ... |
Topic: SPI master problem, spi_read not working PIC16F887 |
derrickbez
Replies: 12
Views: 13674
|
Forum: General CCS C Discussion Posted: Mon Mar 31, 2008 6:07 pm Subject: SPI master problem, spi_read not working PIC16F887 |
Actually the MISO pin is only showing 0 for low and 2 volts for high. All of my other pins are giving me 0 for low and 5V for high. Could this be the problem? |
Topic: SPI master problem, spi_read not working PIC16F887 |
derrickbez
Replies: 12
Views: 13674
|
Forum: General CCS C Discussion Posted: Mon Mar 31, 2008 5:24 pm Subject: SPI master problem, spi_read not working PIC16F887 |
Here is the data being received (MISO):
http://img170.imageshack.us/img170/8056/misodatafk1.th.pnghttp://img87.imageshack.us/img87/8458/mosidataqx5.th.png[/img]
The data is TTL and the voltages lo ... |
Topic: SPI master problem, spi_read not working PIC16F887 |
derrickbez
Replies: 12
Views: 13674
|
Forum: General CCS C Discussion Posted: Mon Mar 31, 2008 4:58 pm Subject: SPI master problem, spi_read not working PIC16F887 |
My compiler is version 4.020b.
Is there a way to ensure that the PIC is reading bits on the falling edge? |
Topic: SPI master problem, spi_read not working PIC16F887 |
derrickbez
Replies: 12
Views: 13674
|
Forum: General CCS C Discussion Posted: Mon Mar 31, 2008 4:43 pm Subject: SPI master problem, spi_read not working PIC16F887 |
Ok, I put both of those in after, just to see if they do anything. I have an LED set to light up if a 0x02 is ever received. Once it works i will save the data into an array as you have suggested.
I ... |
Topic: SPI master problem, spi_read not working PIC16F887 |
derrickbez
Replies: 12
Views: 13674
|
Forum: General CCS C Discussion Posted: Mon Mar 31, 2008 4:12 pm Subject: SPI master problem, spi_read not working PIC16F887 |
You have to have an account to access the data sheet. Here is all they say about the SPI:
*The M9 SPI interface communicates in Mode 1, which means that the clock polarity is zero and the clock pha ... |
Topic: SPI master problem, spi_read not working PIC16F887 |
derrickbez
Replies: 12
Views: 13674
|
Forum: General CCS C Discussion Posted: Mon Mar 31, 2008 3:39 pm Subject: SPI master problem, spi_read not working PIC16F887 |
I am communicating to an RFID reader using SPI. The reader is the Skyetek M9 and it is the SPI slave device. My PIC16F887 is the SPI master. After about a week I finally was able to get the M9 to tran ... |
|