Author |
Message |
Topic: comunicating between two PICs using SPI |
Macro
Replies: 18
Views: 31318
|
Forum: General CCS C Discussion Posted: Wed Jul 28, 2004 12:47 pm Subject: comunicating between two PICs using SPI |
What are you doing with the SS pin? Also search for this text in the data sheet 'disabling the SDO output.'
I did see the note you are talking about.
the SPI is in Slave mode with SS
pin c ... |
Topic: comunicating between two PICs using SPI |
Macro
Replies: 18
Views: 31318
|
Forum: General CCS C Discussion Posted: Wed Jul 28, 2004 10:01 am Subject: comunicating between two PICs using SPI |
Put this is the slave
While(1)
{ x = spi_read(0xAA);
}
Using that code on the slave and changing TRISC to 0x7F I was able to get the value of 'x' to be ... |
Topic: comunicating between two PICs using SPI |
Macro
Replies: 18
Views: 31318
|
Forum: General CCS C Discussion Posted: Tue Jul 27, 2004 1:48 pm Subject: Master working |
I was able to get the master working alone using this code:
setup_spi(spi_master | spi_l_to_h | spi_clk_div_64 );
while(true)
{
byte2 = spi_read(21); //start swapping bytes
delay_us(50); ... |
Topic: comunicating between two PICs using SPI |
Macro
Replies: 18
Views: 31318
|
Forum: General CCS C Discussion Posted: Tue Jul 27, 2004 9:52 am Subject: comunicating between two PICs using SPI |
How about writing a simple program to toggle the clock and data lines. That will tell you if the lines are stuck from a hardware fault. Toggle them from low to high Z to exercise the pull-up resisto ... |
Topic: comunicating between two PICs using SPI |
Macro
Replies: 18
Views: 31318
|
Forum: General CCS C Discussion Posted: Mon Jul 26, 2004 12:36 pm Subject: Re: comunicating between two PICs using SPI |
They don't.
This would only apply with soft SPI. Also if this was th problem, the resistor would still pull the input up fine.
You are aware that the SDO pin on one chip needs to connect to the SDI ... |
Topic: comunicating between two PICs using SPI |
Macro
Replies: 18
Views: 31318
|
Forum: General CCS C Discussion Posted: Mon Jul 26, 2004 10:04 am Subject: Re: comunicating between two PICs using SPI |
If the signal is only changing by 0.5v, you need to look again at the wiring. The signals should be good solid logic lines. Disable the master, and see if the line can be pulled high/low by you with ... |
Topic: comunicating between two PICs using SPI |
Macro
Replies: 18
Views: 31318
|
Forum: General CCS C Discussion Posted: Fri Jul 23, 2004 9:57 am Subject: comunicating between two PICs using SPI |
I know this has been talked about many times before, but I'm having different problems then were addressed in the archives. I�m trying to get an 18F8720 (master) to talk to an 18F2431 (slave), both r ... |
Topic: Example Input Capture code for PIC18F2431 |
Macro
Replies: 2
Views: 10306
|
Forum: General CCS C Discussion Posted: Fri Jun 11, 2004 1:25 pm Subject: Example Input Capture code for PIC18F2431 |
Thanks, I've actually looked at that example before but it's not exactly what I need. I need and example of setup and use of the Input Capture module that is on the 18fxx31 chips. |
Topic: Example Input Capture code for PIC18F2431 |
Macro
Replies: 2
Views: 10306
|
Forum: General CCS C Discussion Posted: Thu Jun 10, 2004 11:30 am Subject: Example Input Capture code for PIC18F2431 |
Does anyone have any examples in C on how to use Input Capture with an 18F2431 or any 18Fxx31 chip? I downloaded the latest version of the CCS software, looked in the 18f2431.h file and didn't see an ... |
|