Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 PC.ParallelPut tutorials.....
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
jasonhan416




PostPosted: 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!



PARRELTEST.T
 Description:

Download
 Filename:  PARRELTEST.T
 Filesize:  25.58 KB
 Downloaded:  68 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Nored




PostPosted: 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).
jasonhan416




PostPosted: Sun Jan 18, 2009 11:32 pm   Post subject: Re: PC.ParallelPut tutorials.....

soo. how does it work >_>
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: