View previous topic :: View next topic |
Author |
Message |
stoyanoff
Joined: 20 Jul 2011 Posts: 375
|
TCPIP stack problem |
Posted: Wed Apr 25, 2012 10:25 am |
|
|
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
|
|
Posted: Wed May 02, 2012 1:07 am |
|
|
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
|
|
|
stoyanoff
Joined: 20 Jul 2011 Posts: 375
|
|
Posted: Sun May 13, 2012 6:50 am |
|
|
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: 1634 Location: Perth, Australia
|
|
Posted: Sun May 13, 2012 7:19 pm |
|
|
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!! |
|
|
|