External programming does not honor the protection bits, I don't think - it's keeping the device from self-programming the bootloader.  RESET pin is the one that sometimes gets +12V.<div><br></div><div>(Disclaimer: I don't do Arduino, I just read datasheets.)</div>

<div><br></div><div><a href="http://www.atmel.com/Images/doc8271.pdf">http://www.atmel.com/Images/doc8271.pdf</a>
</div><div><br></div><div>Snippet:</div><div><div>28.7 Parallel Programming</div><div>28.7.1 Enter Programming Mode</div><div>The following algorithm puts the device in Parallel (High-voltage) Programming mode:</div><div>

1. Set Prog_enable pins listed in Table 28-14 on page 304 to “0000”, RESET pin to 0V and</div><div>VCC to 0V.</div><div>2. Apply 4.5 - 5.5V between VCC and GND.</div><div>Ensure that VCC reaches at least 1.8V within the next 20 ìs.</div>

<div>3. Wait 20 - 60 ìs, and apply 11.5 - 12.5V to RESET.</div><div>4. Keep the Prog_enable pins unchanged for at least 10ìs after the High-voltage has been</div><div>applied to ensure the Prog_enable Signature has been latched.</div>

<div>5. Wait at least 300 ìs before giving any parallel programming commands.</div><div>6. Exit Programming mode by power the device down or by bringing RESET pin to 0V.</div><div>If the rise time of the VCC is unable to fulfill the requirements listed above, the following alternative</div>

<div>algorithm can be used.</div><div>1. Set Prog_enable pins listed in Table 28-14 on page 304 to “0000”, RESET pin to 0V and</div><div>VCC to 0V.</div><div>2. Apply 4.5 - 5.5V between VCC and GND.</div><div>3. Monitor VCC, and as soon as VCC reaches 0.9 - 1.1V, apply 11.5 - 12.5V to RESET.</div>

<div>4. Keep the Prog_enable pins unchanged for at least 10ìs after the High-voltage has been</div><div>applied to ensure the Prog_enable Signature has been latched.</div><div>5. Wait until VCC actually reaches 4.5 -5.5V before giving any parallel programming</div>

<div>commands.</div><div>6. Exit Programming mode by power the device down or by bringing RESET pin to 0V.</div><div><br></div><span style="font-family:arial,sans-serif;font-size:13px"><b><b><div><span style="font-weight:normal"><b><b><span style="font-weight:normal"><span style="font-size:x-small">Drew Van Zandt</span></span></b></b></span></div>

<div><span style="font-weight:normal"><b><b><span style="font-weight:normal"><span style="font-size:x-small"><span style="font-family:arial">Artisan's Asylum Craft Lead, Electronics & Robotics</span><br>Cam # US2010035593 (</span></span></b></b><span style="font-weight:normal"><span style="font-size:x-small">M:</span></span><b><b><span style="font-weight:normal"><span style="font-size:x-small">Liam Hopkins </span></span></b></b><span style="font-weight:normal"><span style="font-size:x-small">R:</span></span><b><b><span style="font-weight:normal"><span style="font-size:x-small"> Bastian Rotgeld)<br>

</span></span></b></b></span><span style="font-family:arial,sans-serif;font-size:13px"><b><b><span style="font-weight:normal"><b><b><span style="font-weight:normal"><span style="font-size:x-small">Domain Coordinator, MA-003-D.  Masquerade aVST </span></span></b></b></span></b></b></span><br>

</div></b></b></span><font size="1"><br></font><br>
<br><br><div class="gmail_quote">On Wed, Mar 28, 2012 at 1:10 PM, Greg London <span dir="ltr"><<a href="mailto:email@greglondon.com">email@greglondon.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
I wanted to incorporate an arduino into a design I'm working on.<br>
But I didn't want a "duino" board connected to my design,<br>
I wanted an atmega328 chip as part of my design.<br>
<br>
I am starting with the following schematic for a bare bones arduino:<br>
<br>
<a href="http://thetransistor.com/wp-content/uploads/2010/02/Minimalist-Arduino-Rev01-Schematic.pdf" target="_blank">http://thetransistor.com/wp-content/uploads/2010/02/Minimalist-Arduino-Rev01-Schematic.pdf</a><br>
<br>
I wanted to keep the two connectors for ICSP and the USB FTDI<br>
so I can program the bootloader and also connect to it via USB<br>
and download arduino code.<br>
<br>
But I can't seem to figure out the reset connections between<br>
the two headers and the atmega328.<br>
<br>
Somewhere, and I can't find it anymore, I read that the atmega328<br>
has a "write protect" or some sort of bit like that on it.<br>
And that if this bit is set, you can't program the bootloader.<br>
To clear this bit, I thought I remember reading that you had to<br>
put 12v on the reset pin of the atmega328.<br>
<br>
Anyone know if this is correct?<br>
<br>
Anyone have a URL to a site that explains this?<br>
cause I can't find that website I was reading before.<br>
<br>
So, I wanted to make sure I could put 12v on the reset pin to the<br>
atmega328 but isolate it so I don't accidentally fry whatever<br>
might be connected to the USB FTDI or the ICSP headers.<br>
<br>
Yeah, I could just disconnect the header, but I was thinking I<br>
might solder in the USB FTDI interface because I will want<br>
to be able to reprogram my board.<br>
<br>
Anyway, I'm adding some 0.2v diodes to the schematic between<br>
the voltage regulator and the USB FTDI and the ICSP so that<br>
none of them accidentally fry the others with power supply<br>
voltages being hooked up simultaneously.<br>
<br>
I wanted to isolate the 12v to reset, but I don't understand<br>
how the DTR/RST from the USB FTDI works when its connected<br>
to reset via a cap.<br>
<br>
And I wasn't sure how the ICSP header used reset either.<br>
<br>
Does the USB FTDI reset the atmega328?<br>
Does the atmega328 reset the USB FTDI?<br>
<br>
How's the DTR/RST work that it's connected via a cap?<br>
<br>
Does the ICSP reset the atmega328?<br>
Does the atmega328 reset the ICSP?<br>
<br>
Does the ICSP put out the 12v to clear the write protect bit?<br>
<br>
If anyone has some URL's with some decent specs for what<br>
the USB FTDI signals do and what the ICSP signals do,<br>
that would be greatly appreciated.<br>
<br>
Thanks,<br>
Greg<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Hardwarehacking mailing list<br>
<a href="mailto:Hardwarehacking@blu.org">Hardwarehacking@blu.org</a><br>
<a href="http://lists.blu.org/mailman/listinfo/hardwarehacking" target="_blank">http://lists.blu.org/mailman/listinfo/hardwarehacking</a><br>
</blockquote></div><br></div>