AT90USB162 porgramming without programmer - Page 1
Forum section: electronics / general

author: ifrenide
author_rank: Regular Contributor
timestamp: November 02, 2019, 12:30:00 am
content: Hello, can we program AT90USB162 without programmer, Can we upload the code just by connecting the microcontroller using usb cable to PC?I heard then talking about FLIP system, how to Impliment it?best regards.

author: oPossum
author_rank: Super Contributor
timestamp: November 02, 2019, 01:31:03 am
content: http://ww1.microchip.com/downloads/en/devicedoc/doc7707.pdfSee section 23.5, page 229

author: oPossum
author_rank: Super Contributor
timestamp: November 02, 2019, 01:39:23 am
content: More USB bootloader info...http://ww1.microchip.com/downloads/en/devicedoc/doc7618.pdf

author: ifrenide
author_rank: Regular Contributor
timestamp: November 02, 2019, 02:05:45 am
content: Thank you very much oPssum

author: artag
author_rank: Super Contributor
timestamp: November 02, 2019, 01:29:09 pm
content: http://dfu-programmer.github.io/http://www.fourwalledcubicle.com/LUFA.phpThe USB162 is supported as part of Dean Camera's LUFA stack and is programmed via DFU using its own USB port.

author: ifrenide
author_rank: Regular Contributor
timestamp: November 03, 2019, 03:45:19 am
content: hello .I need practical configuration , please.best regards.

author: magic
author_rank: Super Contributor
timestamp: November 03, 2019, 09:11:41 pm
content: This chip is relatively easy to bring up.See the "power distribution" chapter for how to wire power supplies. Use the 5V or 5V/3.3V configuration because they don't require external regulators. Which one to choose depends on whether you want the I/Os to be 5V or 3.3V. Also, 16MHz operation is only guaranteed at 5V.The capacitor from UCAP to ground should be 1µF. Add another 10µF capacitor from UVCC to ground and perhaps an additional 100nF ceramic close to the MCU. Without those capacitors the internal regulator may oscillate, the chip will get hot and will not work at all. This warning is buried somewhere in the datasheet and it got me by surprise.You also need a crystal, 8 or 16 MHz. See chapter 6.4 "low power crystal oscillator" on how to wire that up. Don't overthink the load capacitors, just throw 18 or 22pF and it will work.

author: ifrenide
author_rank: Regular Contributor
timestamp: November 03, 2019, 10:33:42 pm
content: Thank you very much magic, for the explanation about this power configuration details and clock setup.So we can make a stand alone board to hold the microcontroller to program it , and of course it will include power and clock configuration ? to avoid soldering and desolderingbest regards.

author: magic
author_rank: Super Contributor
timestamp: November 04, 2019, 07:32:33 am
content: It's easier to solder the device onto its target board and program it there.Otherwise you need a TQFP32 socket. They exist, they aren't exactly cheap.

author: Nominal Animal
author_rank: Super Contributor
timestamp: November 05, 2019, 02:51:33 pm
content: To summarize (just trying to help others reading this thread): AT90USB162 hasa native full-speed (12 MBit/2) USB interface, with 176 bytes USB DPRAM for four programmable endpoints and one (endpoint 0) for control transfers, and supports USB packets up to 64 bytesby default (from factory), Atmel's USB DFU bootloader installeda calibrated internal oscillator, 8 MHz ± 1% at 3.3V VCC at 25°C/77°F; but not precise enough to allow the USB to workIf you intend to use the USB bus, you need a 8 MHz or 16 MHz crystal, better than ±0.25%. The microcontroller is usable without a crystal or resonator, as it has a built-in 8 MHz oscillator it uses when booting, but it is not precise enough for the USB bus to work.You can use the USB +5V (VBUS, UVCC on the microcontroller) directly, as the maximum VCC is 5.5V (which is outside valid USB VBUS range).If you want to run at 3.3V, you need a voltage regulator, that regulates the USB bus voltage down to 3.3V (connected to VCC on the microcontroller).If you want to run from external 3.4V - 5V power, disconnect USB VBUS completely, and connect UVCC and VCC on the microcontroller to your external power supply.If you want the microcontroller to be able to run from either external 5V power when not connected to USB, or from USB 5V when connected, use a pair of low-drop Schottky diodes (500mA) with the cathodes connected to microcontroller VCC, one anode to external 5V supply, and the other anode to USB VBUS, with USB VBUS also connected to UVCC. (Internally, UVCC is connected to a 3.3V regulator, that is used to supply the 3.3V level USB signals.)If you want to run at 5V, you'll need a crystal or resonator (typically 8 MHz or 16 MHz), as the internal oscillator is not calibrated for 5 V. You do not need a voltage regulator, as you use the 5V USB VBUS or UVCC directly.The minimum circuit for 5V/16MHz operation needs a 16 MHz crystal and its two caps (10 pF, I believe), one 1µF cap from UCAP to ground, 0.1µF and 1µF bypass capacitors (from VBUS, UVCC, AVCC, VCC, all connected together, to ground), and two 22Ω resistors (one between USB D+ and microcontroller D+, and the other between USB D- and microcontroller D-).