7-segments using parallel port

Status
Not open for further replies.

zhi_yi

Full Member level 4
Joined
Feb 2, 2005
Messages
196
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
2,548
hi there, please help me.

i tried to build a simple digital clock using 7-segment and controlled by computer parallel port. i use 74LS244 as buffer, and 74LS138 Demultiplexer.

74LS138 outputs is connected to the cathode of the four 7-segments. the 7-segments is common cathode.

i have two problems..

1. from what i see in the 74138's datasheet, the output of the selected pin would only have one pin in low state from 8 pins of outputs, the less would be in high state. but when i tried it, i got two 7-segments light up at once, it would mean that the outputs of the 74138 have two pin in low state at once, please tell me where is my doubt?

2. to change the "numbers" of the 7-segments, i use the data register from parallel port, and connected to buffer 74244, but when i tried it, i didn't connect the port to the input of the buffer, but still the 7-segments could be light up and it show "number 8", why?

i am sorry if there are a lot of grammar error, if it's not clear enough for you guys to help me, i would try to draw a schematic.. thank you..
 

74138 can assert a "0" on only one output at a time, but "dynamically" speaking if you have a square wave on one of its inputs you will be having two segments "sharing" time between them ie. both will be ON (only for your eye) ..

Number "8" means that all segmants are ON .. why?
At this stage it is difficult to say, if you can post the schematic diagram ..

Regards,
IanP
 

means that all segmants are ON .. why
 

thank you..

why only for my eye???

here i upload the schematic..

i mean, when i am not connect the output from the parallel port to the input of the buffer 74244, the seven segment that selected by the 74138 is still light up and show "number 8", i don't know why, is it because the output of the 74244 is inverting, and while i didn't give the input to the buffer, it will indicated as low on input, therefore the output would be inverted and become high? but while i connect it and send data to the buffer, still the seven segment is light up and show "number 8".

can the code below work?

while(1){
/*i send data to 74138 to switch between four 7-seg, if i send 00 it will select one from four of the output, i will change between 00,04,08,and 0c, it would be clear if you see the truth table on datasheet*/
outportb(control,0x00^oxob);
/*and then i send data to the buffer, if it works, the number showed in the seven segment should not be "8", but must be changed, but the fact, it still show number "8"
outportb(data,0xf3);
}

the 74138 can work as decoder and demux, i used it as demux, it have 3 pins "enable" say E1, E2, and E3, E1 and E2 is active low, i connected it to ground, and E3 as inpur for demultiplexer, i connected it to Vcc, and it have three selector A,B, and C, so it have 8 outputs, i just use 4 of the outputs, therefore i connected the C to ground, so there is only two selector (A and B), and four output used. but while i change the input of the selector by 00, 01, 10, and 11, while it is 01, it works, the seven segment selected is change, and while 10, it also works, but only 00 and 11, two seven segment light up at once, why??

thank you very much..
 

I am not sure what is the aim of this whole excercise ..
Most likely you will be using latches and drivers, than, as it is in your case, buffers and demultiplexer ..
Anyhow, if you want to do it this way - it is up to you ..

What you can try is this: disconnect this circuit from the parallel port and connect pullup resistors (10kΩ or so) to all inputs: A, B of 138 and all 244 inputs ..
When you power it up none of segments should be on, however Y3 of the 138 should be low ..
If you connect any of the 244 inputs to 0V you should have one diode in the 4th segment on .. you can test other inputs and this will prove that your hardware works ..


why only for my eye???
As I mentioned before 138 can hove only one output active so if you "see" 2 segmants ON it doesn't mean that both outputs are "L" at the same time. You can check it with an oscilloscope ..
If both outputs are "L" than the 138 is faulty ..

Regards,
IanP
 

okay thank you..

i am no longer using 74138 to control the cathode of the seven segment, i use only "data register" from parallel port, 4 bits of data register connected to the cathode of seven segment, and the less four bits connected to the input of GAL 16V8, the GAL is programmed as decoder, the output from GAL is connected to the anode of the seven segment, so, while i output the data from "data register", all of the pin of the seven segment would receive the signal simultanously, it's work.

i want to know how about the previous method, can it work?

for example the code is like this :

#define data 0x0378
#define control data+2

while(1){
outportb(control,seven_segment_1);
outportb(data,show_7);

outportb(control,seven_segment_2);
outportb(data,show_7);

outportb(control,seven_segment_3);
outportb(data,show_7);

outportb(control,seven_segment_4);
outportb(data,show_7);
}

show_7 means the seven segment would show number 7, the output from control register is connected into the 74138's selector.

seven_segment_1 means the output of 74138 would set logic 0 to 1st seven segment, seven_segment_2 means the output from 74138 would set logic 0 to 2nd seven segment, and so on, can the code work??
 

hi. i have a similar project, i need to make the same circuit as above for the bgc8088 but with 8 leds.
i have done the same circuit on a programm and works fine, but i would like to know what i should take care for the real creation of the circuit (size of resistors, board of the circuit etc) could you share any picture of your circuit?

p.s. i use bgc emulator so if any of you has any application that can simulate this circuit i would be gratefull.

p.s. i know this is an old post so i just hope.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…