Searching \ for '[PIC] Need help with embedded web server' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Need help with embedded web server'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Need help with embedded web server'
2005\05\02@201414 by Kerrisnow

flavicon
face
Here is my plan:

I would like to use the pic18f2455 to create a web server. I am not
going to use ethernet or eeprom. I will connect it to my pc
with the serial cable. The other end of the cable will connect to the
serial port of the pic. The pc will connect to the pic with slip for the
web server and with hyperterminal instead of the lcd of picdem.net.
Does this sound o.k.?

2. In compiler.h I find
#define CLOCK_FREQ                      (20000000)      // Hz
As I am planning on using the internal oscillator of the pic, which is
6mhz, do I need to change this value? and if so is clock frequency
the same as the oscillator frequency?

3. Do I need to change
TICKS_PER_SECOND and
TICK_PRESCALE_VALUE
and if so how do I know what these values should be?

4. I have identified that I need to use the project file mpslpg.pjt
because it has the slip, internal web pages (no eeprom) and the
web server, but how do I use this file? I downloaded the C
compiler and I couldn't find any gui environment?

tia

2005\05\03@025321 by Jan-Erik Soderholm

face picon face
kerrisnow@btinternet.com wrote :

> Here is my plan:
>
> I would like to use the pic18f2455 to create a web server.

I can't see that you mention USB anyware in your post.
Any special reason you are using an USB device ?

> I am not
> going to use ethernet or eeprom. I will connect it to my pc
> with the serial cable. The other end of the cable will connect to the
> serial port of the pic. The pc will connect to the pic with
> slip for the
> web server and with hyperterminal instead of the lcd of picdem.net.
> Does this sound o.k.?

Maybe, depends on what your goals are...

>
> 2. In compiler.h I find
> #define CLOCK_FREQ                      (20000000)      // Hz
> As I am planning on using the internal oscillator of the pic, which is
> 6mhz,...

Where is that "6 Mhz intosc" ? I can not find it in the data sheet.
And since you are going to use the serial interface, why not
just hook up a standard crystal (for better precision) ?

Jan-Erik.



2005\05\03@031052 by Ake Hedman

flavicon
face
kerrisnow@btinternet.com wrote:

>Here is my plan:
>
>I would like to use the pic18f2455 to create a web server. I am not
>going to use ethernet or eeprom. I will connect it to my pc
>with the serial cable. The other end of the cable will connect to the
>serial port of the pic. The pc will connect to the pic with slip for the
>web server and with hyperterminal instead of the lcd of picdem.net.
>Does this sound o.k.?
>  
>
Sounds OK!  But Slip is not fun IMHO. For a jump start check http://www.modtronix.com   (not affiliated other then a happy customer).

>2/3
You have all that info in the appnote.

>
>
>4. I have identified that I need to use the project file mpslpg.pjt
>because it has the slip, internal web pages (no eeprom) and the
>web server, but how do I use this file? I downloaded the C
>compiler and I couldn't find any gui environment?
>
>  
>
First install MPLAP, then install  the compiler and then MPLAB environment will be your gui. Of course you also can use any editor and a makefile if you which.


/Ake



--  ---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se      Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org

2005\05\03@044001 by William Chops Westfield

face picon face
On May 3, 2005, at 12:10 AM, Ake Hedman wrote:

>  But Slip is not fun IMHO.

It is very certainly MUCH easier than the alternative async internet
comm protocol (PPP)!!!

BillW

2005\05\03@045236 by Ake Hedman

flavicon
face
William Chops Westfield wrote:

> On May 3, 2005, at 12:10 AM, Ake Hedman wrote:
>
>>  But Slip is not fun IMHO.
>
>
> It is very certainly MUCH easier than the alternative async internet
> comm protocol (PPP)!!!
>
> BillW

Agree and that is **MUCH**...  PPP is a s close to hell on earth one can come. ;-)

/Ake

--  ---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se      Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org

2005\05\03@050336 by liam .

picon face
I did some research into this recently and found a few sites that may
be interesting reading for you.

http://d116.com/ace/
Very Small webserver, uses SLIP for comunications.

http://www-ccs.cs.umass.edu/~shri/iPic.html
Another small webserver, uses a PIC 12C509A and SLIP

http://www.janw.easynet.be/pic18f452-e.html
Uses a PIC 18F452 and talks to a real ethernet network via ISA network card.

http://picnic.sourceforge.net/
Open source project for connecting PICs to ISA network cards.

http://mspgcc.sourceforge.net/

I never got beyond the research phase, time got away from me but I
plan to return to the idea soon....


Hope this can be helpful.

Liam

2005\05\03@054958 by Wouter van Ooijen

face picon face
> I did some research into this recently and found a few sites that may
> be interesting reading for you.

don't forget http://sourceforge.net/projects/jalethernet/ !

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2005\05\03@060734 by Kerrisnow

