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

Remote Installation

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



Joined: 10 Feb 2007
Posts: 78

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger

Remote Installation
PostPosted: Wed Jan 16, 2008 7:17 am     Reply with quote

Hey guys,

I am facing a problem and was wondering if you guys can give your experienced insights on it.

I have developed an internet communications module for inverters, where in the data of the inverter is displayed on a webpage. This communications board is based on the CCS internet kit. Only difference is 18F8722 and RTL8019AS as the ethernet controller.

Now my question is, is it possible to remotely transfer a 16Kb file to an external memory eg 24LC256 through the ethernet.

Would appreciate any response on this, cause it seems I have hit a dead end.

Thanks
SET



Joined: 15 Nov 2005
Posts: 161
Location: Glasgow, UK

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

PostPosted: Wed Jan 16, 2008 7:21 am     Reply with quote

You could use TCP or UDP to transfer packets to the remote device, which would then re-program the external EEPROM. Higher level file based protocols such as FTP could also be used, but in that case you would need some sort of filesystem at the remote end.
tranz



Joined: 10 Feb 2007
Posts: 78

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger

PostPosted: Wed Jan 16, 2008 12:26 pm     Reply with quote

All I have at the remote end is the PIC and the ethernet controller (RTL8019AS) which has a 1kb buffer space and an external EEPROM device. Although there are buffers available, I am still unable to think of how to join the 1Kb packets into 16.
Then again if this can be done, how can the packets be sent to the remote embedded device ( by this I mean the formation of the packets).
Example : if the 16Kb file is a binary one, what kind of algorithm can be used for dividing the packets into 1500 bytes sized packets (for TCP).
SET



Joined: 15 Nov 2005
Posts: 161
Location: Glasgow, UK

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

PostPosted: Thu Jan 17, 2008 9:55 am     Reply with quote

You wouldnt attempt to send all 16k, you would send in smaller chunks (say 512 bytes), which would easily fit in a TCP packet. So you would have something like:
[command to reprogram EEPROM] [block number] [data bytes] [checksum]
defined within your TCP packet.
Coco the monkey
Guest







PostPosted: Thu Jan 17, 2008 10:07 am     Reply with quote

Look into using TFTP [Trivial File Transfer Protocol]. It's kind of a stripped-down version of FTP that runs over UDP. A TFTP server is very simple to write for a PIC. If you bought the CCS compiler, you should have access to the TFTP server code that's included with the CCS TCP/IP examples.
tranz



Joined: 10 Feb 2007
Posts: 78

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger

PostPosted: Thu Jan 17, 2008 12:32 pm     Reply with quote

coco,

In this case I cant just use the tftp server, see I already have a TCP based web server and I need it, so there is no point in changing it to a tftp based server. So sending small TCP packets to the board makes more sense.

But I will look into it, lets see..will keep you guys posted with the latest developments.

Thanks 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