CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Problem with PIC18F4620 - ENC28J60 communication

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
florinfp



Joined: 08 Sep 2008
Posts: 2

View user's profile Send private message

Problem with PIC18F4620 - ENC28J60 communication
PostPosted: Fri Aug 28, 2009 6:44 am     Reply with quote

Hello. I'm working at a project with an PIC 18F4620 and an ENC28J60 to try ethernet communication. I made two boards:
one with PIC18F4620 (I already had that for my other projects), and one board with ENC28J60 and its ethernet connection.
The two boards are connected with an DB25 connector. The PIC18F4620 is running at 40MHZ (this come from an 10MHZ crystal and H4 setting),
and I'm sure that the schematics and the code are OK, but all I'm receiving from these boards is packets with Header Checksum Incorrect
(I use for this WIRESHARK NETWORK ANALYZER PROTOCOL).
I suspect that the problem is in SPI communication between PIC and ENC. The distance between the PIC and ENC is approximately 10cm with an
DB25 connector in the middle. Could be this the problem? Should I make a board with PIC and ENC on a single board?
What is (or how can I calculate) the relations between the distance and speed in an SPI communication?

Any advice will be very helpful.
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Fri Aug 28, 2009 7:59 am     Reply with quote

Header checksum and crc error are two different things. CRC covers the entire MAC frame. If you are getting protocol errors (such as header checksum errors) but are not getting CRC errors then you have a problem with your software stack not with the Ethernet controller.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
florinfp



Joined: 08 Sep 2008
Posts: 2

View user's profile Send private message

PostPosted: Mon Aug 31, 2009 1:34 am     Reply with quote

Thanks for the advice. I will verify my code again.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group