flavicon
face
> > Here is my plan:
> >
> > I would like to use the pic18f2455 to create a web server.
>
> I can't see that you mention USB anyware in your post.
> Any special reason you are using an USB device ?
No special reason apart from the fact that I do posses one of those.
The usb functionality will not be used, it wouldn't hurt would it?
>
> > I am not
> > going to use ethernet or eeprom. I will connect it to my pc
> > with the serial cable. The other end of the cable will connect to the
> > serial port of the pic. The pc will connect to the pic with
> > slip for the
> > web server and with hyperterminal instead of the lcd of picdem.net.
> > Does this sound o.k.?
>
> Maybe, depends on what your goals are...
The goals are to satisfy myself that I can do this simplistic task, then I
will start thinking of adding ethernet, but first I want to know I can
configure a pic correctly, so slip is the least complicated way in terms
of hardware.
>
> >
> > 2. In compiler.h I find
> > #define CLOCK_FREQ                      (20000000)      // Hz
> > As I am planning on using the internal oscillator of the pic, which is
> > 6mhz,...
>
> Where is that "6 Mhz intosc" ? I can not find it in the data sheet.
> And since you are going to use the serial interface, why not
> just hook up a standard crystal (for better precision) ?
I just checked in the datasheet, it is 8mhz. Would that be ok?
I don't want to complicate my hardware unnecessarily at this
stage, as this is an excercise, not a real project, so I would
prefere not to have to worry about crystals unless it is absolutely
necessary.

tia

2005\05\03@062703 by Kerrisnow

flavicon
face
{Quote hidden}

I seem to have missed many replies, which I have suddenly found, so
first of all, thanks. I did install the C compiler (student/demo) after
mplab 7.10, but it seems that I cannot open pjt files, i.e. they do open
as a text file, but no project is opened
{Quote hidden}

> -

2005\05\03@062839 by Jan-Erik Soderholm

face picon face
kerrisnow@btinternet.com wrote :

> > > I would like to use the pic18f2455 to create a web server.
> >
> > I can't see that you mention USB anyware in your post.
> > Any special reason you are using an USB device ?
>
> No special reason apart from the fact that I do posses one of those.
> The usb functionality will not be used, it wouldn't hurt would it?

I just expected that, becuse of the quite high complexity of the
USB periperial, there was some added configurations to do,
even if the USB interface wasn't used.
Maybe not...

> > Where is that "6 Mhz intosc" ? I can not find it in the data sheet.
> > And since you are going to use the serial interface, why not
> > just hook up a standard crystal (for better precision) ?

> I just checked in the datasheet, it is 8mhz. Would that be ok?

No idea.

> I don't want to complicate my hardware unnecessarily at this
> stage, as this is an excercise, not a real project, so I would
> prefere not to have to worry about crystals unless it is absolutely
> necessary.

OK, I was just trying to point out that if you plan to use serial
(USART) communication, you must have a reasonable stable
clock source.

Jan-Erik.



2005\05\03@065854 by Ake Hedman

flavicon
face
>I seem to have missed many replies, which I have suddenly found, so

This is happening to me also at the moment. Dates are jumping around a lot. Not fun if you soirt by date.  Is  everything OK for everyone else?

>first of all, thanks. I did install the C compiler (student/demo) after
>mplab 7.10, but it seems that I cannot open pjt files, i.e. they do open
>as a text file, but no project is opened

Do uou open the file from the project menu?

/Ake

--  ---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se      Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org

2005\05\03@072238 by Byron A Jeff

face picon face
On Tue, May 03, 2005 at 01:13:53AM +0100, spam_OUTkerrisnowTakeThisOuTspambtinternet.com wrote:
> Here is my plan:

Sorry I'm late to the party.

>
> I would like to use the pic18f2455 to create a web server. I am not
> going to use ethernet or eeprom. I will connect it to my pc
> with the serial cable. The other end of the cable will connect to the
> serial port of the pic. The pc will connect to the pic with slip for the
> web server and with hyperterminal instead of the lcd of picdem.net.
> Does this sound o.k.?

This topic rolls in about twice a year. I always ask the same question
when I see this setup: Why a web server?

I always ask the question because with the physical interface you specify
(serial/SLIP) there's no way to build a box that can connect to the
Internet without a gateway. Now that's OK, but I always question the
utility of shoving an entire HTTP/TCP/IP/SLIP stack onto the PIC.

The question is also generated based on objective. My objective when I
was looking at the problem was threefold:

1) Leverage as much of the TCP/IP standard, which has tons of written and
tested code, as I could.

2) Have the potential for true Internet connectivity.

3) Keep new code/stack on the PIC as small as possible.

This lead me to a UDP/IP/SLIP stack with a PC SLIP gateway. It's a project
that I put a couple of students on years ago, but never got completely
fleshed out.

