Shop OBEX P1 Docs P2 Docs Learn Events
Pins 28-31 - Special and General Purpose - need clarification — Parallax Forums

Pins 28-31 - Special and General Purpose - need clarification

ALIBEALIBE Posts: 299
edited 2007-03-05 18:28 in Propeller 1
I need some clarification (probably a dumb ?n) on the following special pins below:
The manual says that these special purpose upon boot/power up/reset and there after they are general pupose.
·P28 - I2C SCL connection to optional, external EEPROM.
·P29 - I2C SDA connection to optional, external EEPROM.
·P30 - Serial Tx to host.
·P31 - Serial Rx from host.

I'd like to use these pins as/for general purpose devices. From a wiring perspective how does one use these pins. Can the devices be connected just like other regular pins. Or, is there special guidance to hooking up devices to these pins.

I tried connecting DS1620 to these pins - however, I see a wierd behavior w/ the readings, so I ended up moving it to other pins.
thanks in advance


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"any small object, accidentally dropped, goes and hides behind a larger object."

·
ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot
http://ALIBE.crosscity.com/
·

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-03-05 17:54
    You can connect other I2C devices to pins P28/29, but there's no pullup resistor on P28 and most I2C drivers won't work without a pullup resistor. You can either modify the driver or add a pullup. 4.7K to 10K will normally work. You could use these pins for other purposes as long as whatever device you attach can function in the presence of I2C signalling and vice-versa. For example, maybe you have a chip select line elsewhere and you need one more data line. You could use P29 since the EEPROM won't respond if there's no SCL signal and your device won't respond if there's no chip select.

    You could use P30/31 as long as your device can tolerate the Propeller transmitting a little on P30 after reset and your device won't fiddle with P31 until the boot sequence is over. If you're using a permanently wired MAX232 or USB-serial adapter, P31 will be driven by the serial port and you may not be able to use it without some external logic to select a different signal.
  • ALIBEALIBE Posts: 299
    edited 2007-03-05 18:13
    thanks Mike - as always.

    a couple of more beginner's ?s:
    1. What is a chip select. Is it a way by which we can control which device is electronically plugged into pins. Sort of like a "Video Input Selector" that we have in our home theatre Receivers? (that must be the most basic ?n of the year thus far)
    2. do these pins go into Special purpose mode when calling ::Reboot() or only when power up/reset.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "any small object, accidentally dropped, goes and hides behind a larger object."

    ·
    ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot
    http://ALIBE.crosscity.com/
    ·
  • CJCJ Posts: 470
    edited 2007-03-05 18:18
    1. think of chip select as a line to get the attention of the chip it's tied to, used alot for spi devices so they can share data and clock lines

    2. they are normal I/O pins, they just are used in the boot up/programming sequence

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Parallax Forums - If you're ready to learn, we're ready to help.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-03-05 18:21
    1) For example, chips that use the SPI conventions use a 3 or 4 pin connection: clock, data input, data output, chip select.
    For some chips, the data input and data output are never active at the same time and can be connected together. The
    clock and data lines are inactive unless the chip select pin is low (or sometimes high - depends on the chip). Look at the
    datasheet and examples on Parallax's webstore for the HM55B compass. It uses SPI.
    2) Reboot is functionally the same as a reset/power up. These pins behave the same either way.
  • ALIBEALIBE Posts: 299
    edited 2007-03-05 18:28
    ahhh - ok the chip select is clear in my mind now - I have seen and used these in DS1620, the hm55b compass, Nokia LCD 6610 (currently working on), and many more - I could have related the two and should have known
    [noparse]:)[/noparse]

    thanks for the explanation Mike, CJ.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "any small object, accidentally dropped, goes and hides behind a larger object."

    ·
    ALIBE - Artificial LIfe BEing. In search of building autonoumous land robot
    http://ALIBE.crosscity.com/
    ·
Sign In or Register to comment.