Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 11, 2016, 07:01:59 07:01


Login with username, password and session length


Pages: [1]
Print
Author Topic: Customize the quantity of ports  (Read 1133 times)
0 Members and 1 Guest are viewing this topic.
dragoncool
Guest
« on: April 17, 2008, 05:37:49 17: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, 06:29:19 18:29 »

use a 16-channel multiplexer such as 74HC4067.
Logged
dragoncool
Guest
« Reply #2 on: April 17, 2008, 07:34:42 19: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
Junior Member
**
Offline Offline

Posts: 96

Thank You
-Given: 13
-Receive: 18


« Reply #3 on: April 18, 2008, 08:26:57 08: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, 07:16:09 19:16 »

Other wat to use shift register
Logged
CyrenuS
Guest
« Reply #5 on: May 02, 2008, 11:54:01 11: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
V.I.P
Active Member
*****
Offline Offline

Posts: 221

Thank You
-Given: 23
-Receive: 63


« Reply #6 on: May 05, 2008, 12:06:12 00: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