X2 Reprogramming problems

For some reason; when I’m trying to put the orangutan X2 back in programming mode while the program is running, it goes in programming mode and then jumps out as soon as I try to progra the flash. Can someone tell me why?

Hello.

Can you give me some more information about your exact setup? Are you using AVR Studio? Can you describe exactly what happens when you try to program the flash? For example, does the yellow programming LED turn off? Does the X2 reset (i.e. do you hear it make its reset chirp)? If you are using AVR Studio, does it give you an error?

Do you observe the same thing if you try to read the device signature or if you perform a chip erase? You mention that the problem happens if you put the X2 in programming mode while the program is running. Does that mean that this doesn’t happen if the mega644 is not running your current program?

- Ben

I am using AVR Studio, and when I put it in programming mode the yellow led is on. Then when the programming command is pressed, the X2 yellow led turns off and jumps out before the new program can program it, so AVR says programming mode failed, while the X2 still runs the old program.

- Ben

Yes the same problem occurs when I try to do either one.

So it’s completely impossible for you to program your X2 right now?

When I try using the servo Orangutan Lib functions. it downloads but it stuck in an infinite loop that wont let me reprogram the microcontroller.Everytime I put it in programming mode it just jumps out when I press the program command before the program is downloading to the micro. Don’t know how I can reprogram a new program

No problem After going at it for hours. I just took out the servo control line and it stopped resetting

Can I program the X2 while the LCD is hooked up?

Yes, you can. Your programming problems are most likely being caused by your driving a servo off of your X2’s regulated Vcc. The voltage regulator on the X2 is not intended to provide high currents such as a servo might draw.

The 16 I/O pins on the right side of the board are divided into four banks of four pins each. You can select the power supplied to each bank using a solder jumper on the back of the board.

You can see the solder jumpers on the left side of the picture above. The middle pad is connected to the power line for the bank of four pins. You can jumper this pad to one of its three neighbors using a blob of solder or a tiny wire. The three jumper selections are VIN (direct connection to your battery), 5 (5 V output from the X2’s voltage regulator), and VServo (your battery’s voltage after passing through a series of diodes, which decreases the voltage by around 2 V). 5 V is useful if you are powering sensors. If you are powering servos, you want to use your battery voltage or VServo, because the 5 V line will not be able to reliably supply the current required by the servo.

Usually servos require between 4 and 6 V for operation. Anything higher can damage the internal control circuitry and anything lower will not be enough for the internal control circuitry to function. If your battery voltage falls in the range of 4 - 6 V, use a bank where you have the power coming from VIN. If your battery voltage falls in the range of 6 - 8, use a bank where you have the power coming from VServo. If your battery voltage is higher than 8 V and your servo has a 6 V limit, you will need to find another power source for your servo. The X2 can still control the servo so long as the X2 and your servo share a common ground. Does this make sense?

- Ben

Yes this makes sense. So we took out all the sensors, which was six and powered them by another voltage source and the reprograming problem has dissappeared completely. Thanks. But, so the only thing the X2 now powers directly is the two servos and of course the LCD and motors. So would I still have to jump the VServo power to the voltage of the servos? Our battery is about 7.2V with 3000mAH.

Main Question: By sharing the same ground do we have to use the ground from the battery to the ground in back of the X2 or will the ground that’s already in the I/O port work, meaning just take the positive of the servos into Vservo and leave the signal and ground in the I/O port?

Hopefully I answered this question this morning on the phone, but if anything still remains unclear about how to reconfigure your servo control and power pins to use VServo rather than 5 V, please let me know.

- Ben

The worst problem has happened. For some reason, The X2 won’t do anything. It goes into the power on position,but won’t go into programming mode, the preprogrammed buttons won’t run and the LCD screen doesn’t even light up when the X2 goes in the power on position?

Can you give me some more information? What was the last thing you did with the X2 before this problem occurred? If you reset the device, do you hear it make its usual reset chirp? If you hold the reset button down for .5 s do you hear the programming mode beep? Lastly, if you hold the reset button down for 6 seconds, do you see the red LED below the reset button turn on and stay on?

- Ben

No the chirp sound doesn’t happen when it turns on and the red led doesn’t come on after holding the reset button. Only thing happens is that the blue led comes on when you touch the power button.

No the chirp sound doesn’t happen when it turns on and the red led doesn’t come on after holding the reset button. Only thing happens is that the blue led comes on when you touch the power button.