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

TCPIP stack problem

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



Joined: 20 Jul 2011
Posts: 375

View user's profile Send private message

TCPIP stack problem
PostPosted: Wed Apr 25, 2012 10:25 am     Reply with quote

I'm using MPlab v8.33 and CCS complier v4.069. I have pic18F66J60 so I tried to redefine stack for this chip, because it wasn't in the ccstcpip.h. So I stopped all chip options in ccstcpip.h and I added to my main program this code:
Code:

#include <18F66J60.h>
#Fuses HS,NOWDT
#use delay(clock=25M)
#define STACK_USE_CCS_PICEEC 1

The compiler doesn't show any errors (it compiles it fine), but when I load this program to the controller nothing happens. I tried with simple program and the controller works. So I think my modification is the problem.
What must I do to use the tcpip stack with 18F66J60? What do I have to change and where??
Thanks!
stoyanoff



Joined: 20 Jul 2011
Posts: 375

View user's profile Send private message

PostPosted: Wed May 02, 2012 1:07 am     Reply with quote

I tried with loading ex11.c from the examples in the stack. So as result I have the first 2 messages changing on the screen:
\fCCS TCP/IP Tut. and \nNo Ethernet. They are changing in around 0.5s.
Any ideas where to search for the problem???
Thanks!
jgschmidt



Joined: 03 Dec 2008
Posts: 184
Location: Gresham, OR USA

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

PostPosted: Wed May 02, 2012 11:34 am     Reply with quote

Did you create a definition for your hardware in CCSTCPIP.h and HARDWARE.h?

See this post:

http://www.ccsinfo.com/forum/viewtopic.php?t=37139

for an example of how I added support for a new board.
_________________
Jürgen
www.jgscraft.com
stoyanoff



Joined: 20 Jul 2011
Posts: 375

View user's profile Send private message

PostPosted: Sun May 13, 2012 6:50 am     Reply with quote

Hi, again!
I`ve made a simple change in the ccstcpip.h :
Code:

#elif STACK_USE_CCS_PICEEC
 #include <18F66J60.h>
  #fuses NOWDT, NODEBUG, HS
   #use delay(clock=25M)

and this:
Code:

 #define USER_LED1    PIN_A0
 #define USER_LED2    PIN_A1
 *0xF92=*0x00; 


I`ve made a simple program using ex11.c
Code:

   delay_ms(500);
   MACAddrInit();
   *0xF92=*0x00;
   output_high(PIN_A0);
   output_high(PIN_A1);
   IPAddrInit();
   StackInit();
   while(1)
   {
   StackTask();
   output_high(PIN_A0);
   output_high(PIN_A1);
   }

But in this case the 2 leds must light continiously but they flash. I double check but the controller is not restarting. Is this a problem??
When I connect a switch to the pcb, it doesn`t show a new device connected, so I think the stack is not working, but ....
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: Sun May 13, 2012 7:19 pm     Reply with quote

Try #use FAST_IO(A) - this will require you setting the port a TRIS settings manually.
_________________
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