I don't use books, but my advice is to read the data sheet, and understand how easy it is to directly manipulate registers to do what you want. Libraries are fine most of the time, but be comfortable with direct access.
The names, TCCR1B and others are straight out of the avr datasheet; many arduinos use the 328p: https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf
It pains me to no end that imbeciles have issues with that. Explain, if you will, how exactly that pains you, and what is the alternative in your happy world?
>Explain
The resources of a microcontroller are so small in terms of time and space that the very notion of carrying OO overhead and a fricking garbage collector is mind-numblingly stupid. This doesn't even begin to explore the dangers inherent to the warped execution scheduling. "Yes yes, I know you're trying to apply the break. But listen. There's a few pages of RAM over here that really need sweeping. I'll get to it, alright? Stop screaming."
If you really want a high level language for doing low level things under crazy constraints, at least pick up Ada.
>C++ doesn't have a garbage collector
Ohh, did I invent that part of C++11, which forces the allocator (again, why are you playing with memory allocation and paging at all?) to carry around hooks for GC?
This is so unbelievably moronic and wrong I don't even know where to begin. There are microcontroller RTOSes out there right now that are written in C++.
2 years ago
Anonymous
>There are microcontroller RTOSes out there right now that are written in C++.
There are also thermostats which query webservers across the Internet to function.
And you seem to be pumping air.
Both proof that mere existence is insufficient to assert intelligence.
You are actually braindead. This is the perfect example of Dunning-Kruger. First, C++ doesn't have a garbage collector. Low-level memory management is handled as you chose to handle it. Second, a garbage collector would use more resources on an embedded system as opposed to strict memory management. Third, you mean LOW level language. Now how about you stop fricking talking out of your ass because you have no concept of anything you are saying.
They really aren't...university freshers will just regurgitate their no nothing professors (some of which even advocate Rust now...lmao I know). Then as the years go by, they complain there is limited support for C++, not understanding why any silicon vendors could not possibly be arsed to write compilers for it.
Micro controllers are like tiny computers. But an arguing and start with the learning to code meme. They all have different architectures so be prepared to read a lot of manuals.balso buy breadboard and basic electronics components
Did you actually read all that? I find that textbooks like that are so long and difficult that I end up only looking up the things I need and skipping the rest
Yes I read it. And I disrespect people who want to know something but don't have the attention span to look at some words for longer than a TikTok video.
Why zoomers don't have attention-span greater than 2 minutes?
I wish you'd be time warped into the 1800's and live a life in poverty on the streets because you can't be bothered to read more than 2 pages.
zoomers have to worry about their futures and every lost minute is a threat to their survival because boomers stole all their resources and then bred them into poverty
boomers don't have to worry about their futures and can waste time on writing and reading endless paragraphs that never get to the point
RTOS is annoying as frick but you need it if you want efficient multitasking programs. Stuff like Arduino IDE has polling issues, and no proper sleep function (instead of turning off for a set amount of time it will just burn cycles).
If you don’t know how to program try to learn that first. Once you memorize all the patterns of C++ or java or python or whatever you can move on.
I would recommend a big textbook and the arduino datasheet, but also give yourself projects to do. The best way to learn something is alternate between study and applying everyday.
I don't use books, but my advice is to read the data sheet, and understand how easy it is to directly manipulate registers to do what you want. Libraries are fine most of the time, but be comfortable with direct access.
Example of timer setting:
TCCR1B |= (1 << CS10); //selecting prescaler 0b001 (Tclk/1)
TCCR1B &= ~((1<<CS11) | (1<<CS12)); // turn off CS12 and CS11 bits
The names, TCCR1B and others are straight out of the avr datasheet; many arduinos use the 328p: https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf
>micro-controllers and c++
it pains me to no end that these are somehow now compatible concepts
It pains me to no end that imbeciles have issues with that. Explain, if you will, how exactly that pains you, and what is the alternative in your happy world?
>Explain
The resources of a microcontroller are so small in terms of time and space that the very notion of carrying OO overhead and a fricking garbage collector is mind-numblingly stupid. This doesn't even begin to explore the dangers inherent to the warped execution scheduling. "Yes yes, I know you're trying to apply the break. But listen. There's a few pages of RAM over here that really need sweeping. I'll get to it, alright? Stop screaming."
If you really want a high level language for doing low level things under crazy constraints, at least pick up Ada.
>break
*brake
C++ doesn't have a garbage collector, what are you on about?
Your complaints would be much better aimed at PicroPython.
>C++ doesn't have a garbage collector
Ohh, did I invent that part of C++11, which forces the allocator (again, why are you playing with memory allocation and paging at all?) to carry around hooks for GC?
This is so unbelievably moronic and wrong I don't even know where to begin. There are microcontroller RTOSes out there right now that are written in C++.
>There are microcontroller RTOSes out there right now that are written in C++.
There are also thermostats which query webservers across the Internet to function.
And you seem to be pumping air.
Both proof that mere existence is insufficient to assert intelligence.
You are actually braindead. This is the perfect example of Dunning-Kruger. First, C++ doesn't have a garbage collector. Low-level memory management is handled as you chose to handle it. Second, a garbage collector would use more resources on an embedded system as opposed to strict memory management. Third, you mean LOW level language. Now how about you stop fricking talking out of your ass because you have no concept of anything you are saying.
They really aren't...university freshers will just regurgitate their no nothing professors (some of which even advocate Rust now...lmao I know). Then as the years go by, they complain there is limited support for C++, not understanding why any silicon vendors could not possibly be arsed to write compilers for it.
>What books you suggest for learning programing micro-controllers and c++ ?
The Protocols of the Elders of Zion
That's just to learn c++, for microcontrollers I recommend you The culture of critique
Micro controllers are like tiny computers. But an arguing and start with the learning to code meme. They all have different architectures so be prepared to read a lot of manuals.balso buy breadboard and basic electronics components
Buy and arduino*** fricking phone posters
>>g
Not being rude, its discussed daily there.
Pic related
Did you actually read all that? I find that textbooks like that are so long and difficult that I end up only looking up the things I need and skipping the rest
Yes I read it. And I disrespect people who want to know something but don't have the attention span to look at some words for longer than a TikTok video.
why old farts can't write books in a concise and short manner
Why zoomers don't have attention-span greater than 2 minutes?
I wish you'd be time warped into the 1800's and live a life in poverty on the streets because you can't be bothered to read more than 2 pages.
Black person
>Educated and book-reading people are the real Black folk
t. Pic related
zoomers have to worry about their futures and every lost minute is a threat to their survival because boomers stole all their resources and then bred them into poverty
boomers don't have to worry about their futures and can waste time on writing and reading endless paragraphs that never get to the point
RTOS is annoying as frick but you need it if you want efficient multitasking programs. Stuff like Arduino IDE has polling issues, and no proper sleep function (instead of turning off for a set amount of time it will just burn cycles).
If you don’t know how to program try to learn that first. Once you memorize all the patterns of C++ or java or python or whatever you can move on.
I would recommend a big textbook and the arduino datasheet, but also give yourself projects to do. The best way to learn something is alternate between study and applying everyday.
Get a pic 16/24 and a bootleg copy of Proteus.
Make a simple counter, a/d converter, and if do.