Hey, /g/,
Can you recommend any good resources on embedded programming? I'd like to get into that.
Now, after almost 5 years of C-programming working experience I feel quite comfortable in C enough to start thinking about embedded AVR programming, however it's quite difficult to find good resources on that.
Can /g/ recommend anything? That'd be cool.
I would really appreciate resources, that explain everything that's going on from ground up - so I can have better understanding of the topic. Thanks.
>>58042282
Fuck man, an embedded thread on /g/? Talk about misfits
Well anyway, I've been tinkering around with embedded for about half a year now, and holy shit i agree with you, its fucked tough to find quality resources to learn any kind of microcontrollers. I learned using AVRs and 8051/8052 family microcontrollers solely by reading someone else's code and the datasheet side by side. This is probably the best advice, look up other's code online for doing something specific, like maybe lighting an LED, and then try to understand that. Go straight to the datasheet for any technical queries regarding what a register is or what a bit in a register does. The datasheet is your bible
The datasheet also has code examples for a lot of important stuff like using UART and SPI etc, but i dont think any for the really basic stuff. That should help you a lot
Also keep away from Microchip, or PICs, their documentation is not too good, stick with AVRs
>>58042792
Like this guy said there's going to be some ICs out there without great documentation and it will basically be only you autistically trying to figure out how to make shit work.
For me, I started off with Arduino (I know huuur tarduino). It helped me start with simple concepts, and I just branched out on my own from there. I found out what I would need to do if there wasn't a library for a component I needed to use (using data sheets), how to hook up said ICs (using data sheets), and basic electrical theory (reading online). If you haven't got the hint yes, like this anon said datasheets are basically your bible. Be prepared for lots of reading.
I learned how to program for the freescale hcs12 in a computer architecture class. We used this textbook and a Dragon-12 dev board:
https://www.amazon.ca/HCS12-9S12-Introduction-Software-Interfacing/dp/1435427424
HCS12 isn't all that popular in hobbyist projects, but it was nice being able to learn all the basics from one, well-written source.
check out a book called "make: avr programming"
it assumes you're a complete beginner though
>>58043526
>>58043129
>>58043070
>>58042792
Thanks guys, I'll definitely check that out. I've played with arduino before as well, but desu I can't feel it's low-levelness at all.
I wanted to find some programming tutorials for atmega 328p, as that's what I have at home right now. I guess I'll search some code for that
Unrelated, but is learning C as a first programming language a bad idea?
I've dabbled with Python but am by now means a programmer. I feel like if I'm to learn programming/cs, I should lean from the bottom up, and a low-level language like C only makes sense. I'm interested in kernel/firmware kind of stuff and also exploits and security. Basically real computing stuff.
Would this disadvantage me or is building my expertise from the ground up a good idea?
>>58043773
It's not a bad idea but it's gonna require way more perseverance than learning some more high level languages such as Python, Ruby etc. However if you won't get discouraged, you'll end up having way stronger understanding of underlying concepts of programming, necessary to understand if you wanna be a really good programmer.
>>58042282
AVR is neat
unfortunately i'm forced to use Atmel Studio for my development board because avr32studio is way outdated and literally makes everything uncompatible when working in dev teams where the others are using atmel studio
atmel has good documentation on their chips and on avr programming
>>58043773
C is unironically one of the best choices for a first language
because its a low-level language it gives you the necessary knowledge of how your program and the computer actually works
>>58043773
>>58043918
C is still a high level language
>>58043773
C is a pretty small language, which is nice. K&R is only about 200 pages.
The only thing that makes it difficult is the error messages in C are fucking ridiculous. You miss a semicolon and gcc spits out 100 lines of bullshit.
You should learn assembly too, since that'll teach you how heap/stack allocation works, how arguments are passed to functions, etc.
Which programmer you guys recommend for AVRs?
I bought a chink usbasp and now soldering a small ic socket board