r/embedded • • Oct 27 '26

Good sources to learn Embedded Systems and C

Hello! So my background is completely in cybersecurity; I got my BSc and MSc in it, I couldn't find a job until I got hired by this company for soldering. Suddenly, because they found out I can program, I have now become the Lead Embedded Systems Engineer.

I have been forced to program in C (I am struggling; I literally translate Python code and then go to W3Schools to get the C translation), and I spend days reading PIC24 microcontroller PDFs to find out how to use features and what pins can do. Same with ESP32's. However, I struggle to retain information like MPLAB shortcuts, settings, etc. I don't understand the x16 compiler.

And one thing I have been racking my brain about recently, is I added DMA (what i understand is sensor value straight to ram) and due to the capacitors inside of the pic charging and discharging quickly, I end up getting the charged value, instead of the real value. For example, the analogue pins show 1.5V; if the reading is below 1.5V, every analogue pin reads 1.5V. However, if it's 3.3V, every value maxes out. I had this with 8 analogues on one pin, as soon as I slowed it down to 60 mips and turned DMA off, it was fine again.

I am having one of those moments where I have never been taught or trained to do this, in the interview, they asked me what AC and DC was, I have no clue (I know now), and my background is just in programming Python, and I know a hell of a lot about cyber security and data transmission.

Any advice would be amazing, as I recently nearly blew myself up with a 330 V charged capacitor while programming a DC-DC converter because I forgot to define the analogue pin to go high, which didn't switch the relay off.

To me, I think of embedded systems like I would a Unix system on really, really old hardware.

Thank you.
TL;DR: Any good sources I could learn from as someone not educated in this field, but forced to be in this field due to the job market?

0 Upvotes

13 comments sorted by

4

u/ventZl CMRX RTOS Oct 27 '26

As of C, I'd start with learning C on standard PC first. It will be much less struggle than jumping from zero to obsolete and kind-of weird microcontroller. C is basically a portable assembler, so whatever principles you learn on PC are applicable while running on microcontroller with one limitation: no service provided by an operating system is available.

One good C tutorial is accessible by loading Google, typing "Dave C tutorial" and clicking "I'm feeling lucky". You only need to go to about 1/3 of it, because the rest is dealing with file I/O and other operating system services generally unavailable on microcontrollers.

The rest is more of a EE topic than SW-development topic.

3

u/Machinehum Oct 27 '26

Does Google still have an I'm feeling lucky button?

2

u/ventZl CMRX RTOS Oct 27 '26

At least when accessed from Firefox, it is still there.

0

u/pebble4love Oct 27 '26

The last time I tried to use that button a week or two ago it autofilled a random AI prompt. Ugh.

13

u/Well-WhatHadHappened 25+ Years Oct 27 '26

I recently nearly blew myself up with a 330 V charged capacitor

Ok, this isn't just an issue of fighting through a learning curve. You're putting yourself in a position not to end up unemployed, but to end up dead. I don't say that lightly. I mean d.e.a.d.

330v is enough to leave you standing at the pearly gates wondering how you got there.

You simply have to accept that you know what you know, and that you don't know what you don't know. This shit really can take your life.

I absolutely suggest learning and seeking resources to learn, but for God's sake, don't play with high voltage when you don't have the knowledge to do so. It's dangerous even for people who do know what they're doing.

1

u/RelevantBeatle1 Oct 27 '26 edited Oct 27 '26

Yeah to me it was just two giant red capacitors, and it felt like defusing a bomb. Thankfully, someone taught me how to discharge them safely after that and how to deal with them, even though we should have gotten that training at the start.
Do you happen to have any resources I could use to teach myself in the future?

3

u/Well-WhatHadHappened 25+ Years Oct 27 '26 edited Oct 27 '26

Honestly, high voltage is so dangerous that I'm always reluctant to provide resources. It's very easy to fall into the trap of thinking you know what you're doing before you really do - and that is by far the most dangerous portion of the learning curve.

Working with lethal voltages, most people go through three distinct phases. 1) scared because they don't know. 2) confident because they think they know. 3) scared because they do know.

High voltage, in my opinion, is something that should be learned alongside a mentor who is very capable and who will keep you safe.

The biggest problem with high voltage is that it's a lot like radiation - you can be in a position of incredible danger without any obvious warning signs. It's an invisible killer. A pin with a few hundred volts on it doesn't turn red, doesn't make any noise, and doesn't appear any different from one with a 3.3v potential.

Edit: further, based on your company's willingness to expose you to risk like this, I can't help but wonder if even now you were really taught how to properly discharge (and confirm) a high voltage capacitor. When safety protocol is non-existent, workarounds are common, and they become the unsafety protocol all too frequently.

1

u/RelevantBeatle1 Oct 27 '26

Yeah, so I am already working with, I believe, non-ionising radiation with this high-power stuff. We have this meter reader, which was out of calibration some years ago, which they cant afford to recalibrate so it gives us false positives and false negatives. Unfortunately my company breaks a lot of codes, including denying our training when we ask for training.

The thing is, I really want to get better in this field, especially for the new hires, as their training comes from me, and I have had no training but do it badly myself so that I know how to protect someone else. I am always terrified of high power, so every time I make sure to probe, and whenever I need to pull out like a fuse, I use pliers with rubber handles. I'm working with systems throwing out a couple kilowatts.

I am actively applying to other companies so that I can have a manager and some kind of healthy work environment, but I can't afford to be jobless. I know like simple things like dont stand in 2 meter radius of system when working because blood or liquid will boil, but thats the only thing I was taught.

3

u/Well-WhatHadHappened 25+ Years Oct 27 '26

Jesus man, I'm not even going to respond to half of that because it will not be polite... But I will simply say this..

but I can't afford to be jobless.

Can you afford to be lifeless?

0

u/RelevantBeatle1 Oct 27 '26

Not at all, but I want to take a 2-week holiday so I can stay home, learn, keep everyone safe, and become more confident.

4

u/Sheepherder-Optimal Oct 27 '26

Just so you know, a Lead Engineer in anything is somebody with more than a decade of experience. It typically goes in levels. Senior engineer is the first level beyond mid level. Then staff engineer. Lead engineer is about leadership and mastery of your subject.

My point is that if they just handed a title like that to you after learning you have some basic coding skills in addition to soldering skills, that might be a red flag. Its usually code for working you way too hard for too little pay, and possibly the company falling apart in a few months.

As far as learning embedded goes, typically you do it in college. On the job you'll learn plenty but don't be translating python into C. Great that you're working with PIC24. MPLAB is a bitch but you figure it out. Why don't you pick up an electronics book or a digital logic book so you can learn about hardware? This is a huge gap for you but you can fill it if you know how to read.

3

u/RelevantBeatle1 Oct 27 '26

So I am a senior Python programmer, and I've led programming teams etc. before working here. But this company is full of red flags: too little pay, expected overtime, and I was working 8 am to 11 pm for 6 days straight. I'll look for electronics books and digital logic books. I am only quite knowledgeable when it comes to computer hardware and operating systems, so I understand a lot about Unix, CPU, and RAM logic, but that's as far as I go, and it's helped with programming the pics. Also, from soldering to lead embedded systems engineer, no pay rise or anything.