The one downside with my approach is that you do have to have custom
software on the PC to receive and process packets. But I always looked at
it as having a big, easy to program PC, as opposed to as a more constrained
PIC to work on. Also there are standard programs that can interface with
UDP ports. netcat for example can be found here:

http://www.securityfocus.com/tools/137

With a tutorial here:

http://m.nu/program/util/netcat/netcat.html

As a linux guy a 5 second Google found this article for a framework for
UDP applications:

http://www.linuxgazette.com/node/8758

As standard socket code, it should port easily.

But again it depends of the objective. I wasn't looking at the Kewl factor
of having a webserver on a PIC. It may be a worthy goal if we're talking
Ethernet or PPP which can connect to the network standalone. But with SLIP
which virtually requires a gateway, UDP seems to be the ticket for
delivering content around the network with a PIC.

BTW hyperterminal isn't going to get you where you want to go. You need to
create a SLIP connection in your dialup networking, and use that to connect.

Just some thoughts.

BAJ

2005\05\03@073344 by olin_piclist

face picon face
kerrisnow@btinternet.com wrote:
> I would like to use the pic18f2455 to create a web server. I am not
> going to use ethernet or eeprom. I will connect it to my pc
> with the serial cable. The other end of the cable will connect to the
> serial port of the pic. The pc will connect to the pic with slip for the
> web server and with hyperterminal instead of the lcd of picdem.net.
> Does this sound o.k.?

Not really.  What is going accross the serial line, SLIP or the characters
for hyperterminal?  You only get to pick one.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\05\03@083125 by Ake Hedman

flavicon
face
Olin Lathrop wrote:

> .....kerrisnowKILLspamspam@spam@btinternet.com wrote:
>
>> I would like to use the pic18f2455 to create a web server. I am not
>> going to use ethernet or eeprom. I will connect it to my pc
>> with the serial cable. The other end of the cable will connect to the
>> serial port of the pic. The pc will connect to the pic with slip for the
>> web server and with hyperterminal instead of the lcd of picdem.net.
>> Does this sound o.k.?
>
>
> Not really.  What is going accross the serial line, SLIP or the
> characters
> for hyperterminal?  You only get to pick one.
>
But you can go use SLIP through winsock on hyperterminal. Of course you need some RFC-822 compliant on the other side.

/Ake

--  ---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se      Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org

2005\05\03@084039 by Kerrisnow

flavicon
face

----- Original Message ----- From: "Ake Hedman" <akhespamKILLspameurosource.se>
To: "Microcontroller discussion list - Public." <.....piclistKILLspamspam.....mit.edu>
Sent: Tuesday, May 03, 2005 11:58 AM
Subject: Re: [PIC] Need help with embedded web server


> >I seem to have missed many replies, which I have suddenly found, so
>
> This is happening to me also at the moment. Dates are jumping around a
> lot. Not fun if you soirt by date.  Is  everything OK for everyone else?
>
> >first of all, thanks. I did install the C compiler (student/demo) after
> >mplab 7.10, but it seems that I cannot open pjt files, i.e. they do open
> >as a text file, but no project is opened
>
> Do uou open the file from the project menu?
I see what you mean, it seems mplab only lists mcw files. It also
appears as though MPSlPG.pjt doesn't have an mcw counterpart.
{Quote hidden}

> -

2005\05\03@084320 by Kerrisnow

flavicon
face

----- Original Message -----
From: "Byron A Jeff" <EraseMEbyronspam_OUTspamTakeThisOuTcc.gatech.edu>
To: "Microcontroller discussion list - Public." <piclistspamspam_OUTmit.edu>
Sent: Tuesday, May 03, 2005 12:22 PM
Subject: Re: [PIC] Need help with embedded web server


{Quote hidden}

constrained
{Quote hidden}

connect.
Yes, that's because SLIP is going to occupy com1, preventing hyper terminal
from opening it.
>
> Just some thoughts.
>
> BAJ
> --

2005\05\03@084810 by Kerrisnow

flavicon
face

----- Original Message -----
From: "Olin Lathrop" <KILLspamolin_piclistKILLspamspamembedinc.com>
To: "Microcontroller discussion list - Public." <RemoveMEpiclistTakeThisOuTspammit.edu>
Sent: Tuesday, May 03, 2005 12:34 PM
Subject: Re: [PIC] Need help with embedded web server


> spamBeGonekerrisnowspamBeGonespambtinternet.com wrote:
> > I would like to use the pic18f2455 to create a web server. I am not
> > going to use ethernet or eeprom. I will connect it to my pc
> > with the serial cable. The other end of the cable will connect to the
> > serial port of the pic. The pc will connect to the pic with slip for the
> > web server and with hyperterminal instead of the lcd of picdem.net.
> > Does this sound o.k.?
>
> Not really.  What is going accross the serial line, SLIP or the characters
> for hyperterminal?  You only get to pick one.
Yes, I will have to give up on hyperterminal, which is o.k. because getting
web pages from slip is a good enough indication if it is working or not.
>
>
> *****************************************************************
> Embed Inc, embedded system specialists in Littleton Massachusetts
> (978) 742-9014, http://www.embedinc.com
> --

