LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-20-2020, 01:10 PM   #1
Kernel7_
LQ Newbie
 
Registered: Feb 2020
Posts: 3

Rep: Reputation: Disabled
Parallel port and control registers


Hello everyone ,

I have a peripheral (LCD) that connected to the parallel port 1.I have some questions hope to find answers


1-what are the representation of bits in control registers on PCSPP mode?
bit3 --> selector ----> inverted
bit2 --> reset ----> non inverted
bit1 --> feed line ----> inverted
bit0 --> enable ----> inverted

is this true for PCSPP mode?


2-when using outb() macros in C language is it possible to reach the following timing diagram

sketch after call ioperm() etc...

outb(0b0011) , Par_Port_Control_reg);
usleep(50);
outb(0b0010) , Par_Port_Control_reg);
usleep(20);
outb(0xf9 , Par_Port_Data_reg);
usleep(50);
outb(0b0001 , Par_Port_Control_reg);

will this code lead to this diagram if not how to reach to something like this

http://prntscr.com/r5bi9q


Thank you.
 
Old 02-21-2020, 01:59 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,425

Rep: Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591
Parallel ports went out about 15 years ago. They used fixed I/O & interrupts and memory was made contiguous. Have you an old box or a pci parallel port card? How old is your information?

I'm a hardware guy who remembers that time. I'd advise you to scrap that lcd unless you're running a museum.
 
Old 02-22-2020, 07:36 AM   #3
Kernel7_
LQ Newbie
 
Registered: Feb 2020
Posts: 3

Original Poster
Rep: Reputation: Disabled
well I have no other option rather than parallel port to communicate to LCD.

I have read that in PCSPP mode the control register bit3,1 and 0 are inverted except the bit 1 reference:https://en.wikipedia.org/wiki/Parallel_port

but when trying to write code based on that bits mapping nothing work on LCD.

Thank you
 
Old 02-22-2020, 01:21 PM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,425

Rep: Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591
I have had fierce trouble with parallel port drives. Notably,
  1. What works on one parallel port may not work on another
  2. Connector errors are very common. The pins are usually numbered in tiny writing on the plug, but errors are frequent.
  3. Voltage thresholds vary

Have you an oscilloscope?

Have you an old OS & pc or a pci(e) card? Why do you want to send ascii a (presumably) old lcd anyhow? Student project?

I can't get yuou past 1st base unless you give some answers
 
Old 02-22-2020, 02:57 PM   #5
Kernel7_
LQ Newbie
 
Registered: Feb 2020
Posts: 3

Original Poster
Rep: Reputation: Disabled
No I don't have oscilloscope ,OS is ubuntu 18.04 and the hardware components are not old.Pardon me why did you mention the pci port?

I tried to change the value of timeslice and spintime I thought they may effect but when I try to change their values I got invalid parameter message.

Actually do they make different?
 
Old 02-23-2020, 03:45 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,425

Rep: Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591Reputation: 2591
I mentioned pci because I didn't think any sane manufacturer was still putting parallel ports out, except, perhaps in the occasional Industrial PC.
The last Windows version to support parallel ports was XP, AFAICT. Serial port, parallel port & floppy disks all had fixed I/O & predetermined hardware interrupts, which work against contiguous memory. Does your kernel support it?

Last edited by business_kid; 02-23-2020 at 03:47 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to control peripheral ports: Accessing and writing on Parallel Port with C on Linux. Part LXer Syndicated Linux News 0 10-22-2015 11:42 AM
Printing registers with gdb: "No registers" is all I get. stf92 Slackware 2 03-09-2015 02:41 PM
LXer: Nvidia and ARM: It's a parallel, parallel, parallel world LXer Syndicated Linux News 0 03-21-2013 06:10 PM
Problem accessing control registers (cr0,cr2,cr3) Phobios Programming 1 09-15-2011 01:44 PM
PSX Control through parallel port julian_s Linux - Newbie 0 06-21-2004 02:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration