Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Controlling stepper motor with parallel port

Status
Not open for further replies.
what is "0x378","!kbhit"

a quote from: logix4u.net

"Where these registers are ?
In an IBM PC, these registers are IO mapped and will have unique address. We have to find these addresses to work with parallel port. For a typical PC , the base address of LPT1 is 0x378 and of LPT2 is 0x278. The data register resides at this base address , status register at baseaddress + 1 and the control register is at baseaddress + 2. So once we have the base address , we can calculate the address of each registers in this manner. The table below shows the register addresses of LPT1 and LPT2. Click here for tutorial on how to find base address of Parallel/Serial ports with sample source code."
 
  • Like
Reactions: mt2009

    mt2009

    Points: 2
    Helpful Answer Positive Rating
Re: control 2 stepper motor with parallel port

hi
could you offer an example for your recommendation ?
 

Re: control 2 stepper motor with parallel port

i control stepper motor by using visual basic. this is my codes.
Private Sub Command1_Click()
countit = 18 * 12.9 / 90 --the angle is 18 degree and i want to rotation of 360 degree. the purpose is each time that stepping motor rotate 18 degree and stand before countinue run to get 20 times
fre = 20
Do While fre > 0
Do While countit > 0

Out 888, 160
Sleep (100)

Out 888, 32
Sleep (100)

Out 888, 96
Sleep (100)

Out 888, 64

Sleep (100)

Out 888, 80
Sleep (100)

Out 888, 16
Sleep (100)

Out 888, 144
Sleep (100)

Out 888, 128
Sleep (100)

countit = countit - 1
Loop
Out 888, 0
Sleep (10000)
fre = fre - 1
Loop
End Sub
this code use to control stepping motor that has 1.8 angle/step
i use lpt to connect stepper motor and computer (pc)
when i run this code, the stepper motor run and get 18 degree and standing. someones can help me to make this code corectly
 

Men i am building this thing over ULN 2003 facing same problems cant send command thru ... Windows Xp any help
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top