2005\05\03@084810 by olin_piclist

face picon face
Ake Hedman wrote:
> But you can go use SLIP through winsock on hyperterminal. Of course you
> need some RFC-822 compliant on the other side.

I haven't checked, but my recollection is that RFC 822 defines header
commands of SMTP email messages, with SMTP itself is defined in RFC 821.

In any case, I got the impression that the OP meant that Hyperterm would be
connected directly to the serial line, which of course would make it
impossible to run SLIP over that same line.  Something still isn't right or
we're missing some information.

The OP also said he wanted to implement SLIP because it would be easier than
TCP.  I disagree with this.  Hook the PIC to a ENC28J60 and use the AN833
TCP/IP stack from Microchip with the ENC28J60 specific MAC module.  This
should be about the same amount of work on the PIC end, and a lot less
hassle on the PC end.  Now you've got a server that doesn't need the PC in
the loop.

If the PC is in the loop, then why bother with TCP on the PIC at all?
Communicate any data with the PC using a simple binary protocol over the
serial line, and have the PC serve the web pages.

Something doesn't add up here.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\05\03@085125 by Ake Hedman

flavicon
face
Byron A Jeff wrote:

>This topic rolls in about twice a year. I always ask the same question
>when I see this setup: Why a web server?

I agree completely on this. I can understand why it can be perfect with a web server for such things as a router or a copier machine. But for most other stuff it would just be a lot of overhead. It is good as the user already have the interface tools and know the comcept of links and pages.

