Extending Number I/O pins

Discussion in 'The Projects Forum' started by solexious, Nov 20, 2007.

  1. solexious

    Thread Starter Active Member

    Nov 20, 2007
    55
    0
    Hello all,

    This is my first post on the forums, I have searched for a solution to my problem and have some ideas but nothing I'm 100% sure on, here goes:

    I need to be able to send out a high signal from a pic on 19 pins, only one at a time. For this I believe a ring counter would work?

    And also I need to receive a high signal from 19 different pins, again only checking one at a time, For this I think I need a form of reverse ring counter that lets me clock what pin its looking at and check if it is high? I'm not sure what would do this.

    I could just get a pic with 38 I/O but i would like to use a smaller cheaper pic and have spare pins for other components.

    Also any example ic part numbers would be great as I find data sheets a great learning source.

    Thank you for reading and hopefully helping :)

    Solexious
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    I think you could pull this off by using a couple of different devices. One is called a parallel-to-serial converted and the companion device would be a serial-to-parallel converter. Of course you would need to use at least one additional I/O pin to clock the two devices I have mentioned.

    In the case of the serial-to-parallel converter you may need a latching buffer between the 19 parallel outputs and the 19 lines being driven. You would then need assign another I/O line to clock the latch.

    The device part numbers for CMOS are 74HC164 and 74HC165. 3 each will support 24 lines.

    By using a 74HC595 as the serial-to-parallel converter, you can forego the latch since this device has a latching function built in.

    hgmjr
     
  3. solexious

    Thread Starter Active Member

    Nov 20, 2007
    55
    0
    As I'm slightly new to electronics *rekindled from childhood* I'm slightly lost as to what your describing, I will research what you have mentioned. Just to clarify this is for the receiving part of my problem?
     
  4. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    You can go to www.datasheetarchive.com and enter the base part numbers I have indicated and you will find the manufacturer's datasheets. In the datasheets you will find truth-tables and block diagrams of the devices that can help with your understanding of the devices.

    With a little study of these datasheets, you can formulate questions and return here for clarifications from the many AAC members.

    hgmjr
     
  5. solexious

    Thread Starter Active Member

    Nov 20, 2007
    55
    0
    From reading the data sheet the 74HC164 would be used for sending out high pins? If this is correct what would be its input equivalent?

    Thank you

    Sol
     
  6. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Take a look at the datasheet for the 74HC165. That is the corresponding input device. One of these devices can monitor 8 individual input lines the state of which could be clocked into your single dedicated input pin.

    I assume you have given due thought to the fact that this scheme is going to slow down the rate at which you can detect changes on the incoming lines being monitored due to the overhead of clocking the data in serially.

    hgmjr
     
  7. mrmeval

    Distinguished Member

    Jun 30, 2006
    833
    2
    hef4794b has led drivers built in for higher current than you can get from a regular logic chip.
    http://www.nxp.com/acrobat_download/datasheets/HEF4794B_2.pdf

    This is a latching serial to parallel shift register with latching storage outputs that has a built in LED drive. The outputs can run other things they are just capable of higher current than a standard logic chip.

    I have two working with an arduino. I now have 16 outputs from 4 inputs, adding another would give me 24 outputs from four inputs. I think I can trim that to three but have not checked. I also intend to test it's stability. I'd like to see if it's possible to load up the outputs and store and latch them. Since these are latched you can clock data in to the shift register then strobe them and they instantly store the value and activate the outputs. There is no flicker or chatter which means it can be used for relays and other on/off devices. It can be run at reasonably high speed if needed.

    They should not lose what's stored until power off. It would make for nice cheap non animated signs I could program with the arduino and then leave running.
    I'd probably put "I am not a bomb" on it somewhere.

    The 74hc595 has normal logic level outputs and is a little cheaper at 57cents. I have not tried to get this to work yet but intend to just to try it. I think it has normal outputs but I don't know what a "LSTTL load" is but it can drive 15 of them.

    http://www.toshiba.com/taec/components2/Datasheet_Sync//151/397.pdf
     
  8. solexious

    Thread Starter Active Member

    Nov 20, 2007
    55
    0
    Hello both,

    Thank you for the input will read all these today. Yes, I control how fast the circuit has to send or check high pins so speed isn't a factor.

    Sol
     
  9. mrmeval

    Distinguished Member

    Jun 30, 2006
    833
    2
  10. solexious

    Thread Starter Active Member

    Nov 20, 2007
    55
    0
    I think ive got the shift out in my head now, well as much as i can till i get one to fiddle with! But i'm having problems working out how to use its backwards brother... Will keep reading till i get it.

    Sol
     
  11. solexious

    Thread Starter Active Member

    Nov 20, 2007
    55
    0
    Ok, I think I've got it. If any one else could take a look at my eagle schematic to see if I'm on the right track? Can't wait for them to arrive and play with them :)

    Sol
     
  12. solexious

    Thread Starter Active Member

    Nov 20, 2007
    55
    0
    Any one?

    Sol
     
  13. solexious

    Thread Starter Active Member

    Nov 20, 2007
    55
    0
    any one? :)

    sol
     
  14. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    I think its the .zip file that's putting folk off. Can't trust them, you know - have to use virus checkers and the like. Plus we would have to download & unzip & decide where to store them and... well... we're just too lazy ...um... I mean "busy" ... for that. Besides, not everyone uses Eagle.

    Try using Eagle's "export" utility to create a bitmap or jpeg. Folk will be much more inclined to look at your work then. Select "File" and then "Export" and then "image."
     
Loading...