Shop OBEX P1 Docs P2 Docs Learn Events
How much can i do with 40 pins! — Parallax Forums

How much can i do with 40 pins!

theanthean Posts: 19
edited 2011-02-08 21:12 in Propeller 1
Hi,

I am new to electronics (one day perhaps I won't need to write this intro at the beginning of every post).

Not sure if this question has been asked before, i did a quick search and did not see anything.

I am starting a project with the propelller chip on the education board. Already used pins p16-29 for the LCD. So now I have Pins P0-15 and P30-31 (18 IO pins) available.

I still need to drive 7 devices each with 3 control lines and one ground. I guess i don't have to worry about the GND line as it does not eat up my budget of available IO pins, but that still requires 21 pins if i simply connect one line to each pin. Also I want to reserve a few pins to add features like wireless communication with another propeller chip.

What are my possibilities here? Please help... And please make your answer as dummy proof as possible, :-)

Thanks in advance.

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2011-02-08 18:18
    Please download and read the Propeller data sheet, and the manual.

    The Propeller DIP40 chip has 40 pins, but only 32 are I/O pins - the rest are used for power, ground, reset and brown out enable.

    If the devices are not high speed, you could use an I/O expander such as the MCP23S17 to get 16 more I/O lines.
    thean wrote: »
    Hi,

    I am new to electronics (one day perhaps I won't need to write this intro at the beginning of every post).

    Not sure if this question has been asked before, i did a quick search and did not see anything.

    I am starting a project with the propelller chip on the education board. Already used pins p16-29 for the LCD. So now I have Pins P0-15 and P30-31 (18 IO pins) available.

    I still need to drive 7 devices each with 3 control lines and one ground. I guess i don't have to worry about the GND line as it does not eat up my budget of available IO pins, but that still requires 21 pins if i simply connect one line to each pin. Also I want to reserve a few pins to add features like wireless communication with another propeller chip.

    What are my possibilities here? Please help... And please make your answer as dummy proof as possible, :-)

    Thanks in advance.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-02-08 18:47
    First thing I'd consider is switching to a serial LCD.

    Parallax sells a few varieties of these..
    http://www.parallax.com/tabid/768/txtSearch/serial+lcd/List/0/SortField/4/Default.aspx

    OBC
  • Martin_HMartin_H Posts: 4,051
    edited 2011-02-08 19:08
    Besides a serial LCD a serial servo or motor controller can provide access to many servos or motors with one pin. Chaining sensors in an I2C bus saves pins as well. This is because all the sensors are addressed with the same two pins, but messages are targeted to them using device ID's.
  • TtailspinTtailspin Posts: 1,326
    edited 2011-02-08 19:09
    I still need to drive 7 devices each with 3 control lines and one ground.
    What are the 7 devices that You need?

    Some devices work well on a bus, and would only need 3 or 4 pins for the 7 or more devices...:nerd:

    Do be carefull about using all of the pin's,...as someone wise once said, "It's a MicroController, NOT a Power Supply.." :smile:
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-02-08 19:39
    Are your devices analog or digital?

    If digital, you can expand using a variety of 74HCxx chips. I use one 74HC138 and up to eight 74HC374 chips to expand 12 propeller pins to up to 64 digital outputs. There are other options too, eg the 74HC595 can convert 3 propeller pins to 8 outputs, and you can daisy chain them one after the other. So you could have any number of outputs using only three propeller pins.

    Those outputs can drive leds, Or if you want to drive relays and motors and things, there are chips like the ULN2003.

    There are many options. Sometimes you change your mind and want to add more pins later. What is your project?
  • theanthean Posts: 19
    edited 2011-02-08 20:05
    If i understand correctly, the serial LCD's on the site are all character based, and no touch. I need graphical touch screen unfortunately!
  • theanthean Posts: 19
    edited 2011-02-08 21:12
    Thanks Dr_Acula,
    The 7 devices are digital - each device has a membrane switch, a row of bi-color LEDs, hence 3 control lines. I am building a target practice device, :-) - would like to add communication to some sort of sensor to detect distance and movement of the user.

    I will do some research on the chips you mentioned in your reply - looks like they will do the trick. Thanks again!
    Dr_Acula wrote: »
    Are your devices analog or digital?

    If digital, you can expand using a variety of 74HCxx chips. I use one 74HC138 and up to eight 74HC374 chips to expand 12 propeller pins to up to 64 digital outputs. There are other options too, eg the 74HC595 can convert 3 propeller pins to 8 outputs, and you can daisy chain them one after the other. So you could have any number of outputs using only three propeller pins.

    Those outputs can drive leds, Or if you want to drive relays and motors and things, there are chips like the ULN2003.

    There are many options. Sometimes you change your mind and want to add more pins later. What is your project?
Sign In or Register to comment.