<personal-stuff-warning>
This is also why our Very Simple Control Protocol (http://www.vscp.org) has been  developed  Here we standardize on events (can be UDP datagrams), registers (just as IC's have) and decision matrices.

- A node can be configured by using a very simple set of register read/write commands.
- A node can give "information" to other devices by well specified events.
-  Decision Matrix entries can be added on a node that support them to let the node handle events automatically (Event - Decision - Action).

This works over differnet low level protocols. CAN, UDP, RS-232, RS-485/422, USB etc.

It's stupid and *very* simple but a fun way to make tiny little things work together.....
</personal-stuff-warning>

/Ake

{Quote hidden}

--  ---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se      Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org

2005\05\03@085456 by Ake Hedman

flavicon
face
kerrisnow@btinternet.com wrote:

> I see what you mean, it seems mplab only lists mcw files. It also
> appears as though MPSlPG.pjt doesn't have an mcw counterpart.

Don't you have the "HtTFTPcDemo.mcw"

/Ake


--  ---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se      Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org

2005\05\03@090121 by Byron A Jeff

face picon face
On Tue, May 03, 2005 at 08:48:32AM -0400, Olin Lathrop wrote:

> If the PC is in the loop, then why bother with TCP on the PIC at all?
> Communicate any data with the PC using a simple binary protocol over the
> serial line, and have the PC serve the web pages.
>
> Something doesn't add up here.

I used to waver back and forth on this point. But I realized that by using
the standard TCP/IP infrastructure that I could get a well tested stack
on the PC side for no cost. So instead of having to write and test for
both ends (even if it's simple) I would focus on the PIC. In short if
I needed to pick a simple binary protocol, then why not pick UDP/IP/SLIP?

I had always been thinking of this along a multidrop sensor situation. So
with EIA-485 and a simple UDP/IP/SLIP stack you can ring up a bunch of
nodes. Of course there's still the contention issue, but that's another story.

BAJ

2005\05\03@092425 by Kerrisnow

flavicon
face
>
>  > I see what you mean, it seems mplab only lists mcw files. It also
>  > appears as though MPSlPG.pjt doesn't have an mcw counterpart.
>
> Don't you have the "HtTFTPcDemo.mcw"
You probably mean MpTFTPcDemo.map, yes I do have that, but
AN833 p5 talks about MPSlPG.pjt, I guess it's the same.
{Quote hidden}

> -

2005\05\03@093218 by Ake Hedman

flavicon
face
Olin Lathrop wrote:

> Ake Hedman wrote:
>
>> But you can go use SLIP through winsock on hyperterminal. Of course you
>> need some RFC-822 compliant on the other side.
>
>
> I haven't checked, but my recollection is that RFC 822 defines header
> commands of SMTP email messages, with SMTP itself is defined in RFC 821.
>
Oops! You are right. Never trust your (my!) memory... :-(  What I was aiming is was the RFC that SMTP, POP, TELNET, HTTP etc falls back on.  Sorry for that.

> The OP also said he wanted to implement SLIP because it would be
> easier than
> TCP.  I disagree with this.  Hook the PIC to a ENC28J60 and use the AN833
> TCP/IP stack from Microchip with the ENC28J60 specific MAC module.  This
> should be about the same amount of work on the PIC end, and a lot less
> hassle on the PC end.  Now you've got a server that doesn't need the
> PC in
> the loop.
>
Agree!  But before the ENC28J60 this has been a lot more work. The Reltek RTL8019 for instance and similar is not nice to work with on the component level for a hobbyist.  The packages available for the ENC28J60 change this in a big way.

> If the PC is in the loop, then why bother with TCP on the PIC at all?
> Communicate any data with the PC using a simple binary protocol over the
> serial line, and have the PC serve the web pages.
>
> Something doesn't add up here.
>
Agree here as well.

/Ake

--  ---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se      Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org

2005\05\03@093500 by Kerrisnow

flavicon
face

----- Original Message -----
From: "Olin Lathrop" <RemoveMEolin_piclistspamTakeThisOuTembedinc.com>
To: "Microcontroller discussion list - Public." <piclistEraseMEspam.....mit.edu>
Sent: Tuesday, May 03, 2005 1:48 PM
Subject: Re: [PIC] Need help with embedded web server


> Ake Hedman wrote:
> > But you can go use SLIP through winsock on hyperterminal. Of course you
> > need some RFC-822 compliant on the other side.
>
> I haven't checked, but my recollection is that RFC 822 defines header
> commands of SMTP email messages, with SMTP itself is defined in RFC 821.
>
> In any case, I got the impression that the OP meant that Hyperterm would
be
> connected directly to the serial line, which of course would make it
> impossible to run SLIP over that same line.  Something still isn't right
or
> we're missing some information.
>
> The OP also said he wanted to implement SLIP because it would be easier
than
> TCP.  I disagree with this.  Hook the PIC to a ENC28J60 and use the AN833
> TCP/IP stack from Microchip with the ENC28J60 specific MAC module.  This

My idea was to go from the easy to the difficult in terms of
hardware, but really the problem with the ENC28J60 as far as I understood
from people in this group is that one needs to write the MAC software, which
I haven't a clue how to do, or is it available now?

{Quote hidden}

> --

2005\05\03@094429 by olin_piclist

face picon face
Byron A Jeff wrote:
> In short if
> I needed to pick a simple binary protocol, then why not pick
> UDP/IP/SLIP?

Because it's not that simple.  Even if you use static IP and stick to UDP,
you still have at least an order of magnitude more code than required for a
lightweight binary protocol via UART that is designed for that purpose.

> I had always been thinking of this along a multidrop sensor situation.
> So with EIA-485 and a simple UDP/IP/SLIP stack you can ring up a bunch
> of
> nodes. Of course there's still the contention issue, but that's another
> story.

I think today's answer to this is CAN.  It does handle the contention issue
in hardware, and CAN modules come integrated into many microcontrollers now,
including a bunch of 18F and 30F PICs.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\05\03@094951 by Ake Hedman

flavicon
face
kerrisnow@btinternet.com wrote:

>My idea was to go from the easy to the difficult in terms of
>hardware, but really the problem with the ENC28J60 as far as I understood
>from people in this group is that one needs to write the MAC software, which
>I haven't a clue how to do, or is it available now?

Not for us "common" people but will be very soon now I hope. Olin got is though (Since November 2004... hmm...). ;-)

Cheers
/Ake


>{Original Message removed}

2005\05\03@101002 by Ake Hedman

flavicon
face
Olin Lathrop wrote:

>I think today's answer to this is CAN.  It does handle the contention issue
>in hardware, and CAN modules come integrated into many microcontrollers now,
>including a bunch of 18F and 30F PICs.

This is very true as long as you cook your own HLP protocol.  CanOpen for instance is *big* and complicated, and even more so then TCP/IP. DeciceNet is a little better. CanKingdom  is open but also rather complicated.
Personally I hate when the protocol stack takes up most of the flash. And this is true for most CAN HLP's today.

/Ake

--  ---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se      Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org

2005\05\03@103631 by olin_piclist

face picon face
kerrisnow@btinternet.com wrote:
> but really the problem with the ENC28J60 as far as I
> understood from people in this group is that one needs to write the MAC
> software, which I haven't a clue how to do, or is it available now?

Maybe it's not officially released yet in an app note, but it certainly
exists.  The ENC28J60 chips aren't officially released either yet, although
supposedly very close.  You will have to go thru your local FAE to get one
for now, at which time you can also get the new MAC module.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\05\03@105610 by Kerrisnow

flavicon
face
> >> But you can go use SLIP through winsock on hyperterminal. Of course you
> >> need some RFC-822 compliant on the other side.
> >
> >
> > I haven't checked, but my recollection is that RFC 822 defines header
> > commands of SMTP email messages, with SMTP itself is defined in RFC 821.
> >
> Oops! You are right. Never trust your (my!) memory... :-(  What I was
> aiming is was the RFC that SMTP, POP, TELNET, HTTP etc falls back on.
> Sorry for that.
>
> > The OP also said he wanted to implement SLIP because it would be
> > easier than
> > TCP.  I disagree with this.  Hook the PIC to a ENC28J60 and use the
AN833
{Quote hidden}

Why is the PC in a loop? To recap, I will be loading the stack software
an833
onto an 18f pic, mine happens to be an 18f2455, connect the usart to com1,
make a slip connection on win2000, and hope to see some webpages.
Any last minute thoughts?

{Quote hidden}

> -

2005\05\03@114833 by Ake Hedman

flavicon
face
kerrisnow@btinternet.com wrote:

>Any last minute thoughts?
If you want a PIC based web server its makes perfect sense IMHO for whatever reason. Another question is if a web server on all available devices is the solution to all problems. I don't think so   Counting all web servers that pop up on low end devices others seams to think so. But that is generally speaking  I also have some web servers running on tiny devices just for the fun of it.... ;-)

/Ake

--  ---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se      Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org

2005\05\03@120327 by olin_piclist

face picon face
kerrisnow@btinternet.com wrote:
> Why is the PC in a loop?
> ...
> make a slip connection on win2000,

Because that's what it appears you are saying.  The PC is "in the loop"
since if you powered it down it the system wouldn't work.  In this case the
PC is acting as a router and ethernet-to-SLIP adapter.

My point was why not connect the PIC directly to the ethernet since this
removes any dependence on the PC and would be easier to accomplish (in my
opinion)?


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\05\03@140622 by Peter

picon face

On Tue, 3 May 2005, Ake Hedman wrote:

> Agree and that is **MUCH**...  PPP is a s close to hell on earth one can
> come. ;-)

PPP is not so bad if it does not need to negotiate async maps and IPs
and other options. Start both ends with fixed IP and it will work
relatively smoothly (you only need a subset of the protocol).

Peter

2005\05\03@144145 by Charles Craft

picon face
TCP/IP Partner Solution Footprint
http://ww1.microchip.com/downloads/en/DeviceDoc/partnerfootprint.pdf

MicroChip used to ship this dev boards or flash packs.
EMIT from emWare:
http://www.emware.com/index.html


What magnetics are people using with the ENC28J60 ?
The controller spec sheet gives specs for the interface but no recommended part numbers (that I could see).
Tried to find them on DigiKey and didn't come up with anything useful.
The one used on the picdem.net board is available from Mouser - FL1012.

{Original Message removed}

2005\05\03@160035 by Ake Hedman

flavicon
face
Peter wrote:

>
> On Tue, 3 May 2005, Ake Hedman wrote:
>
>> Agree and that is **MUCH**...  PPP is a s close to hell on earth one
>> can come. ;-)
>
>
> PPP is not so bad if it does not need to negotiate async maps and IPs
> and other options. Start both ends with fixed IP and it will work
> relatively smoothly (you only need a subset of the protocol).
>
> Peter

Programmed it once for a client on MS-DOS. Not the most amusing thing I ever done.

/Ake

--  ---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se      Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org

2005\05\03@170247 by olin_piclist

face picon face
Charles Craft wrote:
> What magnetics are people using with the ENC28J60 ?

I'm using Pulse Engineering H2019.

*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\05\03@182034 by Charles Craft

picon face
Looks like Mouser carries that one.

Are you using Power over Ethernet for your product or just happened to pick that unit?

Thanks!

{Original Message removed}

2005\05\03@183910 by olin_piclist

face picon face
Charles Craft wrote:
> Are you using Power over Ethernet for your product or just happened
> to pick that unit?

Yes, power over ethernet is an option.  About the only difference is that
without power over ethernet the center taps on the network side aren't
required.  The ENC28J60 requires center taps on its side.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\05\03@233442 by William Chops Westfield

face picon face
On May 3, 2005, at 11:06 AM, Peter wrote:

> (you only need a subset of the protocol).
>
This is theoretically true.  OTOH, I wonder how well it works in
practice; if you
don't negotiate the way windows or macos does, things may not talk to
you...

> it does not need to negotiate async maps
>
Async maps are a good idea, though.  Without negotiating them, you'll
send every
byte less than 32 as two bytes, decreasing throughput rather a lot...

BillW

2005\05\04@071736 by Alan B. Pearce

face picon face
>>I seem to have missed many replies, which I have suddenly found, so
>
>This is happening to me also at the moment. Dates are jumping around a
>lot. Not fun if you soirt by date.  Is  everything OK for everyone else?

It has been happening to me for ages. I have been blaming our local mail
servers which seem to crash with monotonous regularity. Every so often the
virus checker file on the gateway seems to corrupt - over a weekend is
good - and I can be getting emails 2 and 3 days old in batches as it does
its thing with them before release them into the inner sanctums of our
readers.

2005\05\04@072812 by Kerrisnow

flavicon
face
Two more questions:

How does the sample server in AN833 change without the picdem board
and also, CLOCK_FREQ = 20,000,000 do I need to change this to fit
my internal oscillator or does it sort itself out?
Lastly, where do I define the Defines, for example, to choose tcp I need to
define STACK_USE_TCP, but where do I define this?

thanks
tim.

2005\05\04@073441 by Ake Hedman

flavicon
face
Alan B. Pearce wrote:

>>>I seem to have missed many replies, which I have suddenly found, so
>>>      
>>>
>>This is happening to me also at the moment. Dates are jumping around a
>>lot. Not fun if you soirt by date.  Is  everything OK for everyone else?
>>    
>>
>
>It has been happening to me for ages. I have been blaming our local mail
>servers which seem to crash with monotonous regularity. Every so often the
>virus checker file on the gateway seems to corrupt - over a weekend is
>good - and I can be getting emails 2 and 3 days old in batches as it does
>its thing with them before release them into the inner sanctums of our
>readers.
>
>  
>
I have my own mail server and  just a local virus protection (on the client computer).  So it must be something external. Yesterday there  was no mail from the piclist to my server for almost two hours and then suddenly a lot of them was delivered in a batch. I have seen that today also but for shorter times. I tried to send some mails from my gmail account during the same time to test my server and they where delivered in a few seconds. Oh well can live with it.

/Ake

--  ---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se      Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org

2005\05\04@074108 by olin_piclist

face picon face
kerrisnow@btinternet.com wrote:
> How does the sample server in AN833 change without the picdem board
> and also, CLOCK_FREQ = 20,000,000 do I need to change this to fit
> my internal oscillator or does it sort itself out?
> Lastly, where do I define the Defines, for example, to choose tcp I
> need to define STACK_USE_TCP, but where do I define this?

As I said before, you have to actually *read* the text, and looking thru the
H files isn't a bad idea either.  I don't remember the details off the top
of my head, and I'm not in that office right now, but I don't remember
having any trouble figuring this stuff out from the available documentation.
In other words, RTFM.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\05\04@074113 by Ake Hedman

flavicon
face
kerrisnow@btinternet.com wrote:

>Two more questions:
>
>How does the sample server in AN833 change without the picdem board
>and also, CLOCK_FREQ = 20,000,000 do I need to change this to fit
>my internal oscillator or does it sort itself out?
>Lastly, where do I define the Defines, for example, to choose tcp I need to
>define STACK_USE_TCP, but where do I define this?
>
>thanks
>tim.
>  
>
Modtronix have the Microchip stack but have changed a few thing such as having all configuration data in one file.
Its available here http://total-telematics.com/shop/products/mt/websrvr65_v202.zip

CLOCK_FREQ should be the actual frequency.


/Ake

--  ---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se      Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org

2005\05\04@074153 by Jan-Erik Soderholm

face picon face
Mail delivery from the list server has been like this since
the list move to another server sometimes last year.
Delivery times varies a lot more since then then before.
And also out-of-order posts has been more frequent.
Jan-Erik.



{Quote hidden}

> -

2005\05\04@075801 by Ake Hedman

flavicon
face
So it just took a year for me to notice it then you mean... ;-)

