View Full Version : Why my parallel port doesnt communicate with my robotic arm?

10-20-2005, 12:18 PM
still struggling to get the parallel port communication work... dun
understand why it doesn't work... even i purposely pull one of the pin
GND, the port still read the pin as HIGH...
either sth went wrong with my parallel port.
my arm here means the microcontroller.

10-20-2005, 12:23 PM
1. Was the port working? (printer)
2. Did the potr work with your arm at least once?
3. Check Port: epp, spp etc.,
4. Read up 'parallel port programming....


Bit Function
Selects Current Mode of Operation
000 Standard Mode
001 Byte Mode
010 Parallel Port FIFO Mode
011 ECP FIFO Mode
100 EPP Mode
101 Reserved
110 FIFO Test Mode
111 Configuration Mode
4 ECP Interrupt Bit
3 DMA Enable Bit
2 ECP Service Bit
1 FIFO Full
0 FIFO Empty
Table 7 - Extended Control Register (ECR)


..AND please post a Reply when some one answers you! Dont disappear without a solution. :D

10-20-2005, 04:01 PM
Hey did you tried using Data Pins for reading also? If you did then you need to do two things-

1. Enable bi-directional port from BIOS

2. Write 32 in 0x37a register

outportb(0x37a,32); //this enables bi-directional support for printer port data //pins

I hope this may help :D

10-20-2005, 06:06 PM
Hi Bond
Is it the LPT of your PC?
Which OS You are using?

Being a very secure operating system, Windows NT/2000/XP assigns some privileges and restrictions to different types of programs running on it.It classifies all the programs in to two categories , User mode and Kernel mode ie; running in ring3 and ring0 modes. user mode programs are running in ring3 mode and Kernel mode programs are running in ring0 mode. The programs you generally write falls in the user mode category. The user mode programs are restricted to use certain instructions like IN, OUT etc.. Whenever the operating system find that a user mode program is trying to execute such instructions , the operating system stops execution of those programs and will display an error message.

Kernel mode programs are in no way restricted in executing such instructions. Device drivers are capable of running in kernel mode. So the work around for the above stated problem is to write a kernel mode driver capable of reading and writing data to parallel port and let the user mode program to communicate with it.

please read more at http://www.logix4u.net
download the dll present there and you can use that in VC++, VB and all other environment where dll support is present.


10-20-2005, 11:52 PM
Hi guys!
Cmon bond, now you have support... dont let go!!
Thanks mishradk for the link.

10-21-2005, 12:42 PM
docel,mishradk,devpriya....thx..sorry i'mnot disappear when u all giving me solution..
sorry sorry..coz i stillworking on it.this parallel port communication suppose to be straight forward but it just couldnt communicate. i suspect the problems lies on the circuit,rite? i use the DLL provided for Xp. then i even try the DLL used for Win98, still couldnt work.aiyo...
any idea SOME MORE?....sorry for late reply once again..i treasure all ur help!!... :P

10-21-2005, 01:21 PM
Hi bond,
Sorry youre still having problems.
Can you post ckt,diagram of hardware and components used, after checking the actual connections? also list of SW used.:?:

You could be making a simple mistake without knowing it! :lol:

10-21-2005, 03:46 PM
Hey Bond...
The simplest soln to this is boot your system with a dos boot disk.
write any LPT interface program in TC/VC++ console application to bring one bit ON/OFF (the way Devapriya has expalined). Put your multimeter to the o/p pin and ground, and chk that the o/p voltage is changing.
If it is then your LPT is OK.

some other links are

10-22-2005, 11:57 AM
if u r using windows Xp then u have to install userport.zip for interface in c/c++/java

u can get userport.zip by google search or from yahoo gp-parallel port and donwload pforu(tell how to install userport.zip) read also parallel port for u and do bios settings. if any probs then tell me

Bibin John

10-23-2005, 05:27 PM
Hi all,

I hv tried the solutoins suggested,but still couldn't solve the problem.

here's the interface circuit:

Dn ---/\/\/\------ RAn

the data pins from the LPT (D0 to D3) are connected to the port A (RA0 to RA3) of my microchip PIC16F84A.

but even when i disconnected the LPT port from the microcontroller, the voltage on the LPT data pins also look strange... when i tried to send 0x1 to the port, all the data pins are set to HIGH (4.98volts), and even when i send 0x00, all are still at HIGH state...

what could be the reason?

please advise


10-24-2005, 12:17 AM
Hi Bond..
Are you sure abou the address of your printer port?
try changing ...

10-24-2005, 10:39 AM
Try sending 0x30 for switching off and 0x31 to set the datapin D0 at high state...

10-27-2005, 01:10 AM
the address for interfacing parallel port is 0x378. As you know all NT based operating system dont support user mode programming in parallel port. In win98 you can directly acess the parallel port. you can also use linux but in linux you have to recompile the linux kernel for interfacing with parallel port.

the voltage level is nearly 5v when high and 0v when low.

you can connect leds and check wether it works. prepare a parallel port trainer and test with the help of it.

in parallel port 18-25 pin are ground and the remaining are used.
in that too 8 pins are avilable for data transfer.

11-04-2005, 07:40 PM
also.. make the grounds for the uC and Parallel port common

go through the making your room voice controlled tute.. and try interfacing through VB.. Vice reco part aint required (ehh.. )