Go Down

Topic: FT232 to atmega328 (Read 124 times) previous topic - next topic

pedro_delmonde

Quick question.

Does anyone know why the DTR (Data Terminal Ready) pin on the FT232 i often shown a connected to the reset net on the Atmega 328 ?

Thanks

knut_ny

The reset signal makes the 328 start its bootloader.
Ny

pedro_delmonde

But you don't use the ft232 to bootload. You would use spi 4 wire. You can use the usb but it would take nearly 24 hours. So why is the DTR connected to reset?

Robin2

If you don't need to force a reset you don't need to connect DTR to the reset pin.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

pert

But you don't use the ft232 to bootload.
You don't use it to burn the bootloader but you can indeed use it to upload programs to the ATmega328 via the bootloader.

You would use spi 4 wire.
You can do that too, though it's less common in the Arduino world.

You can use the usb but it would take nearly 24 hours.
You might need to check your math:
Code: [Select]
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\per\AppData\Local\Temp\arduino_build_993130/sketch_oct31b.ino.hex"
avrdude: writing flash (32256 bytes):

Writing | ################################################## | 100% 4.73s

avrdude: 32256 bytes of flash written
avrdude: verifying flash memory against C:\Users\per\AppData\Local\Temp\arduino_build_993130/sketch_oct31b.ino.hex:
avrdude: load data flash data from input file C:\Users\per\AppData\Local\Temp\arduino_build_993130/sketch_oct31b.ino.hex:
avrdude: input file C:\Users\per\AppData\Local\Temp\arduino_build_993130/sketch_oct31b.ino.hex contains 32256 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 3.44s

avrdude: verifying ...
avrdude: 32256 bytes of flash verified

That's right. It took 8.17 seconds to upload and verify the largest possible program to an ATmega328P with Optiboot bootloader via USB

So why is the DTR connected to reset?
Just what knut_ny told you already. The bootloader runs on every hard reset. In the old days you had to actually hit the reset button before uploading but now that is automatically done via the DTR pin at just the right time for the upload to occur with the minimum bootloader delay.

CrossRoads

SPI 4-wire is indeed Needed to put a bootloader on the board. It holds Reset low and accesses memory locations & fuses using SCK, MISO, MOSI pins.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up