/Ake

Jan-Erik Soderholm wrote:

>Mail delivery from the list server has been like this since
>the list move to another server sometimes last year.
>Delivery times varies a lot more since then then before.
>And also out-of-order posts has been more frequent.
>Jan-Erik.
>
>  
>

--  ---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se      Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org

2005\05\04@075819 by Kerrisnow

flavicon
face
> EraseMEkerrisnowspambtinternet.com wrote:
> > How does the sample server in AN833 change without the picdem board
> > and also, CLOCK_FREQ = 20,000,000 do I need to change this to fit
> > my internal oscillator or does it sort itself out?
> > Lastly, where do I define the Defines, for example, to choose tcp I
> > need to define STACK_USE_TCP, but where do I define this?
>
> As I said before, you have to actually *read* the text, and looking thru
the
> H files isn't a bad idea either.  I don't remember the details off the top
> of my head, and I'm not in that office right now, but I don't remember
> having any trouble figuring this stuff out from the available
documentation.
> In other words, RTFM.

I did read this, unfortunately it assumes people know where to put defines,
probably due to the fact that it is a compiler issue rather than a stack
issue.
Trust me, the manual does'nt answer what I have posted. Reading the
source files is an option for sure, I never disagreed with that.

thnx
tim.

2005\05\04@080002 by Kerrisnow

