Electronics > Beginners

Microcontroller programmers - need to disambiguate some information

(1/2) > >>

bodzio_stawski:
Hello!

I'm wondering about some aspects of hardware tools for programming microcontrollers. Unfortunately, so far this topic has been neglected by me - I admit. I am wondering about the structure of programmers for microcontrollers, namely (examples):

1) USBasp - programming tool designed for ATmega and ATTiny microcontrollers, which has a pre-programmed Atmega microcontroller on board.
2) Programming tool based on CH340, usually named as "USB-UART converter based on the CH340 chip, which can be used as a programmer for STC microcontrollers". Ch340 of course does not require programming. link below:

shorturl.at/uGHV6
3) Universal programmers
I had a hard time finding a decent reference here. I used a foreign language article automatically translated into English, for which I apologize (see the attachment in pdf).

Universal programming boards should probably be understood as programming tools that, using CPLD (and maybe FPGA) gain a function that allows reprogramming the internal structure of gates to work with particular interfaces of microcontrollers, like ISP or JTAG.

Question:
Trying to understand how microcontroller programming devices work, two things bother me:

1. Some boards like USBasp are based on microcontrollers, but others like 2) - CH340 chip only (not programmable). Why in the case of 2) a non-programmable chip is enough?
2. Even universal programmer boards that reprogram themselves internally (CPLD) depending on the desired interface, when selected, emulate this interface, so they probably become it - as if they were single, non-programmable chips.


But then nothing else is needed - no additional microcontroller is needed if I'm not mistaken.

So why a seemingly overcomplicated solution 1) if we have either a cheaper solution 2) or a 3) more universal solution?

darkspr1te:
Generally programmers come in two major flavours, LVP and HVP that low voltage programming and high voltage programming. Then you will have a subset of those programmers being MCU controlled and Host controlled.
 The mcu controlled units tend to have a lot more functions baked in and cover more hardware types as they often built specific for those devices. The non MCU or host controlled programmers are often hacks or custom software to provide the functions and may even require additional hardware to interface to the device under test.

I personally have many programmers from Pic32 to STLink v2, universal jtag adapter (bus blaster) , multi interface device (bus pirate) , black magic programmer and custome ones i've built to dump firmware from protected devices.

if you intend to hack about with many devices then you will end up with many programmers, if you are staying with a chip type then you will no doubt end up with that specific programmer.



darkspr1te

Psi:
Every MCU manufacture decides how they want to do programming, and each approach has advantages.

BillyO:
If you are interested in getting going with Atmel MCU's why not start with Arduino to get your feet wet?  The platform is quite flexible and integrates a lot of the open source software tools that you can then investigate.  The same from the hardware side.  The Arduino uses a simple LV programming method that employs a USB to TTL serial converter.

dobsonr741:
The universal parallel port programmer you attached is from 15 years ago. Since then parallel ports gone extinct. The obvious choice is USB.

It’s the ease of use and low cost adoption that drives an MCU lineages on the maker market. Prime example: Arduino. Also, the flash memory no longer requires high voltage to reprogram - so the HVP programmers died.

What is left are the boot loaders, no need for programmers at all, or SWP, that gives JTAG equivalent higher functions, more than boot loader provides.

CH340 is not a programmer, it is a usb to serial bridge, to communicate with the serial bootloader. You’ll find it when a low end MCU is not having native USB.

The trend you can see is reduced connection count for programming, saving usable pins. And the communication going red using the number of parallel lines to bare minimum and to high speed (SWP is a 5MHz) or native USB.

PICS and AVRs with their specific programmers are the relic of the past, you might have noticed the new trends with STM32 and ESP lineages.

So yes, universal programmers exist, you can say they are USB boot loaders and SWP.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod