Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 28, 2024, 08:55:47 20:55


Login with username, password and session length


Pages: [1]
Print
Author Topic: Customize the quantity of ports  (Read 3129 times)
0 Members and 1 Guest are viewing this topic.
dragoncool
Guest
« on: April 17, 2008, 04:37:49 16:37 »

Hi guys,

I know that I studied in the university about this, but I can't remember now.
I need to collect more than 10 values in the ports, but I have just 8 ports avaliable!
Could some one explain how I can customize it?

thanks,
Joao
Logged
dreamwithin
Guest
« Reply #1 on: April 17, 2008, 05:29:19 17:29 »

use a 16-channel multiplexer such as 74HC4067.
Logged
dragoncool
Guest
« Reply #2 on: April 17, 2008, 06:34:42 18:34 »

Hi,

Do you know how much costs this device?

And, it's possible just using the PIC? I not sure, but I believe that was making a multiplexer inside of the pic, but I can't remenber how....


Thanks,
Joao
Logged
bogdantk
Active Member
***
Offline Offline

Posts: 100

Thank You
-Given: 40
-Receive: 18


« Reply #3 on: April 18, 2008, 07:26:57 07:26 »

Hello
I had the same problem and the best way was to put 4 USB hubs with 4 ports each and USB to RS232 adapters.
Much more cheaper than a port extender, more flexible and easy to upgrade. The converter driver will create virtual
COMs ready to be use by any application.
Logged
goaman1
Guest
« Reply #4 on: April 26, 2008, 06:16:09 18:16 »

Other wat to use shift register
Logged
CyrenuS
Guest
« Reply #5 on: May 02, 2008, 10:54:01 10:54 »

if i understand correct;
Use 74HC573(D flip-flop) and any of Encoder(ex. 3 to 8 ) for common.
74HC573 for parallel bus
74HC138 8pin output use 3pins
74HC148 3pins input for 8 different device
Logged
TomJackson69
Active Member
***
Offline Offline

Posts: 218

Thank You
-Given: 26
-Receive: 63


« Reply #6 on: May 04, 2008, 11:06:12 23:06 »

Hi guys,

I know that I studied in the university about this, but I can't remember now.
I need to collect more than 10 values in the ports, but I have just 8 ports avaliable!
Could some one explain how I can customize it?

thanks,
Joao

Hi,

If you could be more specific address what your problem is; maybe someone could help you. Since you are in PIC C than I would assume that you are talking about PIC uC. You said you need to collect more than 10 value in the ports but you have only 8 ports available. well, I think you are talking about the PIC port.

In the case of PIC port:
If you need more than 8 bits than use two ports (ex. RB and RC) for 16 bits. You would read each port and save the value in to each variable. One is LOW byte and other is HI byte. Now you have 16 bits variable and how to use is your.

If you have only one port available then you could use TWO 74HC541 (or three, or more), depend on how many bit you want. Let say you only want 16 bits than use two 74HC541, connect the Ys side to the port of PIC. use two othe pins to clock in the data.

Connect pin 1 & 19 of HC541 together, this is active low clk.
To read the data, select one of the HC541 by pull LOW on pin 1&19. Read port and save to a variable. Set HI on pin 1&19 to bring the output of HC541 to hi-Z. Now do the same to the other HC541. After two read you have two bytes of 8 bits.

True state for 74HC541:

G1    G2    A    y
L      L      L     L
L      L      H     H
H     x       x     Z    (Hi Z if any of the G high)
x     H       x     Z

Read the data sheet for more detail.

This is how I do when I want more port for input and output when I run out of pin on the PIC. You may want to use 74HC374 for bi-direction and latch if your application needs (I used for output)

Hope this help,

Tom
Logged

Con Rong Chau Tien
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC