FEZ Spider: possible to pull pin low during bootup?

Hello,

I’m working on a machine which uses a FEZ Spider to control a motor.
The motor speed is controlled directly with an analog signal via the AOUT (Socket 9, Pin 5) on the Spider.

I only want the motor to move when I tell it to move. Thus, one of the first things I do in my program is to pull the AOUT low (under 50mV). Later in the program, when I need the motor to move, I tell AOUT to output at anywhere from 60mV to 3.3V, depending on a user-selected speed.

Problem: During bootup (powering up the Spider, sequence before the actual program starts) the AOUT pin outputs a steady 2.2V, causing the motor to spin. I don’t want the motor to spin during bootup.

Attempted Solutions:

  1. I moved the command to pull AOUT low closer to the beginning of the program. (This helped a little bit.)
  2. The motor has an enable/disable input (controlled in the 5V to 24V range). Using an opto-isolator, I used one of the Spider’s general IO pins (IO6, to be specific) to send a 12V signal to the disable input on the motor. Assuming that the Spider’s pins are defaulted to pull HIGH, I hoped that this would eliminate the spinning during bootup. Unfortunately the signal from IO6 during bootup (.9V) isn’t enough to trigger the 12V disable signal. This attempt did cut a little spin-time though, because when the program starts, IO6 is pulled fully to 3.3V and thus the motor is disabled.

The only way I can think of to prevent AOUT from sending an uncontrolled analog signal to the motor during bootup is to somehow modify the bootloader to tell the Spider to pull AOUT low during boot.

  1. Is modifying the bootloader/boot-sequence possible?
  2. If yes, how could modify it to achieve my goal?

TL;DR
Motor spinning during bootup. Don’t want this. Can I modify bootloader to pull AOUT low during bootup?

Welcome to the forum

you can’t control pin behaviour before your program code executes. That type of function is actually a function of the chip itself, not anything “higher” in the stack. The only way to influence this is in hardware - use pull up or down resistors. In your case, I’d investigate a pullup on the enable line which is simple to then drive it actively to low to enable the motor.