Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Demultiplexer

Status
Not open for further replies.
It is the same as 74AC573. When G is enable the data output follows the data input. That will not suit the application. The data need to be store somewhere in the IC, and only output when we control. So, we have IC 1 store the data, its recent output is all Low; the same for all other ICs. Only when we send "enable" then all of them output their private data at the same time.

The octal latch seems not to have this capability.
 
hi Nobita,
You are not taking the trouble to read the datasheets correctly or the drawings I have posted.

Good Luck.
 
hi Nobita,
Lets give it one more try.

Refer and study attached drawing.

The 'NOR' gates can be replaced with simple invertors, Ive used NOR's to give an extra option in your control lines.

Ask me specific questions if you don't understand.
 
Last edited:
Yes, I got the idea !

According to the drawing, I don't think only 8 pins of parallel port is enough for controlling. Example: Enable output, Enable selected latch, etc., while all these 8 pins of the port are also needed for the input data ?
 
hi,
Look at the printer port pin allocation and you will see that there are more than 8 ouput pins.

From memory there are 4 more output pins and 4 input pins.

I will search my data base an attach as an EDIT.

Done: Please read.
 
Last edited:
hi Nobtiba,
If you require more than 12 output pins?

If the PC has a spare pcb slot, you could install a single/dual parallel port pcb.
Use the 0x2F8 address group for control??
 
Hi Eric,

I am going to make progress with your great help ! Now I understand more about how my circuit should look like.
I think 12 outputs on parallel port could be enough. I am trying to use 4 control pins (1,14,16,17). It seems not very hard in theory. I can output data on D0-D7 with address: 0x378, so the address for control port is: 0x37A.

I use either following commands:


asm mov dx, 0x37A
asm mov ax, 15 //set 3 bits low, 1 high in control port
asm out dx, ax

or

outportb(CONTROL, inportb(CONTROL) & 0xDF); /* Reset Control Port - Make sure Forward Direction */

outportb(CONTROL, inportb(CONTROL) | 0x08); /* Set Select Printer (Register Select) */

outportb(CONTROL,inportb(CONTROL) | 0x01); // Set Strobe (Enable)
outportb(CONTROL,inportb(CONTROL) & 0xFE); // Reset Strobe (Enable)

but see no change in output voltage. Even the program get no error.
I am finding a free software which allow to control these control bits to make sure the software is all right but can only find Lalim software untill now. This software only effect on 8 data pins not 4 control pins.

Trying to get out from this stuck !!!
 
hi,
To remind you, just in case.
If you are using Win XP then you require a *.dll in your Windows/System directory. The dll I use is 'inpout32.dll' from the web.

Also make sure your BIOS settings for the parallel port are set correctly,
look at the file ref the port, I uploaded yesterday.

Do you have Visual Basic 5 and the VB runtime files in your PC??

The /STROBE and /BUSY outputs are inverted, allow for this in your program. [or fit invertors]
 
Last edited:
I downloaded inpout32.dll, checked the setting in BIOS: the addr: 0378, MODE: SPP (Standard Parallel Port). So it should allow me to control the control pins. Unfortunately, i still can not change the level of the port.
I don't have VB on my PC. I am using Turbo C.

For safety reason, I compile C on PC1 then test the program with the hardware in PC2. Both PCs use WindowsXp and same configuration. It is funny that, the executable file (*.exe) I ran on PC1 can not run on PC2, it open the command windows but not receive any input from the keyboard !!?
This did not happen before and it is also an obstacle for me to test the software and hardware today :(
Dont know what happen to my PC2.
 
hi,
Does PC1 have Turbo runtime files, to suit the '*.exe' that PC2 dosnt???

As may know some *.exe rely on resident runtime files/dll's in order to work??
 
I think I will use 74FCT374A instead of 373 or 573 because these two will only store data when EL input is H but change when EL input is Low, so if I use them with ls138 I will need to add NOT or NOR. It will be ok with 374, so I can reduce the number of ICs used.
 
OK,
Remember that the 374 is a 'clock' and any data on the input lines must be present while the 'clock' [select chip] line is low and the data will be latched and appear on the ouputs when the clock goes high.

Did you sort out the PC1/2 port control problem??
 
Not yet. I still get stuck there. I may have to spend more time looking around or try on another PC (PC3) :(

May be I will go to buy component on this weekend, so I have to care about what IC to use. So 374 is also suitable and it only output the stored data when the OE is enable right ?
 
>> So 374 is also suitable and it only output the stored data when the OE is enable right ?

Yes, the 374 is a Tri-State output device, without 'OE' the outputs are 'floating'

Why dont you construct a small part of the system before spending all your money. Make sure its going to give you what you expect?

IIRC you can now download from MS, a free copy of VB, the reason for talking VB, is I maybe able to send you some sample code for the port.
 
That is a good idea, Eric! I will try with small part of the system, just enough for testing. And I had VB on my PC now.
 
Hi Eric
I bought the following ICs : P74FCT374ATP (x3) and 1 more 74ls138. The circuit is done. I will check it ASAP but I want to use strobe(1) and print select(17) pin of parallel port as well. Could you give me your example code for check please !
 
hi nobtiba,

Attached zipped, 'port2.exe' file for Windows.

Its a modified version of my main port control program.
Ive taken all the frills out. It does all you require for your test.

Dont forget the inpout32.dll in the system directory

Try it and let me know.
 
Last edited:
The program work so well !! It is great. I controll all the port with no error! (I have to download dllport.dll into windows\system32). From this, can come to the conclusion that the code I wrote in C and asm have some problems, that is why I can not control the control bits.
 
I tested the small part of the circuit and it worked as expected. So I am going to extend and make PCB. One more week I will get the PCB board. In the time of waiting I will write the code to control. Just finish all the flow chart for it, but still failure to control the control bits by the code of my self. Hopefull could solve this problem quickly.
 
Hi,
If it will help, post your assembler code, in full, I will have a look.
Pleased to hear the VB.exe is working OK.

I dont use a C' compiler.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top