Computer Control your bit.

Mostly dealing with electronics and pcbs and modifying them, all the things that make electrical-engineers tick and the rest of us cringe in fear.
User avatar
Clint
bitPimp
Posts: 519
Joined: Sun Jul 06, 2003 7:20 am
Location: Albany, NY
Contact:

Post by Clint »

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
User avatar
guerd87
bitPlaya'
Posts: 176
Joined: Sun Sep 17, 2006 5:32 pm
Location: Gold Coast, Australia

Post by guerd87 »

Well it seems that this could be harder than i though

I cant get a copy of VB and i have no ideas on the code side of things, clint, do you know how to code in c++ with text only programs?
User avatar
Clint
bitPimp
Posts: 519
Joined: Sun Jul 06, 2003 7:20 am
Location: Albany, NY
Contact:

Post by Clint »

I've been having trouble finding vb or vc++ too. does no one do decent warez anymore :-( . I have cygwin so i may look at installing mingw(gnu
windows api) on top of that. we'll see what happens. We'll still need a 3rd
party dll to access the printer port as windows doesnt allow direct
hardware access.

it still looks doable. :-o
CaboWabo
Site Admin
Posts: 10258
Joined: Tue Dec 10, 2002 4:05 pm
Location: The Adult Table
Contact:

Post by CaboWabo »

I think you can grab a trial version of Visual Studio 2005.
Dear Life Cereal, Where do you get off? Part of a balanced breakfast and delicious? Who do you think you are? By now you may have guessed I'm speaking ironically and have nothing but good things to say about what you do. Life cereal do not change a thing.
User avatar
Clint
bitPimp
Posts: 519
Joined: Sun Jul 06, 2003 7:20 am
Location: Albany, NY
Contact:

Post by Clint »

CaboWabo wrote:I think you can grab a trial version of Visual Studio 2005.
Sweet! ordered.

total cost was $6.47 for the dvd with a 180 day license.
User avatar
guerd87
bitPlaya'
Posts: 176
Joined: Sun Sep 17, 2006 5:32 pm
Location: Gold Coast, Australia

Post by guerd87 »

nice stuff :) i was talking to one of my programmer mates but he has been too busy with work and stuff to help me out, so im out of the codeing side :(
User avatar
Clint
bitPimp
Posts: 519
Joined: Sun Jul 06, 2003 7:20 am
Location: Albany, NY
Contact:

Post by Clint »

Got those microsoft dvd's today.
Post Reply