
-----------------------------------
Paul
Thu Apr 15, 2004 5:52 pm

LEDs?
-----------------------------------
Ok, does anyone know how to make output on a LED using parallel ports and a breadboard? using turing.
This is an comp engineering question, since my friend doesn't wanna post it herself, I'll post it for her.
I dunno what info is important, but please post all the steps?
I'll give 20 bits to whoever does, and if it works.
and if this doesn't have to be done in turing (aka, a ezier way, tell me pls)

-----------------------------------
Paul
Thu Apr 15, 2004 6:20 pm


-----------------------------------
I assume it has something to do with parallelput, and when I looked up the doc, Im clueless...

-----------------------------------
gamer
Thu Apr 15, 2004 6:29 pm


-----------------------------------
i kinda learned it so......
theres 25 pins on parallelport, u can hav up to 8 lights (plug to pin 2-9, other pins are for the ground wire)
ok, so after u plug the leds wires into the port (find out which one is ground) , plug the ground one to any pins while the other wire must go into either 2-9 pin
to turn on that specific pin (for power for led), just use parallelput command, if u plug into pin 2, use parallelput (2), if its in pin 4, use parallelput (8) becuz the computer reads binary ( i think u kno how ta convert)

think dats basically it

-----------------------------------
gamer
Thu Apr 15, 2004 6:34 pm


-----------------------------------
ok heres a pic of the parallel port pins.......the circled pins are 2-9

p.s.: btw, im sry if i made some mistake, like if u pluged in pin2 , command may just be parallelput (1), but i believe it starts at 2 alredi...anyhow later on u'll still hav ta apply binary numbers

-----------------------------------
gamer
Thu Apr 15, 2004 6:41 pm


-----------------------------------
ok im sry for the triple post but, i think made one more mistake :oops: 4get the binary thingys.....

ok imagine the 2-9 pins

0 0 0 0   0 0 0 0 %% if they ar alll off

1 1 1 1   1 1 1 1%%if they ar all on

the base number to turn on the first pin (from right) is 1,then 2, 4, 8, 16, 32, 64, 128

so dependin on which pins u wanna turn on, use parallelput with these numbers

if ya wish to turn on a few leds at the same time then......

let say three leds are placed on pins 2,3,4....then u simply add up 1,2,4 which will be parallelput (7)

-----------------------------------
Paul
Thu Apr 15, 2004 7:24 pm


-----------------------------------
like can some one tell me the steps? and the code?

-----------------------------------
gamer
Thu Apr 15, 2004 8:07 pm


-----------------------------------
wut do u mean.......i just told u almost everythin

-----------------------------------
gamer
Thu Apr 15, 2004 8:22 pm


-----------------------------------
paul, tell me wut exactly u need ta kno

building of the breadboard?conectin breadboard to parallel port? connectin the leds to breadboard? or the turing code to turn on specific pins on the parallel port (if so tell me the pin # then i can give u the exact codes)

-----------------------------------
Paul
Thu Apr 15, 2004 8:35 pm


-----------------------------------
I dunno, like how would one go about doing something that would allow u to input 1 on the keyboard and it would display 1 on the LED?
I just need the general idea of the code.

-----------------------------------
gamer
Thu Apr 15, 2004 8:49 pm


-----------------------------------
u mean turnin the led on??
well again it depends on which pins u stuck the led wire into (look in the pic i attached, i think u stick the positive wire into one of the 8, n the negative wire to any other ones for ground)

since theres 8 pins:
  %    %    %    %     %    %    %    %   