• Guest
HabraHabr
  • Main
  • Users

  • Development
    • Programming
    • Information Security
    • Website development
    • JavaScript
    • Game development
    • Open source
    • Developed for Android
    • Machine learning
    • Abnormal programming
    • Java
    • Python
    • Development of mobile applications
    • Analysis and design of systems
    • .NET
    • Mathematics
    • Algorithms
    • C#
    • System Programming
    • C++
    • C
    • Go
    • PHP
    • Reverse engineering
    • Assembler
    • Development under Linux
    • Big Data
    • Rust
    • Cryptography
    • Entertaining problems
    • Testing of IT systems
    • Testing Web Services
    • HTML
    • Programming microcontrollers
    • API
    • High performance
    • Developed for iOS
    • CSS
    • Industrial Programming
    • Development under Windows
    • Image processing
    • Compilers
    • FPGA
    • Professional literature
    • OpenStreetMap
    • Google Chrome
    • Data Mining
    • PostgreSQL
    • Development of robotics
    • Visualization of data
    • Angular
    • ReactJS
    • Search technologies
    • Debugging
    • Test mobile applications
    • Browsers
    • Designing and refactoring
    • IT Standards
    • Solidity
    • Node.JS
    • Git
    • LaTeX
    • SQL
    • Haskell
    • Unreal Engine
    • Unity3D
    • Development for the Internet of things
    • Functional Programming
    • Amazon Web Services
    • Google Cloud Platform
    • Development under AR and VR
    • Assembly systems
    • Version control systems
    • Kotlin
    • R
    • CAD/CAM
    • Customer Optimization
    • Development of communication systems
    • Microsoft Azure
    • Perfect code
    • Atlassian
    • Visual Studio
    • NoSQL
    • Yii
    • Mono и Moonlight
    • Parallel Programming
    • Asterisk
    • Yandex API
    • WordPress
    • Sports programming
    • Lua
    • Microsoft SQL Server
    • Payment systems
    • TypeScript
    • Scala
    • Google API
    • Development of data transmission systems
    • XML
    • Regular expressions
    • Development under Tizen
    • Swift
    • MySQL
    • Geoinformation services
    • Global Positioning Systems
    • Qt
    • Dart
    • Django
    • Development for Office 365
    • Erlang/OTP
    • GPGPU
    • Eclipse
    • Maps API
    • Testing games
    • Browser Extensions
    • 1C-Bitrix
    • Development under e-commerce
    • Xamarin
    • Xcode
    • Development under Windows Phone
    • Semantics
    • CMS
    • VueJS
    • GitHub
    • Open data
    • Sphinx
    • Ruby on Rails
    • Ruby
    • Symfony
    • Drupal
    • Messaging Systems
    • CTF
    • SaaS / S+S
    • SharePoint
    • jQuery
    • Puppet
    • Firefox
    • Elm
    • MODX
    • Billing systems
    • Graphical shells
    • Kodobred
    • MongoDB
    • SCADA
    • Hadoop
    • Gradle
    • Clojure
    • F#
    • CoffeeScript
    • Matlab
    • Phalcon
    • Development under Sailfish OS
    • Magento
    • Elixir/Phoenix
    • Microsoft Edge
    • Layout of letters
    • Development for OS X
    • Forth
    • Smalltalk
    • Julia
    • Laravel
    • WebGL
    • Meteor.JS
    • Firebird/Interbase
    • SQLite
    • D
    • Mesh-networks
    • I2P
    • Derby.js
    • Emacs
    • Development under Bada
    • Mercurial
    • UML Design
    • Objective C
    • Fortran
    • Cocoa
    • Cobol
    • Apache Flex
    • Action Script
    • Joomla
    • IIS
    • Twitter API
    • Vkontakte API
    • Facebook API
    • Microsoft Access
    • PDF
    • Prolog
    • GTK+
    • LabVIEW
    • Brainfuck
    • Cubrid
    • Canvas
    • Doctrine ORM
    • Google App Engine
    • Twisted
    • XSLT
    • TDD
    • Small Basic
    • Kohana
    • Development for Java ME
    • LiveStreet
    • MooTools
    • Adobe Flash
    • GreaseMonkey
    • INFOLUST
    • Groovy & Grails
    • Lisp
    • Delphi
    • Zend Framework
    • ExtJS / Sencha Library
    • Internet Explorer
    • CodeIgniter
    • Silverlight
    • Google Web Toolkit
    • CakePHP
    • Safari
    • Opera
    • Microformats
    • Ajax
    • VIM
  • Administration
    • System administration
    • IT Infrastructure
    • *nix
    • Network technologies
    • DevOps
    • Server Administration
    • Cloud computing
    • Configuring Linux
    • Wireless technologies
    • Virtualization
    • Hosting
    • Data storage
    • Decentralized networks
    • Database Administration
    • Data Warehousing
    • Communication standards
    • PowerShell
    • Backup
    • Cisco
    • Nginx
    • Antivirus protection
    • DNS
    • Server Optimization
    • Data recovery
    • Apache
    • Spam and antispam
    • Data Compression
    • SAN
    • IPv6
    • Fidonet
    • IPTV
    • Shells
    • Administering domain names
  • Design
    • Interfaces
    • Web design
    • Working with sound
    • Usability
    • Graphic design
    • Design Games
    • Mobile App Design
    • Working with 3D-graphics
    • Typography
    • Working with video
    • Work with vector graphics
    • Accessibility
    • Prototyping
    • CGI (graphics)
    • Computer Animation
    • Working with icons
  • Control
    • Careers in the IT industry
    • Project management
    • Development Management
    • Personnel Management
    • Product Management
    • Start-up development
    • Managing the community
    • Service Desk
    • GTD
    • IT Terminology
    • Agile
    • Business Models
    • Legislation and IT-business
    • Sales management
    • CRM-systems
    • Product localization
    • ECM / EDS
    • Freelance
    • Venture investments
    • ERP-systems
    • Help Desk Software
    • Media management
    • Patenting
    • E-commerce management
    • Creative Commons
  • Marketing
    • Conferences
    • Promotion of games
    • Internet Marketing
    • Search Engine Optimization
    • Web Analytics
    • Monetize Web services
    • Content marketing
    • Monetization of IT systems
    • Monetize mobile apps
    • Mobile App Analytics
    • Growth Hacking
    • Branding
    • Monetize Games
    • Display ads
    • Contextual advertising
    • Increase Conversion Rate
  • Sundry
    • Reading room
    • Educational process in IT
    • Research and forecasts in IT
    • Finance in IT
    • Hakatonas
    • IT emigration
    • Education abroad
    • Lumber room
    • I'm on my way

