AtMega328P with bootloader
The chip needs an external oscillator to be programmed, so this must be present on the XTAL pins.
AtMega328P without bootloader
If the chip was configured to use the internal oscillator, no additional components are needed. However, if the chip was previously configured to use an external oscillator, an oscillator will ...
You have selected the pin change interrupt as the ADC trigger source, but there is no code to configure pin change interrupts. So since nothing can trigger pin change interrupts, the ADC never triggers.
I think that it is the future. ..sort of.
On the last several projects I've started, the MCUs have all had some sort of code generator. CubeMX for the STM32, Atmel Start for the ATTiny, and Microchip Code Configurator for PICs. I use them every time I start on a new design. Why? It has 2 huge advantages over starting from scratch.
The code generators make ...
Could be the PWM output is not switching to ground, but going open(hi-impedance). And a related problem with r-m-w causing intermittant wrong output on pin.
At 6mA collector current, you need < 1mA base current. Increase base resistor to 4.7k.
Your pulse width looks very narrow. set a smaller ratio to test.
Obviously there are many answers here which basically forbid the use of "generated" software. I'll take a stand for the other side: Use what's there.
I am what you would call a (more or less) professional software developer (at least that's where I get my income from). I have been working with larger teams as well as alone. Unless there are very ...
There are several problems with these first few lines.
I'm assuming that Fkeypad() returns an ASCII character value. If that's not correct then you've got other problems and the rest of this answer is wrong.
First read about operator precedence of == and ||. The if statement that ...
Code generation as you speak of it is mostly a way to setup and abstract away the direct hardware setup register interface.
That has been a trend for quite some time from several (all?) chip providers, and is known as a HAL (Hardware Abstraction Layer). Auto-generating that code from a GUI has been done by at least Atmel and ST and probably others already. ...
This is by no means a unique feature: Renesas code generator and Infineon Toolbox come to mind. Those tools all have the same flaw: they force you to use a certain framework which is not flexible enough in practice. The moment you edit the auto-generated code to adapt it to your needs, you lose the option to use the code generator again: it will typically ...
In general, you select an MCU that can do what it should depending on many criteria. Sometimes it is the MCU price, but sometimes how fast you can develop it, as time and work to devlop hardware and software also costs money. You do your best to estimate what peripherals you need, how many of them you need, and how fast MCU you need, how many IO pins you ...
In industry, do developers generally try to simplify things by
including as many peripherals as possible in their uC selection (if
cost effective), even if it's an overkill in the sense of potentially
adding more uC capability than what may be needed?
Generally no, Like it depends on what you want to achieve. For example if someone is making large volume ...
In industry, do developers generally try to simplify things ... even if it's an overkill in the sense of potentially adding more uC capability ...
Why do you care if the microprocessor is "too capable"? You care that it's capable enough, then you care about the lifetime cost of the product (to oversimplify: engineering time / number of boards + ...
I've been working on microcontrollers for 25 years now.
Use ARM core microcontrollers.
NXP's microcontrollers have a very few hardware bugs.
ST's microcontrollers have more bugs but are cheaper
Renesas is the best but every once in a while there's shortage.
To answer your questions:
Usually people don't pick the microcontroller that has the broadest number ...
There have been repeated attempts to create various different auto-generating code for the last 20-30 years or so. Each time, it's marketed as something revolutionary, but it never becomes a success. This isn't something new at all. Siemens/Infineon had such tools way back in the late 1990s. Motorola/Freescale also attempted something similar in the early ...
People have been inventing ways to generate code without having to write any code for decades now - and they all hit the same limitations.
CubeMX does not really do anything very clever (complicated yes, clever no) and it's not really writing original code the way a programmer would - it's creating a configuration with blocks of pre-written code, filling in ...
It all depends on who you are and what do you use it for.
If you are a hobbyist that wants to start a project, you can use CubeMX to have all the peripherals you need configured and a LED blinking under a real-time OS in 15 minutes so you can start building your application.
If you are a medical device manufacturer, you may not even be able to use CubeMX due ...
The AVR is popular because of Arduino. The AVR32, considerably less so, and there are variants of it going end-of-life. It would not be a good investment, given better-supported options out there.
The most popular 32-bit devices are ARM-based, which would include:
STM32 (ST Micro - huge range of choices)
i.MX6 / MX8 family (NXP, also very extensive range)
An ATMega328P does not have a GPIO port A.
The code must be for some other AVR, and to make it work on this MCU, you have to use the ports and pins that are availabe, which means the code needs changes to work on another AVR.
Do not assume that any other peripheral register has identical usage.
Any of the STM32 Nucleo range should provide exactly what you want. The cheapest option the Nucleo f030r8 blows the atmega1284p out of the water in regards to memory, speed and peripherals. It is supported by the Arduino IDE, supports the majority of shields and has a 12bit ADC.