In a previous post I mentioned a word or two, Success in "Burn USB communication component evision of one of my Duemilanove boards Hardoaino. It was an incident rather sucks, yet informative: thanks definitely learned a few things will serve me in the future. In this post I will explain, first of all, how the failure occurred - and then talk a little about USB components-to-TTL external, the problem (the island) Hardoaino reset when you use them, and what on earth have to look for the middle wire.
It all started with the engine evision controller board. He had a plus and minus connection of a significant power source, for the engine, plus two smaller Finnish marked GND and Vcc-. My naive assumption was that Vcc, like any normal evision component, specifies Login stress. evision Since the engine has been received power larger evision compositions, with screws, evision two small pins are certainly stress that comes Mhardoaino for logical operation of motor controller (in addition to the lines of communication). Right?
They did not. For starters, the serial monitor - real-time information received from its Board Hardoaino - stopped abruptly, and the development environment has raised an error message that connection. Looking through the source evision of the problem touched evision the USB input of the board, and it was very hot. Cockroach evision next to her, it is responsible for managing communications via USB, furious. Not enough to smoke or stink, but enough to drop dead. A quick check revealed the Vcc pin damn was not designed to supply electricity to visit, but was directly connected evision to the plus input of the motor! Instead of moving to five volts, Hardoaino suffered 5V pin of the 9 volt ampere current of a whole, more or less. Why hit the media component? I do not know, maybe it's a matter of how the wiring, maybe sensitivity, maybe both.
In short, I was left with an unresponsive Ardoaino board for what USB. Power supply through this connection actually continued to work well, and thanks to additional indications I saw that the micro - Visit Central continued to operate properly, but you can not connect serial or program the micro - controller usual method. What to do?
Fortunately, there is an alternative way to communicate with the micro - controller *. The serial communication is, in the end, through the pins RXD / TXD of the ATMega328, connected to inputs 0 and 1 in Hardoaino, and burned my chip is just a protocol converter USB serial protocol for these pins. For a few dollars you can get on eBay or Chinese gadgets "converters" External exactly the same thing. Usually they are called "USB to UART" and "USB to TTL". evision They connect to a computer's USB on one side, and on the other hand Lardoaino with Finnish and standard wires. evision I mentioned this component before, here.
This component is excellent standard serial communication, but to burn using the software development environment Hardoaino need anything else: boot. Recall, micro - controllers of Hardoaino come with a small program called bootloader, and comes running whenever evision instantiate them. The bootloader is the one that can handle the absorption of a new software development environment and its burning. evision But is not waiting too: If a snap does not reach the appropriate commands, software bootloader transfers control to the software we wrote. When we click on Upload evision development evision environment, communications chip Hardoaino know to format the micro - the main controller to that the bootloader will and will absorb the new software. External components is less trivial.
Between the pins of the USB-to-TTL common one has marked RST, ie reset, but it does not send the appropriate command. In fact, it is intended to reset the communications component itself rather evision than of the micro - controller. To initialize the Hardoaino evision have to click manually reset button on the board with just the right moment, or to the port DTR (acronym for Data Terminal Ready) component of the media, and pull out wire to the RESET pin of Hardoaino. Luckily, my media component has organized DTR port - just solder a pin or wire. Other components have steady hands of a brain surgeon as to connect directly to one of the tiny feet of cockroach.
So far so good, except for one small thing: In practice, the DTR was unable evision to reset the Hardoaino. Order to perform the reset command, the RESET pin of the micro - controller must take a certain time - 2.5 microseconds evision at a minimum, the specification ATMega328 - while the DTR sends pulse is too short!
* Everything said here is relevant micro - controllers ATMega328 models, as there Bardoaino Uno, Doemilanove and the Nano. The new Leonardo tables it works differently, because all communication is managed through the micro - controller itself. I mean, if I was working with Leonardo, I'd probably burn the micro - controller itself and lose everything!
Your comment
HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote evision cite=""> <cite> <code> <del datetime = " "> <em> <i> <q cite=""> <strike> <strong>
Recent evision Comments Ofer Elimelech - Haifa on electricity masses Ido Gendel on impressions Mhardoaino at $ 9 a Borderless Electronics Yair on impressions Mhardoaino at $ 9 a Borderless Electronics Willie on Girl centerline of computer graphics Ido Gendel on electricity masses Joel on electricity to the masses looking for something specific?
Categories Select evision Category Administration algorithms Electronics General evision techniques from basic promotional micro - controllers ATTinyXX evision MSP430 Ardoaino games begin philosophy projects 4Probot A-XO MBM OMG WTF LOL Readuino Hello Tiny
No comments:
Post a Comment