Computer Science Canada

PC.ParallelPut tutorials.....

Author:  jasonhan416 [ Sun Jan 18, 2009 8:57 pm ]
Post subject:  PC.ParallelPut tutorials.....

Quote:
var usrIn : string (1)

PC.ParallelPut (1, 0)
put "Parallel port has been zeroed, press any key to continue..."
getch(usrIn)
loop
for i : 0 .. 7
%Set data bit i on parallel port LPT2
PC.ParallelPut (1, 2 ** i)
put "PC. ParallelPut(" , 2**i , ")"
end for
delay (1000)
put "Press a key to go around, or press Escape to exit..."
getch(usrIn)
exit when usrIn (1) = chr (27)
end loop
PC.ParallelPut (1, 0)


My teacher jsut gave me this example but I don't really know how this works.
Basically the whole point of the my turing is this. If you look at my PARRAELTEST.T i am trying to make that work with the code i posted above.
I am basically making a parrael port and connecting it to my computer. ANd the turing is the input and the LED light as a output. I do not how to connect the code above into my turing file so my turing file is working as a INPUT sign.

PLEASE HELP!

Author:  Nored [ Sun Jan 18, 2009 10:53 pm ]
Post subject:  Re: PC.ParallelPut tutorials.....

PC.ParallelPut sets the values on the specified port. It's similar to parallelput, but PC.ParallelPut sets the value of a certain port (rather than setting values for multiple pins at once). If you want your Turing program as input, simply program it as such-whenever you want to have an output, use PC.ParallelPut to set the port that your LED is connected to high (or low, depending on what exactly you want to do with it).

Author:  jasonhan416 [ Sun Jan 18, 2009 11:32 pm ]
Post subject:  Re: PC.ParallelPut tutorials.....

soo. how does it work >_>


: