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

ENC28J60 in CCS' modified TCP/IP stack

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



Joined: 12 Jul 2007
Posts: 43

View user's profile Send private message

ENC28J60 in CCS' modified TCP/IP stack
PostPosted: Thu Aug 09, 2007 8:50 am     Reply with quote

Does the software controlling the ENC28J60 in CCS' modified TCP/IP stack enable/disable the chip as it needs to be used? I am using the SPI for the ethernet as well as the EEPROM it will be storing data to. Limitied testing seems to support the claim that the chip enable/select pin is controlled "on demand" so when I am not running ethernet the SPI is free.

Does anyone know for sure?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Aug 09, 2007 12:30 pm     Reply with quote

If you have a question about the code in a specific file, post the name
of the file (or files).
javick82



Joined: 12 Jul 2007
Posts: 43

View user's profile Send private message

PostPosted: Thu Aug 09, 2007 12:36 pm     Reply with quote

See the MAC/NIC settings in the hardware.h file. I guess the other files would be mac.c and tcp.c.

Upon completion of a task using the ethernet, does the ENC28J60 chip go disabled?

It is really a general question pertaining to the overall operation of the entire modified TCP/IP stack.
andrewg



Joined: 17 Aug 2005
Posts: 316
Location: Perth, Western Australia

View user's profile Send private message Visit poster's website

PostPosted: Fri Aug 28, 2009 4:42 am     Reply with quote

@javick82: CCS's ENC28J60 support code only selects the chip when it's used. Your code is free to do whatever it likes with the SPI bus whenever the stack isn't being used. Importantly, the TCP/IP is polled, not interrupt driven, so there's no issues with the stack interfering with your code. Just make sure none of your interrupts use the SPI bus either.

@theshyboys: The support code is available for download from the CCS support web site. Make sure your maintenance is paid up!
_________________
Andrew
asmallri



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

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

PostPosted: Fri Aug 28, 2009 6:07 am     Reply with quote

andrewg wrote:
Your code is free to do whatever it likes with the SPI bus whenever the stack isn't being used.


Not quite. If you change the SPI bus mode then you must restore the mode before accessing the Ethernet controller.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
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