chiptoxic
Newbie level 3
pci board
Hi all
I really want to learn how to interface to the PCI bus and am trying to collect information on how to go about designing and building a simple card. What I'm aiming for at first is a very simple I/O card that can do something like control some leds and maybe read some ttl input pins. It would be great if i can build this using simple ttl logic and PIC micro as main controller as i have this stuff laying around at home.
* I'm going to be developing under linux
* will probably use C to write a simple driver
* Need to build as cheap as possible (don't really have the cash at the moment to go out and buy fpga development kits and such)
* most likely i will keep to 33MHz/32-bit card as this should make things a little more simple (think 33MHz slowest i can go??)
* really want to have the card follow the specs so OS will detect and use this card just like any standard card
After seeing the project at http://elm-chan.org/works/pci/report_e.html I'm sure i can get something simple working even if its does make normal PCI card designers want to shoot me.
Some questions i have:
======================
1) Does anyone know if its possible to build a simple PCI card using for example a PIC microcontroler and/or simple TTl logic. Hhow basic can a pci card be made. Will i need to use something like a FPGA?
2) If i have to use a FPGA or simaler device. Does anyone have any suggestions on cheap products. Ideal solution would be for me to buy a fpga and find a free open source software package to design logic with and beable to build a cheap programmer (JTAG interface?). I have thought about getting something like this High Volume Starter Kit Bundle (HW-SPAR3-CPLD-DK) Xilinx Development Boards from
**broken link removed**. to playwith in the past so something like this may be worth me investing in.
3) I have managed to get hold of the "PCI local bus spec 2.2 and 2.3". Is there any other documents i should try and get my hands on to help me design this system. The PCI-SIG site lists lots of diffrent specs such as
* Conventional PCI 2.2
* Mini PCI
* PCI to PCI Bridge Architecture
* PCI Hot Plug Specifications
* PCI Bus Power Management Interface 1.2
* PCI Mobile Design Guide 1.1
* PCI Firmware 3.0
so whats the bare minimum documentation i should have/will need.
4) Anyone know of any good examples of people doing/done a simular project. (Most projects i have seem give almost no information how they actuly did it). If it looks like i will possible for me build a PCI card i think ill also buy the book "PCI Bus Demystified" as it seems cheap and it gives one possible design application developing an interface card for controlling a robot from a PC from the reviews i have read.
6)If i cant create a spec compliant card and use hacks such as setting card address using switches. How can i read/write to my card and make sure im using the correct address etc. Will system show a card at that adderess just with no vendor id information etc.
I cant seem to find any good programming tutorials / info so looks like ill have to just diveinto the lspci/setpci tools code and the linux kernel. No idea but i may beable to access data via /dev/mem. If i find a way of getting port address guess i can use inp() and outp() too
Any help/advice, any of you could give me would be greatly apriatiated. As this will be alot harder than the old ISA ports. I now have lots of reading todo with the matirial i have found so far.
If anyone is intrested i have posted a page on my site with all the resources i have found so far. See **broken link removed**
Hi all
I really want to learn how to interface to the PCI bus and am trying to collect information on how to go about designing and building a simple card. What I'm aiming for at first is a very simple I/O card that can do something like control some leds and maybe read some ttl input pins. It would be great if i can build this using simple ttl logic and PIC micro as main controller as i have this stuff laying around at home.
* I'm going to be developing under linux
* will probably use C to write a simple driver
* Need to build as cheap as possible (don't really have the cash at the moment to go out and buy fpga development kits and such)
* most likely i will keep to 33MHz/32-bit card as this should make things a little more simple (think 33MHz slowest i can go??)
* really want to have the card follow the specs so OS will detect and use this card just like any standard card
After seeing the project at http://elm-chan.org/works/pci/report_e.html I'm sure i can get something simple working even if its does make normal PCI card designers want to shoot me.
Some questions i have:
======================
1) Does anyone know if its possible to build a simple PCI card using for example a PIC microcontroler and/or simple TTl logic. Hhow basic can a pci card be made. Will i need to use something like a FPGA?
2) If i have to use a FPGA or simaler device. Does anyone have any suggestions on cheap products. Ideal solution would be for me to buy a fpga and find a free open source software package to design logic with and beable to build a cheap programmer (JTAG interface?). I have thought about getting something like this High Volume Starter Kit Bundle (HW-SPAR3-CPLD-DK) Xilinx Development Boards from
**broken link removed**. to playwith in the past so something like this may be worth me investing in.
3) I have managed to get hold of the "PCI local bus spec 2.2 and 2.3". Is there any other documents i should try and get my hands on to help me design this system. The PCI-SIG site lists lots of diffrent specs such as
* Conventional PCI 2.2
* Mini PCI
* PCI to PCI Bridge Architecture
* PCI Hot Plug Specifications
* PCI Bus Power Management Interface 1.2
* PCI Mobile Design Guide 1.1
* PCI Firmware 3.0
so whats the bare minimum documentation i should have/will need.
4) Anyone know of any good examples of people doing/done a simular project. (Most projects i have seem give almost no information how they actuly did it). If it looks like i will possible for me build a PCI card i think ill also buy the book "PCI Bus Demystified" as it seems cheap and it gives one possible design application developing an interface card for controlling a robot from a PC from the reviews i have read.
6)If i cant create a spec compliant card and use hacks such as setting card address using switches. How can i read/write to my card and make sure im using the correct address etc. Will system show a card at that adderess just with no vendor id information etc.
I cant seem to find any good programming tutorials / info so looks like ill have to just diveinto the lspci/setpci tools code and the linux kernel. No idea but i may beable to access data via /dev/mem. If i find a way of getting port address guess i can use inp() and outp() too
Any help/advice, any of you could give me would be greatly apriatiated. As this will be alot harder than the old ISA ports. I now have lots of reading todo with the matirial i have found so far.
If anyone is intrested i have posted a page on my site with all the resources i have found so far. See **broken link removed**