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

ethernet 28j60
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
jeftab



Joined: 10 Feb 2011
Posts: 10

View user's profile Send private message

ethernet 28j60
PostPosted: Thu Feb 10, 2011 9:51 am     Reply with quote

Hi I am working on a project with the 18f4620 and the 28j60 ethernet controller.
My HTML web page need to be refreshed when an input value is changed only, so I am not really interested in the automatic meta refresh. Anyone got any idea how can I do it ?
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Thu Feb 10, 2011 10:54 pm     Reply with quote

Look at the free Microchip Application Library's TCPIP App Demo example...

It's a different mechanism than the meta 'refresh' tag.

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
jeftab



Joined: 10 Feb 2011
Posts: 10

View user's profile Send private message

PostPosted: Mon Feb 14, 2011 8:20 am     Reply with quote

Thanks for your answer, but if you're talking about the an833 application note, I couldnt find anything ...
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Mon Feb 14, 2011 10:18 am     Reply with quote

No.

I'm talking about the TCPIP App Demo where they use javascript/ajax to auto-refresh variables...

I'm actually writing a control app in a web page with that source as an example. Initially, they have a 10mS timer ... but 100times a second is more than I want. I'll probably bump it down to 5times a second..

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
jeftab



Joined: 10 Feb 2011
Posts: 10

View user's profile Send private message

PostPosted: Mon Feb 14, 2011 10:33 am     Reply with quote

Do you mind sharing some examples? I'm not really familiar with ajax.
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Mon Feb 14, 2011 10:45 am     Reply with quote

No need for me to share.

It's in the Microchip applications library.

I think the latest install still goes in:

C:\Microchip Solutions v2010-10-19\

Then go to TCPIP Demo App\WebPages2

look at index.htm, mchp.js, status.xml -- it's all in there.


Cheers,

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
jeftab



Joined: 10 Feb 2011
Posts: 10

View user's profile Send private message

PostPosted: Mon Feb 14, 2011 10:49 am     Reply with quote

Thanks mate, I'll take a look.
jeftab



Joined: 10 Feb 2011
Posts: 10

View user's profile Send private message

PostPosted: Tue Feb 15, 2011 12:42 pm     Reply with quote

allright , after some hours spending, I've figured out that ccs won't be enough for me, and I'll have to use the c30.
Am I right or wrong ?
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Tue Feb 15, 2011 1:00 pm     Reply with quote

It depends...

You haven't told us anything else about what you're doing.. and my crystal ball is down for maintenance this week.

I'm working on a web page now that will have plenty of time to refresh every 200mS with all the things it's doing.

-Ben

BTW, there is a version of CCS for PIC24/dsPIC devices.
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
jeftab



Joined: 10 Feb 2011
Posts: 10

View user's profile Send private message

PostPosted: Tue Feb 15, 2011 1:08 pm     Reply with quote

Allright, I'll explain my project,
I am a final year student, and my project is based on house or commerial domotics, so I'll have a few smoke, gaz, movement sensor, alarm, heating system controls from a single webpage.
I am using a pic 18f4620 with the ethernet module 28j60.
My code is all set up, my only problem is the webpage and its refreshing speed, it need to be reliable ...
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Tue Feb 15, 2011 1:15 pm     Reply with quote

How fast does your application need to update? 1000 times per second? Or on value change (since that's really not how HTTP works... )?

HTTP is about a server responding to requests.. not openly sitting with a socket waiting to receive data from a PIC (or anything else for that matter) unless you write a Java application that runs inside the browser window that keeps an open connection to the PIC to allow updates.

And, I hate to say it - But Ethernet is intrinsically non-deterministic.

The network will try its best to deliver packets in a timely manner, but can never be guaranteed.

If your application has reliability as a requirement, you need to really dig in to determine backup methods for "always up" services.

Try getting your hands on a PICdem.net2 and run the demo application.. depending on all the stuff your doing... you may be surprised.

It will also give you a better idea of how things are working. (although you can look at the code that exists now).
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
jeftab



Joined: 10 Feb 2011
Posts: 10

View user's profile Send private message

PostPosted: Tue Feb 15, 2011 1:27 pm     Reply with quote

Thanks for your help mate, but the best for my project would be a refresh on value change, is there any way to do it with ccs ?
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Feb 15, 2011 1:33 pm     Reply with quote

Update rate can be as slow as 4 times a second for alarms and HVAC controls.
FYI: The absolute best, 'state of the art' commercial ULC double A graded alarm systems back 15-30 years ago were this 'fast'. These systems were used in banks, furriers, diamond stores, etc. Even today, their signalling technology cannot be beat by any wireless or wired (ethernet, FO, nternet etc) system.
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Tue Feb 15, 2011 1:41 pm     Reply with quote

temtronic wrote:
Update rate can be as slow as 4 times a second for alarms and HVAC controls.
FYI: The absolute best, 'state of the art' commercial ULC double A graded alarm systems back 15-30 years ago were this 'fast'. These systems were used in banks, furriers, diamond stores, etc. Even today, their signalling technology cannot be beat by any wireless or wired (ethernet, FO, nternet etc) system.


And he's right - You need dedicated communications...

So let's say ethernet will suffice,

because HTTP doesn't work the way you want (it's essentially polled and ajax/javascript just changes the polling from a user click on "reload" to a software based reload), what you need is a web page that loads a java app that connects to a socket on the PIC...

Then while the socket is open, any time the value changes, a message is sent to any listening client.

Yes. that could easily be done on a PIC.

I particularly like the PIC18F97j60... so try that instead of the 2chip approach.

With CCS or C18 would work.

Cheers,

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
jeftab



Joined: 10 Feb 2011
Posts: 10

View user's profile Send private message

PostPosted: Tue Feb 15, 2011 1:53 pm     Reply with quote

PIC18F97j60 wow now that something interesting ! hmm I am so familiar with the 18f4620, I am afraid its going to take me a while in order to figure out the whole files and drivers needed for ccs and everything ...
i am not really familiar with all that tcp and networking part...
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