WWWpic2 - A web server in a PIC

WWWpic2 is a web server in a Microchip PIC 16F84 .



The current release is 0.2 See the Changelog for what's changed since the last revision.


Basic Setup


Just a quick disclaimer, you fry something (especially yourself) even if my design is wrong it is your problem! I have tried to make these details as accurate as possible but I accept no responsibility for any errors or omissions.

Parts list and guide prices

This is a quick list of parts, it doesn't include the strip-board or PCB nor does it include any cable. Aside from that it should be complete to build the current design. You may wish to add a IC socket if you don't want to solder your pic directly (recommended).
Part Description Part Number Quantity Cost1 Farnell order code
Microchip PIC 16F84-10 1 3.72 789-604
Microchip EEPROM2 24LC256 1 1.86 300-1696
10MHz Crystal3 A143K 1 0.64 485-081
5V Power Regulator4LM2931AT-5011.09300-4685
NPN silicon transistor5 BC337 1 0.088 933-727
Silicon Diodes61N456A30.014884-959
10µF Electrolytic Capacitors6 20.08286-527
33pF Ceramic Capacitors  20.03896-421
10K Resistor6  20.044514-263
4K7 Resistor6  10.044514-184
2K2 Resistor6  10.044514-100
Female 9Pin D type6   1 0.41 689-106
Total cost 11.79  

1 Guide prices are all in pounds sterling and taken from October 99 catalogue of Farnell Electronics my current favorite supplier in the UK. Note smallest multiple on transistors and 9pin sockets is 5. For the diodes, capacitors and resistors it is 10.
2 Not used in the current design.
3 Any above 4MHz will do (I tested above 4MHz, below that higher baud rates simply don't have enough cycles to process them).
4 Any 5V regulator with greater than 30mA supply is adequate, I used this one as it has self protection and can source 100mA with very low internal power loss. This part turns out to be very awkward to get the pinouts of.
5 Any NPN small signal transistor with HFE>50 will do.
6 None of these are particularly critical (esp. the caps) anything reasonably close will do, note the quoted Farnell codes are their "best value" lines and not necessarily what I used exactly in the prototype.


Please see the package section for the package download of everything you need. Links to files in this section are for ilustrating the code only.

The software for the pic is provided as a single file of assembly code (wwwpic2.asm) and an include file (wwwpic2.inc).

The basic structure of the code can be broken down into the following sections

I have split the code up in this way because each of these sections in isolation isn't too difficult to understand. This should give you a fairly good understanding as how the whole works and hopefuly how to do the modifications you want for your real world applications.

Future Expansion


It is GPL! what other licence is there? ;-)

Felix Gallo and others mailed me to disagree with this. I have decided not to change it, so please don't try to start a debate on differing licences thank you.


Other Small Web Servers

This isn't an exhaustive list by any means but they appear to be the ones based on PIC controllers. Note the IPic does not have any source code and it appears it may become a commercial project.

With source

Without source

Valid XHTML 4.0! Any problems with this web page mail Vincent Sanders

There's lots more to the site! A good place to start is the Main Page.

100% hand typed HTML
© Vincent Sanders
$Id: index.html,v 1.1 2002/12/14 21:14:04 vince Exp $