Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Controlling a 10-pin non-standard parallel port


    I have a Linux RedHat 7.3 (2.4.17 gcc 2.95.3) embedded on a PC board.
    On this board, there is a small 10-pin non-standard parallel port (He10) that I would like to control thanks to ioctl() calls (PPCLAIM,...).
    This should be possible by installing ppdev module (that does not seem to be here right now).
    I did not install Linux myself and I am currently trying to find out which "Parallel Port Support" options shall be set in order to control it.
    1. Which are the right options to set in that case (non-standard 10-pin port)?
    -PC-style hardware
    -Multi-IO cards (parallel and serial)
    -Support Foreign Harware
    -IEEE 1284 transfer modes
    Or which modules are required ?
    Then, what config files/directories should I check to be sure my 10-pin parallel port is accessible and manageable (in /dev, /proc...) ?
    2. I think "ppdev" allows me to manage this non-standard port, am I right ?

    Thanks for your help.

  2. #2

    I managed to get through this.
    I used "outb" calls to write in 0x378 (LPT DATA register address, I checked this address in BIOS).
    Nothing was happening.
    Then I set the AUTOFEED (bit 1 of CONTROL register) to 1 (output = '0' because AUTOFEED is inverted) and it released the buffer output.
    Then my "outb" calls impacted the pins of my parallel port.
    This is the init sequence:
    int autofeed = 0x2; // 0000 0010 = autofeed set to 1
    // Get permission 
      if (ioperm(BASE, 3, 1) < 0)   // BASE=0x378
          perror("ioperm() 3 registers"); 
          status = ERROR_OPEN_PORT;
          outb (autofeed, BASE+2);  // BASE+2=CONTROL register address
    ioctl() calls were useless in my case probably because I am using PC Standard Parallel Port mode.
    But anyway, once ppdev was installed, I could run some ioctl calls successfully.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts