PDA

View Full Version : Making my own reset circuit


zboot
04-12-07, 07:56 PM
I've got a tini2131 and the BB adapter. Currently, I need to have the reset pin pulled high in order for code to execute. However, reading through the getting started guide, I get the impression that I should not need to externally pull that pin high.

Today, I found some micro SPST push button switches that can be used on the BB. I attempted to use a 10K resistor to pull reset up to +5V, however this did not work. I also tried with a 1K ohm resistor and then 4 1K resistors (they're the smallest I have) to no effect.

Any ideas as to what's wrong?

nmitech
04-13-07, 09:44 AM
On Tini2131/38 controller, the reset pull-up resistor, R2 is Located between pin 1(SOUT) & 2(SIN) of the top row . Where the Reset is on the third pin of the bottom row. I guess you used the wrong pin .

zboot
04-13-07, 11:03 AM
On Tini2131/38 controller, the reset pull-up resistor, R2 is Located between pin 1(SOUT) & 2(SIN) of the top row . Where the Reset is on the third pin of the bottom row. I guess you used the wrong pin .

I'm sorry but I don't quite follow what you just said.

Pin 5 of J1 is ATN' which the quick start guide says is the alternative reset via DTR from host.

Pin 6 of J1 is RESET' which the quick start guide says in the target reset signal.

Should I be using ATN' or RESET'. What is the difference between those two pins?

nmitech
04-13-07, 11:52 AM
What i meant by pin 1, 2, and 3 on my previous post , i was refered to top row pins and bottom row pins, not by the connector pins reference designator. Sorry for the confusion.

Let's go by the document, J1 Pin 5 is ATN' and pin 6 is RESET' .


Should I be using ATN' or RESET'.
You need to connect RESET pin 6 to one side of your push button switch and the other side of the switch to ground.

What is the difference between those two pins?
The CPU can be reset by toggling the RS-232 DTR signal via Terminal program when you connect the ATN' to RS-232 DTR signal. This is an alternative way to reset the cpu without look for the reset button onboard. It is more common now to see many application programs such as phillips flash utility, or Basic Stamp serial loader program also support this feature.

zboot
04-13-07, 12:05 PM
Should I be using ATN' or RESET'.
You need to connect RESET pin 6 to one side of your push button switch and the other side of the switch to ground.


Ok - that is what I tried to do. However, if I don't connect RESET directly to VCC (+5V), the 2131 never executes code after I supply power to the input pin. I tried using resistors between RESET and +5V without success.

Dave
04-13-07, 01:28 PM
The Tini2131 is a 3.3 volt part, not a 5 volt part. It can read 5 volt signals, but generally only 3.3 volt levels are needed. There should be no need for a pull up to 5 volts on the reset line, unless there is something on the board being used that is pulling it down. The Tini2131 is normally reset by connecting the RESET pin to ground, with a small SPST switch as NMITech has suggested. What is the Tini2131 and BB Adaptor plugged in to, that possibly has some type of pull down on the RESET pin?

The Tini2131 has a small pull up already, as shown on the schematic (http://www.newmicros.com/store/product_schematics_pdf/Tini2131_Sch.pdf) . The ATN line, if tied high, might block communications.

It is also possible that the momentary reset switch used is actually normally closed, rather than normally open. In this case it is what is pulling the device down, and only allowing pull up when forced high. This could be tested by checking continuity with the switch unpressed, and pressed.

zboot
04-13-07, 05:11 PM
The Tini2131 is a 3.3 volt part, not a 5 volt part. It can read 5 volt signals, but generally only 3.3 volt levels are needed. There should be no need for a pull up to 5 volts on the reset line, unless there is something on the board being used that is pulling it down. The Tini2131 is normally reset by connecting the RESET pin to ground, with a small SPST switch as NMITech has suggested. What is the Tini2131 and BB Adaptor plugged in to, that possibly has some type of pull down on the RESET pin?

The Tini2131 has a small pull up already, as shown on the schematic (http://www.newmicros.com/store/product_schematics_pdf/Tini2131_Sch.pdf) . The ATN line, if tied high, might block communications.

It is also possible that the momentary reset switch used is actually normally closed, rather than normally open. In this case it is what is pulling the device down, and only allowing pull up when forced high. This could be tested by checking continuity with the switch unpressed, and pressed.


Ok.

When I first got the 2131 and BB adapter, I created a serial cable to program it. Using the serial cable prior to mating the 2131 to the BB adapter was successful for programming it and running programs.

Once I mated the 21131 to the BB adapter and breadboarded it, I was able to program the board but could not execute programs. I was only able to execute code when I connected the RESET' pin to Vcc.

Yesterday, I bought the micro-switches and attempted to use it to implement a reset button (because I got tired of toggling power from the batteries just so I could reset the damn thing when I needed to reprogram it - and so I could have a push-button method of starting the bootloader upon reset).

I'm currently stuck in an airport on route to the competition (see more here about the robot and stuff. . . (http://kamakula.blogspot.com) so I won't get to play around with this until tonight.

I'm going to try things in this order:

1) Disconnect 2131 from BB adapter and see if serial cable is able to reset, program, and execute code after program.
2) See if I can trace RESET' pin to see pull-up resistor is connected.

Let me ask this question.

Assume I've breadboarded the 2131. I apply power via the Vin and Vss pins. No other pins are connected. At this point, shouldn't the board start executing code without me doing anything?

That is what I expect to happen - which never has before.

nmitech
04-15-07, 09:12 AM
When I first got the 2131 and BB adapter, I created a serial cable to program it. Using the serial cable prior to mating the 2131 to the BB adapter was successful for programming it and running programs.

At this point, it sounds like the BB adapter or/and the Breadboard circuits problem.


Once I mated the 21131 to the BB adapter and breadboarded it, I was able to program the board but could not execute programs. I was only able to execute code when I connected the RESET' pin to Vcc.

Did you remove the jumper/wire on P0.14 pin to ground after flashed your program ? Besure nothing is held port pin P0.14 low by some sorts of circuit you added on the breadboard??? How did you execute your program, by recycle (unplug/plug) the power or by reset button? If by reset button, how did you connect the reset button , on what pin to what. Please specify? Thanks!

zboot
04-16-07, 03:53 PM
Did you remove the jumper/wire on P0.14 pin to ground after flashed your program ? Besure nothing is held port pin P0.14 low by some sorts of circuit you added on the breadboard???

Yes - before, I was using a wire that I disconnected from ground. Now, I have a momentary pushbutton that I use to short P0.14 to ground when I reset the board.


How did you execute your program, by recycle (unplug/plug) the power or by reset button?
If by reset button, how did you connect the reset button , on what pin to what. Please specify? Thanks!
I've sort of stumbled upon a fix for my problem. Prior to this, I would reset the board by power cycling it and I had the RESET' pin shorted to +5V (as described earlier). On Saturday, while I was testing pwm, I accidentally shorted some pins on the J2 connector and suddenly the board started working correctly.

By correctly, I mean that I no longer have RESET' shorted to Vcc and having a pushbutton that shorts RESET' to ground actually causes the board to reset program execution.

Sometimes, the board exits that state and returns to the previous weird one. However, I can always get it to work properly by shorting a couple pins on J2. I haven't yet determined the exact pins that I need to short to get the board working properly. The next time I need to go through that process, I'll be a little more systematic and see if I can determine that for you.