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

Latest TCP/IP stack from Microchip
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
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

Latest TCP/IP stack from Microchip
PostPosted: Wed Dec 17, 2008 4:59 pm     Reply with quote

I just got my PCWH compiler, primarilly so I can use TCP/IP. My compiler version is 4.082 and the TCP/IP stack seems to be based on Microchip's 3.75 version.

When I go to Microchip I find that they are up to version 4.55. The new documentation looks pretty good, it shows DNS, sockets, and other goodies.

I particularly like the DNS because I develop mostly client applications and currently have to hardcode the IP addresses I want to talk to.

Has anyone ported this latest version to work with PCH?
Are there any plans for CCS to upgrade their version of the stack?

Thanks
andrewg



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

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

PostPosted: Thu Dec 18, 2008 3:12 am     Reply with quote

The ported 3.75 stack has DNS and sockets. See the examples folder. What other features do you need?
_________________
Andrew
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

TCP/IP Client Applications
PostPosted: Thu Dec 18, 2008 10:44 am     Reply with quote

I found the DNS module, thanks. I'll see what I can do with it.

Most of the CCS examples are server-oriented. I want to write a ping (ICMP client) application that uses DNS, that runs on the PIC. At the same time, I want the option of disabling ICMP server routines so the PIC does NOT respond to a ping, and to save memory.

Microchip's AN833 refers to a STACK_CLIENT_MODE option. I cannot find any reference to this in the CCS code. Did this not make it across?

Some good client-side examples would be nice, showing DNS and sockets.

I have searched this forum for information and not found what I needed, perhaps someone knows of some posts I missed.

Thanks
libor



Joined: 14 Dec 2004
Posts: 288
Location: Hungary

View user's profile Send private message

PostPosted: Thu Dec 18, 2008 10:44 am     Reply with quote

There are 1382 lines of text added to the 'what's new' .txt file between versions 3.75 and the current 4.55 on the Microchip website.
...about half of the issues are about new features added, and half of them are about bugs removed.
Not getting deep into any particular feature (or bug) I am just curious about what do we really miss using a version frozen more than 2 years ago...
leejok2003
Guest







PostPosted: Thu Dec 18, 2008 10:46 am     Reply with quote

does anyone tried the examples in the CCS TCP IP stack tutorial?
i was having lots of error while compiling example 7b...help...
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

TCP/IP Tutorial
PostPosted: Thu Dec 18, 2008 11:13 am     Reply with quote

to Leejok2003...

I have been working through the tutorials myself and have been successful through exercise 13. I'll be glad to help you if I can. I amusing the CCS Embedded Ethernet development board (PICENS). Which board are you using?
leejok2003
Guest







Re: TCP/IP Tutorial
PostPosted: Thu Dec 18, 2008 8:44 pm     Reply with quote

jgschmidt wrote:
to Leejok2003...

I have been working through the tutorials myself and have been successful through exercise 13. I'll be glad to help you if I can. I amusing the CCS Embedded Ethernet development board (PICENS). Which board are you using?


Thanks jgschmidt...actually I didn't have the real PICNES board but I am using simulator that includes a PIC18F4620 and enc28j60 which are also contained in the PICNES (if I am not mistaken). I am having problem when compiling the code bellow:

Code:

#include <18f4620.h>
#use delay(clock=20 000 000)
#USE rs232(baud=9600, xmit=PIN_C6,rcv=PIN_C7)
#fuses HS, NOWDT, NOLVP,NODEBUG
#define STACK_USE_CCS_PICNES  TRUE
#define STACK_USE_MCPENC   TRUE
#include "drivers\stacktsk.c"
#include "ccstcpip.h"

void main(void) {
   MAC_ADDR mac_dest;

   printf("\r\n\nCCS TCP/IP TUTORIAL 7B\r\n");

   MACAddrInit();

   MACInit();

   mac_dest.v[0]=0xFF;
   mac_dest.v[1]=0xFF;
   mac_dest.v[2]=0xFF;
   mac_dest.v[3]=0xFF;
   mac_dest.v[4]=0xFF;
   mac_dest.v[5]=0xFF;

   while(TRUE) {
      if (MACIsTxReady(TRUE)) {
         MACPutArray(ExampleIPDatagram, sizeof(ExampleIPDatagram));
         MACPutArray(ExampleUDPPacket, sizeof(ExampleUDPPacket));

         MACPutHeader(
               &mac_dest, ETHER_IP,
               sizeof(ExampleIPDatagram) + sizeof(ExampleUDPPacket)
            );

         MACFlush();

         output_toggle(USER_LED2);
         delay_ms(1000);
      }
   }
}


The error mainly related to the "helpers.c" file and some indicate "duplicated #"... can you help me with this? Thanks... Smile
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

TCP/IP and Simulator
PostPosted: Fri Dec 19, 2008 10:52 am     Reply with quote

