Author |
Message |
Topic: SPI Wiznet garbage |
learner
Replies: 16
Views: 18355
|
Forum: General CCS C Discussion Posted: Fri Apr 09, 2010 2:47 pm Subject: SPI Wiznet garbage |
I'm getting more stable results using 1kohm pull-down resistors on SDI and SDO pins. I get 00's sometimes but it definitely is a lot better than before. Am still using setup_spi() and using spi_read() ... |
Topic: SPI Wiznet garbage |
learner
Replies: 16
Views: 18355
|
Forum: General CCS C Discussion Posted: Wed Mar 31, 2010 4:47 pm Subject: SPI Wiznet garbage |
wow, quite an observation PCM. so does this mean that setup_spi() would work better than #use spi, since spi_xfer has a bug?
I also have an 18F4553 with me but I've never worked with it before. I t ... |
Topic: SPI Wiznet garbage |
learner
Replies: 16
Views: 18355
|
Forum: General CCS C Discussion Posted: Wed Mar 31, 2010 12:56 pm Subject: SPI Wiznet garbage |
it's ok. thanks for all your help. but can u tell me if i am doing the read correctly? is spi_xfer(0) the right way to do it? |
Topic: SPI Wiznet garbage |
learner
Replies: 16
Views: 18355
|
Forum: General CCS C Discussion Posted: Wed Mar 31, 2010 12:22 pm Subject: SPI Wiznet garbage |
Spi modes 1 & 3 give no results at all, whereas mode 2 gives me all 00's in result.
The pull up resistor on SPI_EN is already done within the module itself and cant be changed because the board d ... |
Topic: SPI Wiznet garbage |
learner
Replies: 16
Views: 18355
|
Forum: General CCS C Discussion Posted: Mon Mar 29, 2010 9:56 pm Subject: SPI Wiznet garbage |
I tried putting 10kohm pullup resistors to SDO and SDI pin to see if it would make any difference but it did not. Then I did spi_write(0x55) and checked the SDO and clock on a scope and they looked pe ... |
Topic: SPI Wiznet garbage |
learner
Replies: 16
Views: 18355
|
Forum: General CCS C Discussion Posted: Thu Mar 18, 2010 3:28 pm Subject: SPI Wiznet garbage |
Strangely enough, this is what I get:
Read: 02 00 02 00
Read: 01 00 01 00
... |
Topic: SPI Wiznet garbage |
learner
Replies: 16
Views: 18355
|
Forum: General CCS C Discussion Posted: Thu Mar 18, 2010 2:40 pm Subject: SPI Wiznet garbage |
Hmm, looks like my reads are garbled. At one point in my test I did get 12 34 56 78, but I reset and ran again and here's what I got.
Read: 12 34 F0 08 ... |
Topic: SPI Wiznet garbage |
learner
Replies: 16
Views: 18355
|
Forum: General CCS C Discussion Posted: Thu Mar 18, 2010 12:48 pm Subject: SPI Wiznet garbage |
Yes, cdc is working. 'Read' means the data I'm reading from Wiznet, 'Test' means the values assigned directly to the variables:
Read: 12 04 00 08
Test: 89 AB CD EF ... |
Topic: SPI Wiznet garbage |
learner
Replies: 16
Views: 18355
|
Forum: General CCS C Discussion Posted: Thu Mar 18, 2010 10:59 am Subject: SPI Wiznet garbage |
any suggestions anyone? plz do let me know if you need more information. |
Topic: SPI Wiznet garbage |
learner
Replies: 16
Views: 18355
|
Forum: General CCS C Discussion Posted: Wed Mar 17, 2010 6:21 pm Subject: SPI Wiznet garbage |
My project is very similar to:
http://www.ccsinfo.com/forum/viewtopic.php?t=40693&start=15&postdays=0&postorder=asc&highlight=wiznet
I have the same wiznet812 module and PIC18F4455 ... |
|