2
\$\begingroup\$

I'm trying to make a simpler approach to flash LPC1114 MCU.

If the MCU is reset while pin1.1 is held low it enters bootloader mode. I'm using a simple arduino sketch to drive reset & 1.1 pins via serial line.

It was pretty simple with reset:

schematic

simulate this circuit – Schematic created using CircuitLab

I've just replaced my button with a transistor and it did the trick.

Now, with 1.1 pin I have the following setup:

schematic

simulate this circuit

i.e. by default it's not connected to anything, on button press it's pulled down. Well, replacing the button with transistor doesn't seem to work.

Any hints on how to fix that?

\$\endgroup\$
  • \$\begingroup\$ Please edit your post, press Control-M to enter the site's schematic editor, then make a schematic of what you are describing. Thanks. \$\endgroup\$ – Anindo Ghosh Sep 13 '13 at 14:52
  • \$\begingroup\$ Thanks for the comment, didn't know about the editor. \$\endgroup\$ – Farcaller Sep 13 '13 at 15:15
2
\$\begingroup\$

Any hints on how to fix that?

A circuit would help instead of text diagrams but to answer your question, try putting the 10k resistor in the collector of the transistor not the emitter; emitter to ground like the reset pin circuit, base as per reset pin circuit.

You may be able to confirm my suspicions if you can tell what your base drive circuit looks like.

EDIT following disclosure of circuit

If you swapped the positions of R1 and SW1 in your second diagram, the pushbutton circuit would still operate as normal BUT, significantly for the BJT this is a different ball-park; the BJT will switch on and drag the 10k down to ground.

Previously, when you tried the BJT in the original switch position you'd apply 3.3V to the base and approximately 2.7 volts would appear across the 10k resistor - this is because the base and emitter region act like a forward biased diode - even without collector current, the emitter voltage would be raised to 2.7V or thereabouts.

\$\endgroup\$
  • \$\begingroup\$ Added the circuit. \$\endgroup\$ – Farcaller Sep 13 '13 at 15:15
  • \$\begingroup\$ @Farcaller yup as I suspected - see my edit to confirm this. Easy fix (or should be!!!) \$\endgroup\$ – Andy aka Sep 13 '13 at 16:08
0
\$\begingroup\$

Don't know the details of Arduino timing requirements, but can see two possible causes of your problem:

1) you are not pulling Pin 1.1 low enough. Making sure the resistor is connected to the collector of your NPN BJT (not the emitter) might work. Next step I would try would be to make that 10K resistor a 2K. If that did not work (it should) then the next step would be to replace the NPN with an N-channel MOSFET, and keep the 2K on the high side (between pin 1.1 and the MOSFET).

2) There might be a timing problem: in that Pin 1.1 is not already low when the reset goes low. You should be able to get something on the order of a 10uS delay by tying the base of the reset circuitry's NPN to ground with a 100nF (0.1uF) cap. (Put a 100K Ohm resister in parallel with the cap to ensure it discharges all the way to zero in between resets.)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.