to Leejok2003:

I am not familiar with simulators but at first glance it looks like you have duplicated code that is already in CCSTCPIP.H Also, check your spelling - the board name is PICENS.

Your main file should ONLY include CCSTCPIP.H, just like the example in the exercise book. Take out the first seven lines.

Then, go to CCSTCPIP.H and select only one of the development boards listed. If your simulator can not simulate one of these boards you will have to add your own. Just follow the example of one of the existing boards.

You will also have to go into HARDWARE.H to define the pin connections for your simulated board.

If you want your simulator to behave like one of the defined boards then use the information in CCSTCPIP.H and HARDWARE.H to set up the simulator. Critical are the connections between the PIC and the ethernet chip.

For the exercises using the LCD display, if you want to simulate that, look at drivers/MLCD.C for the pin connections to the LCD.

I hope that helps.

What is the simulator you are using?
andrewg



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

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

PostPosted: Fri Dec 19, 2008 10:44 pm     Reply with quote

To disable ping, search for ICMP_ECHO_REQUEST and disable the relevant code. It looks like you need to comment out one block in stacktsk.c.

If there's one thing I've noticed about CCS "libraries" in general, is that they aren't designed for reuse. They're more like examples that you are expected to modify as needed.

I'm dreading any possible future stack upgrade, as I've got tweaks scattered all over the TCP/IP stack where I've needed to fix bugs and add features. Sad
_________________
Andrew
leejok2003
Guest







Re: TCP/IP and Simulator
PostPosted: Sat Dec 20, 2008 12:21 am     Reply with quote

jgschmidt wrote:
to Leejok2003:

I am not familiar with simulators but at first glance it looks like you have duplicated code that is already in CCSTCPIP.H Also, check your spelling - the board name is PICENS.

Your main file should ONLY include CCSTCPIP.H, just like the example in the exercise book. Take out the first seven lines.

Then, go to CCSTCPIP.H and select only one of the development boards listed. If your simulator can not simulate one of these boards you will have to add your own. Just follow the example of one of the existing boards.

You will also have to go into HARDWARE.H to define the pin connections for your simulated board.

If you want your simulator to behave like one of the defined boards then use the information in CCSTCPIP.H and HARDWARE.H to set up the simulator. Critical are the connections between the PIC and the ethernet chip.

For the exercises using the LCD display, if you want to simulate that, look at drivers/MLCD.C for the pin connections to the LCD.

I hope that helps.

What is the simulator you are using?


Thanks for the advice. Well, I have removed the 7 lines and remain the rest as in the example 7b, but I am still having error messages such as identifier duplication between the "enc28j60" and "eth97j60" file. Where can I disable the eth97j60 options ?
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

compile errors
PostPosted: Sat Dec 20, 2008 10:52 am     Reply with quote

Check your settings in CCSTCPIP.H. From your error messages, it looks like you have selected too many items and mutually exclusive header files are being pulled in.

This is what the beginning of CCSTCPIP.H should look like:
Code:

#define STACK_USE_CCS_PICENS   1 //18f4620 + enc28j60
#define STACK_USE_CCS_PICNET   0 //18f6722 + realtek
#define STACK_USE_CCS_PICEEC   0 //18f97j60

If it still does not compile I recommend you refresh your files from the distribution media. Perhaps in your experimenting something got changed. For me, the code compiles straight out of the box after selecting the correct board.

Jurgen
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

TCP/IP Upgrades
PostPosted: Sat Dec 20, 2008 11:00 am     Reply with quote

Thanks Andrew,

Yeah, I dread having to make mods to the source code. According to Darren Rook, CCS is aiming to get the compiler to work with the Microchip code directly so porting will not be necessary. This would be a great step forward in being able to use other code libraries as well. No delivery date available.
leejok2003
Guest







PostPosted: Sat Dec 20, 2008 12:48 pm     Reply with quote

Thanks jgschmidt!
I got it correct after referring your post. I will continue my tutorial on CCS after struggling in MPLAB to learn the TCP IP stack. Smile
leejok2003
Guest







PostPosted: Sat Dec 20, 2008 1:08 pm     Reply with quote

I am having display problem in ex7b again. It seems that I can't include the rs232 use in the code, else I am getting error. The display in the terminal shows incorrect char...what happened?
asmallri



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

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

Re: TCP/IP Upgrades
PostPosted: Sat Dec 20, 2008 1:52 pm     Reply with quote

jgschmidt wrote:
Thanks Andrew,

Yeah, I dread having to make mods to the source code. According to Darren Rook, CCS is aiming to get the compiler to work with the Microchip code directly so porting will not be necessary. This would be a great step forward in being able to use other code libraries as well. No delivery date available.


Based on my experience of porting code from C30 to PCD I would not hold my breath.
_________________
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
Goto page 1, 2  Next
Page 1 of 2

 
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