Programmer for the tinyAVR family based on the cheap Chinese converter CH340

3r3141. Unified Program and Debug Interface (UPDI) 3r3142. - This is a single-wire interface for programming /debugging new Atmel 8-bit microcontrollers, replacing the two-wire PDI interface used to program AVR XMEGA microcontrollers. 3r3178.  3r3185. 3r3178.  3r3185.
3r311. 3r3186.
3r3144. 3r3178.  3r3185. So, the regiment of Atmelov's protocols arrived - ISP, JTAG, debugWIRE, TPI, aWire, PDI, now here is UPDI. At the same time, the situation with the AVR ecosystem is still very poor, so we were going to completely abandon their use, but the latter tendency pleased us a little, which is why this article was written. 3r3178.  3r3185. 3r3178.  3r3185. The UPDI protocol can only be used by the happy owners of the Atmel ICE programmer, which is not very convenient to use due to the rather strange choice of the connector, and it is not that cheap to afford to purchase it on an industrial scale. In addition, it requires the installation of Atmel Studio, which periodically refuses to work with it, because according to the policy of our company, most computers do not have access to the Internet, and the studio periodically climbs there for drivers, then for some libraries, as a result moments when the programmer was visible in the system, that is, the drivers were installed correctly, but it was not noticed by the studio itself until it got access to the network and was not updated forcibly. 3r3178.  3r3185. 3r3178.  3r3185. Therefore, immediately after we began to use the new and quite convenient ATTiny1616 microcontroller (about its merits later) in our developments, there was a need for a tool that we could use to write to the primary loader controller in production. Without <{full}>  3r3188. 3r3-31. Unified Program and Debug Interface (UPDI) 3-333140. - This is a single-wire interface for programming /debugging new Atmel 8-bit microcontrollers, replacing the two-wire PDI interface used to program AVR XMEGA microcontrollers. 3r3176.  3r3188. 3r3176.  3r3188.
Programmer for the tinyAVR family based on the cheap Chinese converter CH340 3r3184. 3r311. 3r3142. 3r3176.  3r3188. So, the regiment of Atmelov's protocols arrived - ISP, JTAG, debugWIRE, TPI, aWire, PDI, now here is UPDI. At the same time, the situation with the AVR ecosystem is still very poor, so we were going to completely abandon their use, but the latter tendency pleased us a little, which is why this article was written. 3r3176.  3r3188. 3r3176.  3r3188. The UPDI protocol can only be used by the happy owners of the Atmel ICE programmer, which is not very convenient to use due to the rather strange choice of the connector, and it is not that cheap to afford to purchase it on an industrial scale. In addition, it requires the installation of Atmel Studio, which periodically refuses to work with it, because according to the policy of our company, most computers do not have access to the Internet, and the studio periodically climbs there for drivers, then for some libraries, as a result moments when the programmer was visible in the system, that is, the drivers were installed correctly, but it was not noticed by the studio itself until it got access to the network and was not updated forcibly. 3r3176.  3r3188. 3r3176.  3r3188. Therefore, immediately after we began to use the new and quite convenient ATTiny1616 microcontroller (about its merits later) in our developments, there was a need for a tool that we could use to write to the primary loader controller in production. Of course, without SMS and registration Internet access. 3r3176.  3r3188. 3r3176.  3r3188. After a bit of searching, I discovered the project [b] on Github. pyupdi
(https://github.com/mraardvark/pyupdi) - UPDI protocol implementation on Python, and this implementation is based on the usual UART protocol, except without level converters, which is actually more convenient because it allows using standard microcircuits converters from FTDI or their Chinese counterparts CH340 /341. 3r3176.  3r3188. 3r3176.  3r3188. The project was downloaded and tested, it went quite cheerfully. But after a couple of days it became clear that he still didn’t really fit us. Reasons:
 3r3188. 3r3176.  3r3188. 3r3151.  3r3188. 3r3168. It requires the installation of Python and a whole group of packages (I remind you that we are talking about computers without access to the Internet), I had to download and manually install almost a dozen different packages that depended on each other. Yes, in principle, you can make an executable file on another computer from a Python script, this somehow solved the problem, but the list of problems did not end with 3r3169.  3r3188. 3r3168. there is almost no error checking in the script, any error ends with an interruption indicating heaps of files referring to each other, which is not very clear to ordinary personnel.  3r3188. 3r3168. It is impossible to read the contents of the controller's memory, which makes it impossible to finally test the recording process 3r31616.  3r3188. 3r3168. There is no way to read the fuses
 3r3188. 3r3168. the speed of the script leaves much to be desired, 16 kb are written for almost a minute, this is due to the absence of any optimization in the transfer process, everything is built on tight timings 3r31616.  3r3188. 3r3168. no indication of the recording process 3r3r169.  3r3188. 3r3168. The project does not support a range of processors that could be supported by 3r3169.  3r3188. 3r3168. The project is in a half-dead state and does not respond to requests 3r3-3169.  3r3188. 3r3171. 3r3176.  3r3188. Problems were solved within the framework of Python for some time, but after any fixation I had to reassemble the project, test it, so that there was a desire to rewrite the script on something more familiar and fast, that is, on C. We are embeds, after all! 3r3176.  3r3188. 3r3176.  3r3188. Now briefly about the merits of the tinyAVR 1-Series new family:
 3r3188. 3r3176.  3r3188. 3r3151.  3r3188. 3r3168. real unification of the periphery and address space in the range from 2 kb to 32 kb
 3r3188. 3r3168. convenient bootloader configuration (at the beginning of the memory!) 3r3r1616.  3r3188. 3r3168. a significant simplification of the ISP (In-System-Programming) algorithm 3r31616.  3r3188. 3r3168. transition to von Neumann architecture 3r3r169.  3r3188. 3r3168. up to 32 kb of flash memory in a small package (3x3mm) with 24 terminals, of which up to 22 (!) can be used as IO
 3r3188. 3r3168. the presence of an internal oscillator at 16/20 MHz 3r3-3169.  3r3188. 3r3168. less dependency on fusion configuration (eternal AVR headache)
 3r3188. 3r3168. Analog part excellent for a small controller (ADC /DAC /Comparators with the possibility of both internal and external switching of inputs /outputs) 3r3169.  3r3188. 3r3168. single-wire programming and debugging
 3r3188. 3r3168. extremely low price in retail (from € 0.6 for 16 kb)
 3r3188. 3r3171. 3r3176.  3r3188. As an iron part of the programmer, we took the already existing USB-UART TTL converter based on the Chinese CH340 chip, like this:
 3r3188. 3r3176.  3r3188. 3r3115. 3r3176.  3r3188. 3r3176.  3r3188. For programming, it is enough to connect two of its outputs RX and TX, since they are already equipped with an output resistor of 1.5k, if there is no resistor in your converter model, then it should be added. The combined output is connected to the UPDI pin on a programmable chip, the transmitter ground must also be connected to the controller ground. If there is an external power supply, you need to pay attention only to whether it corresponds to the power supply used by the converter (3.3V or 5V). If there is a need, it is possible to power the circuit with the controller from the converter itself, which can be very convenient for primary programming. 3r3176.  3r3188. 3r3176.  3r3188. 3r3124. 3r3176.  3r3188. 3r3176.  3r3188. Attention! 3r33140. The resistor is optional, it needs to be soldered only if your converter does not have any protective resistors at the output. 3r3176.  3r3188. 3r3176.  3r3188. The only problem associated with the CH340 chip is that it did not work in my Linux version of the program, because the parity bit in the programming protocol and the CH340 driver in my kernel version do not work correctly with this bit. Perhaps the problem will be fixed soon, so far I have not had the patience to do this. 3r3176.  3r3188. 3r3176.  3r3188. As a result of the work and experiments in IDE Code :: Blocks, the program 3r3139 was written and debugged. updiprog , 3r3141. the source codes of which are laid out on Github
. 3r3176.  3r3188. 3r3176.  3r3188. What has been implemented in this version of the program: 3r3176.  3r3188. 3r3176.  3r3188. 3r3151.  3r3188. 3r3168. Added the ability to read the contents of the controller's flash memory in the
hex file.  3r3188. 3r3168. Added the ability to read the status of all fusions of the controller
 3r3188. 3r3168. whenever possible, error handling has been added with corresponding messages 3r3169.  3r3188. 3r3168. Added indication of the write /read process
 3r3188. 3r3168. Significantly increased work speed (about 6 seconds to read 16 kb)
 3r3188. 3r3168. Added support for all 1-Series
microcontrollers.  3r3188. 3r3171. 3r3176.  3r3188. The initial size of the program is about 25 kb in comparison with 5 kb of MB for the compiled source Python script. 3r3176.  3r3188. 3r3176.  3r3188. I hope that the work done will be useful to someone. I will be glad to feedback and suggestions. 3r3184. 3r3188. 3r3188. 3r3181. ! function (e) {function t (t, n) {if (! (n in e)) {for (var r, a = e.document, i = a.scripts, o = i.length; o-- ;) if (-1! == i[o].src.indexOf (t)) {r = i[o]; break} if (! r) {r = a.createElement ("script"), r.type = "text /jаvascript", r.async =! ? r.defer =! ? r.src = t, r.charset = "UTF-8"; var d = function () {var e = a.getElementsByTagName ("script")[0]; e.parentNode.insertBefore (r, e)}; "[object Opera]" == e.opera? a.addEventListener? a.addEventListener ("DOMContentLoaded", d,! 1): e.attachEvent ("onload", d ): d ()}}} t ("//mediator.mail.ru/script/2820404/"""_mediator") () (); 3r3182. 3r3188. 3r3184. 3r3188. 3r3188. 3r3188. 3r3188.

It may be interesting

  • Comments
  • About article
  • Similar news
This publication has no comments.

weber

Author

23-10-2018, 06:14

Publication Date

Development / Programming

Category
  • Comments: 0
  • Views: 438
De facto closed source: arguments for
Larger than
Elegant objects
Record of the webinar "Do you need
Writing your own workable OS for half a
Go vs Javascript. What to write IoT
Write a comment
Name:*
E-Mail:


Comments
Quickly this site  could indisputably generally always be dominant relating to every one of web  site buyers, as a consequence of fastidious stories plus exams https://www.pizzahutcouponcode.com/pizza-hut-coupons-code/


Helpful information. Fortunate me I discovered your web site accidentally,
and I am stunned why this accident did not happen earlier! I bookmarked it. Thanks, I've recently been looking for information about this topic for [hide]a[https://www.pizzahutcouponcode.com/pizza-hut-coupons-code/
] long time and yours is the greatest I've discovered so far. But, what concerning the conclusion? Are you positive about the source?


Today, 09:15

Alytani

this is really nice to read..informative post is very good to read..thanks a lot! How is the cost of house cleaning calculated?
Yesterday, 17:14

Legend SEO

It’s very informative and you are obviously very knowledgeable in this area. You have opened my eyes to varying views on this topic with interesting and solid content.

entegrasyon programları
Yesterday, 17:09

taxiseo2

I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work.

entegrasyon programları
Yesterday, 17:02

taxiseo2

I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work...먹튀

Yesterday, 16:50

raymond weber

Adv
Website for web developers. New scripts, best ideas, programming tips. How to write a script for you here, we have a lot of information about various programming languages. You are a webmaster or a beginner programmer, it does not matter, useful articles will help to make your favorite business faster.

Login

Registration Forgot password