Posted: Sun Feb 25, 2007 7:54 pm
i could easily do the software side in linux or dos. i dont have any programming tools for windows(anyone want to "lend" me a copy of visual c++). but here's a summary of what needs to get done if someone wants to mess with it.
pc parallel port address is 0x378
pins 2-9 can output 5v when triggered high.
pins 18-25 are ground.
Pin 2 3 4 5 6 7 8 9
Value 1 2 4 8 16 32 64 128
and 0=off
say pin 2 = forward (on value 1)
pin 3= back (on value 2)
pin 4=left (on value 4)
pin 5 = right (on value 8 )
pin 6=booster bit (on value 16)
so if you press up arrow on keyboard, send a 0x1 to port 0x378,
which will pull 5v on pin 2. connect to forward on transmitter(npn trans, relay, diode..etc ph2t can do this part, im not good with circuits.)
say you want to go backward and right at the same time.
backwards is 2, right is 8, add it up=10.. convert 10 to hex
0xA.. so send a 0xA to port 0x378 and it will turn on both pins 3 and 5
for back+right.
basic code
setup:
initialize the port ioperm(0x378,......)
outb(0x0,0x378) turn all data pins off (0x0)
(corresponding function is _outp(..) in windows)
poll for valid keypresses
send pin on value of keypresses to port. outb(keypressVal,0x378)
turn pins off when not keypressed. etc
schematics for the hardware from noxorc's original post(cool)
http://www.tinyrc.com/forums/attachment ... 1042427751
pc parallel port address is 0x378
pins 2-9 can output 5v when triggered high.
pins 18-25 are ground.
Pin 2 3 4 5 6 7 8 9
Value 1 2 4 8 16 32 64 128
and 0=off
say pin 2 = forward (on value 1)
pin 3= back (on value 2)
pin 4=left (on value 4)
pin 5 = right (on value 8 )
pin 6=booster bit (on value 16)
so if you press up arrow on keyboard, send a 0x1 to port 0x378,
which will pull 5v on pin 2. connect to forward on transmitter(npn trans, relay, diode..etc ph2t can do this part, im not good with circuits.)
say you want to go backward and right at the same time.
backwards is 2, right is 8, add it up=10.. convert 10 to hex
0xA.. so send a 0xA to port 0x378 and it will turn on both pins 3 and 5
for back+right.
basic code
setup:
initialize the port ioperm(0x378,......)
outb(0x0,0x378) turn all data pins off (0x0)
(corresponding function is _outp(..) in windows)
poll for valid keypresses
send pin on value of keypresses to port. outb(keypressVal,0x378)
turn pins off when not keypressed. etc
schematics for the hardware from noxorc's original post(cool)
http://www.tinyrc.com/forums/attachment ... 1042427751