Shop OBEX P1 Docs P2 Docs Learn Events
Methods to use P30, P31 after boot — Parallax Forums

Methods to use P30, P31 after boot

T ChapT Chap Posts: 4,223
edited 2008-12-07 17:56 in Propeller 1
Is there a method already posted somewhere such that if you want to use either P30, P31 as inputs after boot, so that even if the devices are outputting during programming(which would affect programming), the device(s) are muted until after boot?

There are no pins to be used as relay or digital switches. The only idea I have is to use the pins 30,31 to affect a latch or switch to route the other devices to the pins.

Thanks

Post Edited (TChapman) : 12/4/2008 8:20:56 PM GMT

Comments

  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-12-05 17:32
    That sounds like an idea... You could maybe use pin 30 or 31 as an output, to toggle a latch that would connect the device to the pins, then switch the pins to inputs immediately after. Anyone see a problem with this?
  • T ChapT Chap Posts: 4,223
    edited 2008-12-05 17:41
    I just considered that the I2C lines are in tact for other I2C roles after boot, so the simplest method may be an I2C managed switch on the Tx and Rx pins.
  • Jeff MartinJeff Martin Posts: 758
    edited 2008-12-05 17:45
    Is it possible for those devices to be reset (or pay attention to the reset line) of the Propeller chip? That way they know to back off with a hardware reset occurs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Jeff Martin

    · Sr. Software Engineer
    · Parallax, Inc.
  • BaggersBaggers Posts: 3,019
    edited 2008-12-05 18:55
    Hey, Jeff, quick question for you on that.
    What would happen when you do a write to $0004, performing a reset. how would that inform the devices attached to the prop that it's been reset?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-12-05 19:37
    as you can read in the manual

    When the bootprocess has finished P30 adn P31 are general IO-Pins like ANY other IO-PIN

    f.e. you can use them as a serial connection to a PC-Terminal-software

    best regards

    Stefan
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-12-05 21:48
    My guess for what Jeff was thinking is that the external device has a reset or enable. That reset or enable is attached to the Propeller reset line. Maybe an resistor/capacitor network could be setup so that when the Propeller resets via a hardware reset that the external device takes a while to wake up. The RC network would have to be set for the amount of time it takes for the Prop to program.

    The problem here may be if there is a software reset for some reason where you would also want the external hardware device to get out of the way. Is that what you are getting at Baggers?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
    www.tdswieter.com
  • BaggersBaggers Posts: 3,019
    edited 2008-12-06 00:15
    Yes, exactly Timothy.
    eg, an example, you have a program that loads other stuff, but then you need the initial program to run again by performing a reset. but you're external devices are currently listening or writing to those pins.
    does that reset just reload the ram from eeprom, or does it check comms first?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • Jeff MartinJeff Martin Posts: 758
    edited 2008-12-06 14:43
    Baggers said...
    Hey, Jeff, quick question for you on that.
    What would happen when you do a write to $0004, performing a reset. how would that inform the devices attached to the prop that it's been reset?
    The software-based reset (Propeller executing a Spin REBOOT command, or writing a 1 to bit 7 of the CLK Register (BYTE[noparse][[/noparse]4]) causes all the same hardware-based power-up/reset delays as well as the boot-up processes to run, just as if the Propeller had been reset via the RESn pin or a power cycle.· So it does boot up with the boot loader, checks for a host, then for an EEPROM.

    I believe (though haven't tested it myself) that the RESn pin actually goes low as well (so an outside device can tell if a reset occurred if it were monitoring that pin). This happens·if, and only if, the BOEn line is held low.· When BOEn is low, RESn becomes a weak output·of Vdd through 5 K ohms.·· See page 15, BOEn and RESn description, in the manual.

    I'm unable to test that myself at the moment... anyone willing to take the time to do so and report here?
    Timothy said...
    My guess for what Jeff was thinking is that the external device has a reset or enable...
    Exactly, Timothy, that's what I was getting at.· Thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Jeff Martin

    · Sr. Software Engineer
    · Parallax, Inc.

    Post Edited (Jeff Martin (Parallax)) : 12/6/2008 2:48:30 PM GMT
  • BaggersBaggers Posts: 3,019
    edited 2008-12-06 18:53
    Cool, Thanks for the info Jeff, wasn't sure if it'd set the RESn pin [noparse]:)[/noparse] Chip thinks of everything as always [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • Jeff MartinJeff Martin Posts: 758
    edited 2008-12-06 21:27
    Baggers said...
    Chip thinks of everything as always [noparse]:)[/noparse]
    Agreed.· It's always a challenge for me to think of something he hasn't already considered. [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Jeff Martin

    · Sr. Software Engineer
    · Parallax, Inc.
  • BaggersBaggers Posts: 3,019
    edited 2008-12-06 23:01
    lol, yup it certainly is [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • M. K. BorriM. K. Borri Posts: 279
    edited 2008-12-07 10:55
    What we ended up doing with our autonomous boat was having a small micro (picaxe8) count down from a few seconds after start and use a 74157 to switch over pins 28-29-30-31. Very stupid solution but it has worked for about a year now ^_^;;;; best I can think of.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://forums.parallax.com/showthread.php?p=650217

    meow, i have my own topic now? (sorta)
  • T ChapT Chap Posts: 4,223
    edited 2008-12-07 17:56
    M. K. Borri said...
    What we ended up doing with our autonomous boat was having a small micro (picaxe8) count down from a few seconds after start and use a 74157 to switch over pins 28-29-30-31. Very stupid solution but it has worked for about a year now ^_^;;;; best I can think of.

    I like that idea, I will probably try to lose the pic(or other micro) and substitute a latch which gets set by an AND gate fed by two Prop pins. On reset/boot/program, the reset pin resets the latch(hopefully in time for data to flow on the programming pins), when the programming is done or reboot finished, the two Prop pins set the latch and then are free do whatever else they want.
Sign In or Register to comment.