FAQ
frequently asked questions
Which ethernet cards work with picnic?
I use a NE 2000 compatible ISA ethernet card with a Realtek 8019 chip in 8-bit mode. Your card should be somehow
similar to mine:
- ISA - probably you know ISA, the Industry Standard Architecture. Most computers had ISA slots, but nowadays it is
mostly replaced by PCI. The ISA bus protocol is quite simple and therefore a good choice when interfacing with a PIC.
Your card has to be an ISA card in any case.
- 8 bit mode - ISA supports 8 bit mode as well as 16 bit mode. As the PIC is a 8 bit microcontroller we want to use
the 8-bit mode of course. If you have a look at a 16-bit ethernet card you'll see that it's connectors are splitted
into two groups. The smaller one is only used in 16-bit mode - normally, the NIC looks on power up if the second
group is connected and chooses thereupon the operation mode. I don't know if all the NICs support 8-bit mode but I
guess they do so. Your NIC has to support 8-bit mode in any case.
- NE 2000 compatible - this is a common term in the ethernet world. It describes the way the NIC works (interfacing,
memory management, etc). Theoretically, a driver for any NE 2000 card should work for all other
NE 2000 compatible cards. As a matter of fact this is theory. There might be minor details that have to be adjusted
to make the driver work.
I wrote picnic with the help of Realtek's 8019 and National Semiconductor's 8390 datasheets, so i would call picnic
very NE 2000 compatible. Therefore any NE 2000 compatible card (supporting 8-bit ISA) is a good choice for picnic.
But, as mentioned above, there could be problems. But problems are there to be solved ...
- Realtek 8019 - this is the name of the NIC. It has some features that are beyond the scope of what is called NE
2000 - but I didn't use them. Your card has not to host a Realtek 8019 chip, but has to be NE 2000 compatible.
Please send me an email with the name of your NIC and the name of your card if it works with picnic!
Where to get my picnic compatible card from?
Now you know what your card should be like. But where to get such a card from? Probably the cheapest way to get an ethernet card
is to ask friends etc for old not-in-use ISA cards. The chances are not too bad to catch a NE 2000 compatible card, most
people are happy to get rid of their old electronic rubbish.
Also, some shops still offer ISA ethernet cards. It's sometimes hard to find out, whether these cards are NE 2000 compatible
but a short email to the shop should help.
The internet is a good resource to figure out if a chip is NE 2000 compatible and if it supports 8-bit mode.
I got a card, how to connect it?
The documentation page has a circuit layout, this is a good starting point. The pinout of the ISA slot is standardized, so
you can simply connect the same way as i did, except the IRQ line. You have to connect that IRQ line the NIC uses - see next
question for details.
Where to get base address and IRQ from?
Every ISA card is configured for a base address and an IRQ line. These two parameters make it possible to have more than one
card on the ISA bus. If you ever installed an non plug and play ISA driver you surely remember that you had to set base
address and IRQ. But where do you find these values?
If you are lucky you have either jumpers to set them or a label (with the values) somewhere on the card.
If you are not lucky: E.g., my card had no jumpers and no label, but it has an onboard EEPROM where these values are stored.
nicshell gives you access to this EEPROM.
But nicshell only works for some cards. Another possibilty to get these values is to put the card in a computer, install a
driver and
- if it's a plug and play card look which configuration the plug and play driver uses
- or do the trial-and-error method: go through all configurations and look which one works.
If you got the base address, don't forget to change the corresponding entries in the picnic source (webpic.asm).
If you got the IRQ line, don't forget to connect this and only this IRQ line to picnic's interrupt input (see question above)
Nothing works!
I assume you checked your hardware wiring twice (did you connect the right IRQ line?), plugged in the ethernet card the right
way round and configured webpic.asm (ISA base address and an IP address, that works) correctly. For this kind of nop picnic includes debugging code.
You have to set the DEBUG flag when compiling and connect the PIC somehow to the serial port of your computer. If you don't
receive any debugging information, your connection to the serial port is either broken or the PIC doesn't start up.
Have a look at the source code to figure out where the PIC gets stuck/what the debugging information means. If you find a
solution for your problem, send me a patch. If you can't find a solution:
chimaira@users.sf.net
How can I crush your souce code into the PIC?
The source code of picnic is written in assembler. You need a compiler to translate the source code into a format
a PIC programmer understands. A PIC prorgammer consists of some hardware and software compliant with this hardware.
This bundle takes the compiled source code and programs PIC's program memory. For more information search the web!
Aha, I need an assembler/compiler. Which one?
I worked with gpasm from the gputils package. A great piece of software for *NIX and Windows! MPASM, microchip's
PIC assembler, works too.
And which programmer?
I built my own programmer, with help by Microchip's application note 589 (AN589). But I won't release this programmer
as its a horrible mess. Believe me.
Obviously, i have a not frequently asked question
I might have the answer: chimaira@users.sf.net