Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Pin Assignment, Use, Conventions, Definitions, Header, Library Files — Parallax Forums

Propeller Pin Assignment, Use, Conventions, Definitions, Header, Library Files

he1957he1957 Posts: 58
edited 2009-08-18 17:35 in Propeller 1
I appreciate the design of the Propeller in that any of the 32 I/O pins can be used for any I/O purpose as designed by an implementation.· With reference to the initial pin designations of P31..P28· being "allocated" to console communications and EEPROM boot loader·respectively I'm wondering if there were any specific reasons why certain pins were "adopted" for use in the general Parallax products like Demo board or any other third party products.· Examples being P10 and P11 for sound.

WRT to the above, the Demo, Hydra and Proto·boards designate·different assignments for K/B and "free" pins to use for (say) an SD card.· Having source code to modify and make it work for anything one can connect together makes it easy and most appreciated which of course is excellent ;-)

What I'm wondering is if there is any Parallax defined "standard" or defacto standard that is or could be defined in a form of header file so there is consistency across development efforts WRT pin assignments for "common" devices.

For example, starting at P31 (as has been done) and then decrementing down to zero makes it easy to allocate some form or "priority" to certain "devices"·and then "user available" pins start at zero and increment for experimental/development or other projects.

I realise this is probably difficult because every project is potentially unique but considering if a project has a K/B, or VGA or serial interface then maybe something like this could provide some guidelines for newbies like myself.


TIA for any comments/feedback.

HarryE.

Comments

  • Agent420Agent420 Posts: 439
    edited 2009-08-18 12:44
    Because the pins are all general io, I'd guess the dictating factor is simply board layout.

    I'm not sure that having a standard pin configuration really matters...· Perhaps the best practice may be to just include pin definitions as constants that can be easily modified at a global level.
  • SRLMSRLM Posts: 5,045
    edited 2009-08-18 16:49
    If there's any standard, it's the Demo Board. Usually obex object's demo has the pins configured to use that setup (I/O pins and 5MHz clock). Otherwise, there isn't really any point to a standard as long as you make it easy to change pin numbers.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-08-18 17:17
    The major constraints are these:

    1. Programming: A30 and A31

    2. EEPROM: A28 and A29

    3. VGA video, including other digital output (e.g. PWM) using the video hardware: all pins within the same byte block.

    4. Composite video: all pins within the same nybble block and, if color is being generated, in a fixed order.

    5. Sigma-delta ADC: Non-contiguous pins for input and feedback. (I routinely ignore this, though, with little apparent consequence.)

    6. High-speed parallel input (e.g. PropCAM): Contiguous block beginning at A0.

    If you're designing a board with an expansion connector, use at least pins A0-A7 for the most flexibility.

    Apparently, there are considerations regarding timing and logical hub-to-pin "distances". But, IMO, this is a minor concern. If a design cannot accommodate such small differences, it probably needs to be rethought.

    Did I miss any?

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 8/18/2009 5:23:37 PM GMT
  • Bill HenningBill Henning Posts: 6,445
    edited 2009-08-18 17:35
    Many designs use Mouse on P24,P25 and Keyboard on P26,27 (Demo board, Serial Proto Board, USB Proto Board, Morpheus, TriBlade, and some others I think)

    PocketTerm also uses the Keyboard pins above, but not the Mouse pins.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheus & Mem+dual Prop SBC w/ 512KB kit $119.95, 2MB memory IO board kit $89.95, both kits $189.95
    www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
Sign In or Register to comment.