[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/diy/ - Do It Yourself


Thread archived.
You cannot reply anymore.




File: background.jpg (1.13 MB, 3840x2160)
1.13 MB
1.13 MB JPG
What books you suggest for learning programing micro-controllers and c++ ?
>>
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
>>
>>2413542
>micro-controllers and c++
it pains me to no end that these are somehow now compatible concepts
>>
>>2413559
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?
>>
>>2413542
>What books you suggest for learning programing micro-controllers and c++ ?
The Protocols of the Elders of Zion
>>
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
>>
>>2413592
Buy and arduino*** fucking phone posters
>>
>>2413561
>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 fucking 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.
>>
>>2414280
>break
*brake
>>
>>2414280
C++ doesn't have a garbage collector, what are you on about?
Your complaints would be much better aimed at PicroPython.
>>
>>2414287
>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?
>>
>>g

Not being rude, its discussed daily there.
>>
>>2414297
This is so unbelievably retarded and wrong I don't even know where to begin. There are microcontroller RTOSes out there right now that are written in C++.
>>
>>2413542
Pic related
>>
>>2415005
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
>>
RTOS is annoying as fuck 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.
>>
>>2413565
That's just to learn c++, for microcontrollers I recommend you The culture of critique
>>
>>2414428
>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.
>>
>>2415160
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.
>>
>>2413542
Get a pic 16/24 and a bootleg copy of Proteus.

Make a simple counter, a/d converter, and if do.
>>
>>2415824
why old farts can't write books in a concise and short manner
>>
>>2417130
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.
>>
>>2417428
nigger
>>
>>2417428
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
>>
>>2413559
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.
>>
>>2414280
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 fucking talking out of your ass because you have no concept of anything you are saying.
>>
>>2417763
>Educated and book-reading people are the real niggers
t. Pic related



Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.