flavicon
face
> >How does the sample server in AN833 change without the picdem board
> >and also, CLOCK_FREQ = 20,000,000 do I need to change this to fit
> >my internal oscillator or does it sort itself out?
> >Lastly, where do I define the Defines, for example, to choose tcp I need
to
{Quote hidden}

When you say actual frequency, what do you mean by "actual" ?

thnx
tim.

2005\05\04@081740 by Mauricio Jancic

flavicon
face
RTFM

As the App note says, CLOCK_FREQ Define SYSTEM OSCILATOR FREQUENCY to
determine tick counter value


Mauricio Jancic
Janso Desarrollos - Microchip Consultants Program Member
RemoveMEinfoEraseMEspamEraseMEjanso.com.ar
http://www.janso.com.ar
(54) 11 - 4542 - 3519


> {Original Message removed}

2005\05\04@124626 by olin_piclist

face picon face
kerrisnow@btinternet.com wrote:
>>> Lastly, where do I define the Defines, for example, to choose tcp I
>>> need to define STACK_USE_TCP, but where do I define this?
>
> I did read this, unfortunately it assumes people know where to put
> defines, probably due to the fact that it is a compiler issue rather
> than a stack issue.
> Trust me, the manual does'nt answer what I have posted.

Yes, it does.  See AN833 (DS00833B) Section "Stack Configuration" on page 3,
second column, line 4: "Most of these are defined in the header file
StackTsk.h.  Some defines that are defined other files are shown with
correponding file name.".  This refers to table 1, "Stack Configuration
Definitions" immediately below on the same page.  What part of this do you
find confusing?

