Thread: PCI Bus Detection

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    4

    PCI Bus Detection

    Hi all,
    anyone could tell me how to write a c++ builder program which can dectect PCI bus device and also how can I send a piece of data out and receive back so that I know that the PCI is working fine !!

    any answer would be appreciated.

  2. #2
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    Well... that's going to depend on your hardware platform, your operating system, and maybe the specific device your're trying to "detect".

    If you're using windows, you might post the question on the windows board. (Try to be specific about what you mean by "detect", and what type of device you want to detect.) Just about everything related to windows programming is "difficult"... Just a warning in case you're a beginning programmer.

    If you're using windows, the OS should have already detected the device, and maybe you can query the registry to get the information. (Ask on the windows board how to do this.)

    Windows tries to insulate you from the hardware. With windows XP, you have to get into the kernel mode to read/write the hardware. I have a driver book, but still haven't learned how to do this.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    4
    thx bud

  4. #4
    Registered User Xei's Avatar
    Join Date
    May 2002
    Posts
    719
    You need ring 1 access to hardware in order to manipulate it, or communicate with it, at such a low level. You can do this by creating a service, or else you can use a driver. One Driver that allows Ring1 access is called PortTalk, which comes with source code and you may find it here: http://www.beyondlogic.org (you need Microsoft Windows DDK to compile the Driver, VC/C++ 6.0/.NET cannot compile drivers)

    I hope this helps solve the hardware issue before you encounter the "Privileged Access Fault" errors, which will happen even if you use ASM to communicate to the hardware via 'in' and 'out'. Good luck.

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    4
    thanks Xei

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Modem in Linux need help fast please!
    By xxxrugby in forum Tech Board
    Replies: 0
    Last Post: 03-30-2005, 04:10 PM
  2. PCI modem needs help
    By Jaguar in forum Tech Board
    Replies: 3
    Last Post: 09-26-2003, 01:01 AM
  3. PCI card
    By a1a14635 in forum Windows Programming
    Replies: 1
    Last Post: 03-20-2003, 08:21 PM
  4. bounding box collision detection
    By DavidP in forum Game Programming
    Replies: 7
    Last Post: 07-07-2002, 11:43 PM
  5. PCI ISA bus Interface
    By Mohsinzb in forum C Programming
    Replies: 0
    Last Post: 03-27-2002, 01:12 PM