Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 19th July 2007, 05:24 PM   (permalink)
Default PIC embedded webserver project

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 is offline  
Reply With Quote
Old 19th July 2007, 07:27 PM   (permalink)
Default

Quote:
Originally Posted by nurick
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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Reply With Quote
Old 19th July 2007, 07:29 PM   (permalink)
Default

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.



I am sure there are others out there. This just happened to be one I linked to af few months ago.

Last edited by 3v0; 19th July 2007 at 07:44 PM.
3v0 is online now  
Reply With Quote
Old 20th July 2007, 02:03 AM   (permalink)
Default

Quote:
Originally Posted by 3v0
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 (http://support.3com.com/infodeli/too.../3c5096.1.htm). 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.
nurick is offline  
Reply With Quote
Old 20th July 2007, 02:38 AM   (permalink)
Default

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.
3v0 is online now  
Reply With Quote
Old 20th July 2007, 03:41 AM   (permalink)
Default

A similar project was the PicNic:
http://members.vol.at/home.floery/electronix/picnic/
I think you are better off using MicroChips ENC28J60 and free sample code which comes with TCP stack and HTTP & FTP servers built in.
__________________
--- The days of the digital watch are numbered. ---
kchriste is offline  
Reply With Quote
Old 20th July 2007, 08:15 AM   (permalink)
Default

Quote:
Originally Posted by nurick
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 http://support.3com.com/infodeli/too...9/3c5096.1.htm
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.

Quote:
Originally Posted by nurick
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.
__________________
L.Chung
eblc1388 is offline  
Reply With Quote
Old 20th July 2007, 05:40 PM   (permalink)
Default

@ 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 is offline  
Reply With Quote
Old 21st July 2007, 07:47 AM   (permalink)
Default

Quote:
Originally Posted by nurick
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.

Quote:
Originally Posted by nurick
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.
__________________
L.Chung
eblc1388 is offline  
Reply With Quote
Old 21st July 2007, 10:24 AM   (permalink)
Default

Source code for the linux 3c509b driver
Linux-2.6.17/drivers/net/3c509.c

I know you are not using linux but it
should show how to setup and use the card.
3v0 is online now  
Reply With Quote
Old 21st July 2007, 10:38 AM   (permalink)
Default

There were quite a lot of ethernet PIC projects on the net, but most of the links don't seem to work anymore? - you might try looking on the PICList though?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Reply With Quote
Old 21st July 2007, 12:23 PM   (permalink)
Default

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.

http://www.janw.dommel.be/pic18f452-e.html
gradtje is offline  
Reply With Quote
Old 21st July 2007, 12:32 PM   (permalink)
Default

@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 by nurick; 21st July 2007 at 12:36 PM.
nurick is offline  
Reply With Quote
Old 21st July 2007, 01:06 PM   (permalink)
Default

Quote:
Originally Posted by nurick
@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 link to a working project with code. My appologies to anyone using a slow internet connection. This is rather cool, the webserver is interactive.


Last edited by 3v0; 21st July 2007 at 01:57 PM.
3v0 is online now  
Reply With Quote
Old 22nd July 2007, 07:25 AM   (permalink)
Default

checked the link. I think grad forgot to put the link before =P. Its amazing! Thanks man u rock!
nurick is offline  
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Best PIC for Project? PJ Adams Micro Controllers 21 11th May 2007 04:53 PM
PIC Project advice - doubling frequency coze Micro Controllers 8 26th February 2007 07:05 PM
latest project in embedded systems cooldude440 Electronic Projects Design/Ideas/Reviews 3 20th February 2006 09:02 PM
Newcomers, please read! (PIC regarded) Upd. 0xD Jay.slovak Micro Controllers 0 17th April 2005 01:04 PM
Embedded sys project idea planetajay Electronic Projects Design/Ideas/Reviews 1 12th February 2004 08:56 PM



All times are GMT. The time now is 11:13 PM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.