Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC embedded webserver project

Status
Not open for further replies.

nurick

New Member
Hi, Im a beginner in PIC programming and is conducting a project that will utilize a PIC as a webserver (18f45j10 for its dual serial pins for I2C and SPI). The project uses a ISA NIC (3com's 3c509b. legacy, i know) for its datalink.

I am asking for advice on which language is best for use in imitating the TCP/IP stack. Since I haven't started on my project so I dont know the complexities involved in programming the code. I am stuck in choosing between C and assembly language.

Also, for the network engineers out there, im having trouble powering up my ISA NIC, I have the 3c509b's technical datasheet and configuration drivers but alas, supplying 5v to the ISA bus doesn't power up the NIC. I am in need of advice in what to do with this problem.

Thanks in advance fellow enthusiasts!
 
nurick said:
I am asking for advice on which language is best for use in imitating the TCP/IP stack. Since I haven't started on my project so I dont know the complexities involved in programming the code. I am stuck in choosing between C and assembly language.

Although I'm a long term assembler user, I would suggest using C, MicroChip provide a free C compiler for the 18F series, and many of the application notes are in C rather than assembler.
 
I read you post wrong. I was thinking you wanted to write the TCP stack...

In regard to setting up the card use whatever you are most comfortable with. What language is the configuration drivers written in?

If you use C you can always look at the generated ASM if you need to be sure about what is going on.

You may want to look at this kit. It is another way to get there frolm here.
http://www.edtp.com/
It uses microchips free stack.

**broken link removed**

I am sure there are others out there. This just happened to be one I linked to af few months ago.
 
Last edited:
3v0 said:
I read you post wrong. I was thinking you wanted to write the TCP stack...



I do wanted to write the TCP/IP stack, but im initially trying to boot up the NIC before I start writing/intergrating the stack onto the project.

As for the which language the configuration driver's are written in, I have no idea. I just got them from 3com's support website (**broken link removed**. I need the necessary codes/routines to boot up the NIC, and I have no idea where to start as simply powering up the NIC through its ISA bus doesn't seem to work at all.
 
I am fairly sure that your card is supported by linux. You may be able to read that driver and adapt it to the PIC.

There have been similar project in the past that used ISA NICs. Have you googled to see if one of them uses your 3COM card?

Writing a stack is huge amount of work. Unless you are an accomplished programmer with gobs of free time I would not suggest it. Microchip has a free one. I think it would be an accomplishment just to get that running... There is also an open source one that was used on a ham radio satellite effort. Do not recall what it was called. Would not be surprised if microchip based theirs on it.
 
A similar project was the PicNic:
**broken link removed**
I think you are better off using MicroChips ENC28J60 and free sample code which comes with TCP stack and HTTP & FTP servers built in.
 
nurick said:
As for the which language the configuration driver's are written in, I have no idea. I just got them from 3com's support website **broken link removed**

These are the setup diskettes for the card when used on Windows.
What language? Perhaps C or X86 assembly compiled into EXE as they are drivers for Windows 95/98. You can't use an EXE driver for PIC. I have not downloaded the files and I guess very likely no source code is included.

nurick said:
I need the necessary codes/routines to boot up the NIC, and I have no idea where to start as simply powering up the NIC through its ISA bus doesn't seem to work at all.

You will have a hard time as most examples of interfacing a NIC to microcontroller is done via the RTL8019AS chip. Find and use the RTL8019AS(on an ISA card) would save you a lot of time and troubles as there are C or assembly codes available for you to test it right away.

There are a lot of registers, buffer pointers on the chip etc... to set up before the card would do anything. That's why one need to rely on other's work to kick start the interface, then modify it to one's requirement. Time is is what you don't have in this case.
 
@ 3v0 and Kchriste: I took a look on the PicNic project, however, it failed to provide some sort of source code in booting up the NIC (which is my problem). I also read somewhere that NIC's follow a certain standard in its boot sequence. Since the PicNic project used a Realtek NIC, I believe that it would have the same boot sequence as 3com's

@LC: Yes, I know EXEs cant be used for PICs. Im in a pinch looking for the actual source codes for those drivers. I think ill take your advice and try my chances with the RTL8019AS chip, but can you tell me where can i find these C or assembly codes available for testing? I am also currently looking for other's work and application notes.

thanks again for the feedback peeps.
 
nurick said:
Since the PicNic project used a Realtek NIC, I believe that it would have the same boot sequence as 3com's

This is a dangerous assumption. I can't say for sure but different chips very likely require different setup sequence as their internal registers, memory amount are different.

The PICNIC project do indeed contains the initialising routine for the NIC in its source code. It runs on a 16F877 PIC connecting to an ISA card.

nurick said:
but can you tell me where can i find these C or assembly codes available for testing? I am also currently looking for other's work and application notes.

Use the following search phases in Google: "rtl8019as filetype:c" or "rtl8019 filetype:c" and you will get a lot of links. Of course you need to download the RTL8019AS datasheet and study it several times in order to understand what others are doing in their routines.

It is a hell of a task. :eek:
 
This one works (both link and project itself) and resembles your idea, I`ve build one myself and tackled some bugs.
It is purely assembler, so take a deep breath ;) Nevertheless its a good starting point I guess and it has all the information you need.

**broken link removed**
 
@LC: Yea you're probably right about the setup sequence. Also, thanks for the tip about the RTL8019. Yeah I just realized just how big this thing is, and how excruciatingly complicated. Im in the process of slowly uncovering things about the possiblities and complications of my project, all thanks to you guys.

@3v0: yes im not using linux but the source code will tell me how it works, and give me an idea how my pic will boot the NIC. Thanks alot man! I forgot that linux resources are open-sourced! I was becoming hard looking for the source code for the driver.

@Nigel: Yea there are alot, but most of those are ill-documented and somewhat bogus or vague. Im trying to get application notes for those projects and look for consistent information.

@gradtje: Umm I dont understand what you said about the "link and the project" are you refering to the link's of somebody's post? BTW, thank you for helping me.
 
Last edited:
nurick said:
@gradtje: Umm I dont understand what you said about the "link and the project" are you refering to the link's of somebody's post? BTW, thank you for helping me.

If you check gradtje's post he has a **broken link removed** to a working project with code. My appologies to anyone using a slow internet connection. This is rather cool, the webserver is interactive.:)

**broken link removed**
 
Last edited:
nurick said:
I do wanted to write the TCP/IP stack, but im initially trying to boot up the NIC before I start writing/intergrating the stack onto the project.

Why do you want to write an entire TCP/IP stack on your own? Is this a school project, or just for practice?
 
Nice to see someone putting all those ISA cards to good use. How about for the next project a nice Sound Blaster interface? =)
 
Networking projects with Microchip MCUs ...

Hi There,

I've been reading the forum for a while but just joined in as a registered user.

I did put together several projects showing how to put together a basic circuit with different Microchip MCUs
and ethernet controllers.

I also modified one of the original versions of the Microchip TCP/IP stack to make it more easy to customize and configure.

If you want to take a look pay a visit to: http://www.ljcv.net/projects/

And I'll be around to share what a learned and answer questions if I can.

Best Regards
 
blueroomelectronics said:
Thanks for the link jmodio, I'm working on a PIC / Ethernet kit and your link is excellent for that.

You are welcome.

If you need any help feel free to contact me.

BTW, I always loved the 3D drawings in your site :)

Regards
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top