Even without this explicit mention in the manual, you could easily run a
pattern match on all the .h files to find references to a particular symbol.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

2005\05\04@151956 by Peter

picon face

On Tue, 3 May 2005, William Chops Westfield wrote:

> On May 3, 2005, at 11:06 AM, Peter wrote:
>
>> (you only need a subset of the protocol).
>>
> This is theoretically true.  OTOH, I wonder how well it works in practice; if
> you
> don't negotiate the way windows or macos does, things may not talk to you...
>
>> it does not need to negotiate async maps
>>
> Async maps are a good idea, though.  Without negotiating them, you'll
> send every byte less than 32 as two bytes, decreasing throughput
> rather a lot...

But most of these applications send ASCII in the payload so most of the
packets would not need to be escaped. And if they do not send ASCII then
they pobably send short binary and that could travel as data in a ICMP
echo request packet that need not be answered ...

Peter

2005\05\04@235940 by William Chops Westfield

face picon face

On May 4, 2005, at 12:20 PM, Peter wrote:

> Async maps are a good idea, though.

>> But most of these applications send ASCII in the payload so most of
>> the
>> packets would not need to be escaped.

Payload, perhaps.  That leaves about 44 bytes of PPP/IP/TCP header, much
of which is likely to be bytes that need escaping...

BillW

2005\05\05@132009 by Peter

picon face

On Wed, 4 May 2005, William Chops Westfield wrote:

> Date: Wed, 4 May 2005 20:59:42 -0700
> From: William Chops Westfield <RemoveMEwestfwspam_OUTspamKILLspammac.com>
> Reply-To: Microcontroller discussion list - Public. <RemoveMEpiclistTakeThisOuTspamspammit.edu>
> To: Microcontroller discussion list - Public. <EraseMEpiclistspamspamspamBeGonemit.edu>
> Subject: Re: [PIC] Need help with embedded web server
>
>
> On May 4, 2005, at 12:20 PM, Peter wrote:
>
>> Async maps are a good idea, though.
>
>>> But most of these applications send ASCII in the payload so most of the
>>> packets would not need to be escaped.
>
> Payload, perhaps.  That leaves about 44 bytes of PPP/IP/TCP header, much
> of which is likely to be bytes that need escaping...

44 out of ~1500 ? I don't see a problem with escaping because if the
standard string handling functions are used to massage the buffer then
not escaping those characters will likely be very painful coding-wise.

Peter

2005\05\05@165052 by William Chops Westfield

face picon face
On May 5, 2005, at 10:20 AM, Peter wrote:

I'm ready to concede the point, but the side issues remain
interesting...

> 44 out of ~1500 ?

I doubt you'll be using 1500 byte packets on a PIC :-)  As the payload
size
goes down, the inefficiency of having a large header increases (VoIP
discovered
this in spades; tiny payload (10ms worth of voice) made the header
increasingly
large.  Header compression did not scale well to the performance and
scaling
requirements of a typical VoIP server/gateway...  Much running around
:-)


>  I don't see a problem with escaping because if the standard string
> handling
> functions are used to massage the buffer then not escaping those
> characters
> will likely be very painful coding-wise.

It's pretty easy to add/remove the escape characters on-the-fly using a
state
machine in the byte transmit/receive functions...

BillW

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...