Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Learning Embedded C and everything else

Status
Not open for further replies.

cheece2001

Junior Member level 1
Joined
Oct 2, 2012
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,402
Right now I'm stuck with a few options.

My goal is to be able to programming uC but I need to pretty much relearn C because I did it a while back.

Right now i'm going over 8051 and was thinking of going over the entire C kandR book.

In the book they just have things that will get you started with programming and isn't really geared specifically for embedded stuff.

Then I found this book: Embedded C Programming & Microchip Pic

This book also teaches C with embedded programming in mind.

Should I just go through this book instead of the standard C book if i want to program uC?

What i want to avoid is going through the standard C book and then find out out i'm missing a bunch of knowledge.

Or do you guys think 8051 and the standard c book is good enough.

My plan was to go over 8051, Embedded C Programming & Microchip Pic BOOK and after do the googlium as my journey to being comfortable with programming microchip micros.

Just looking for an option that will be time effective.

What are all your opinions.

Oh yea and in the mean time I'm going over the art of electronics book second edition to rigidize my hardware knowledge which is also a little bit lacking.

My end goal is go by going over art of electronics be able to do simple designs, by going over C for embedded to be able to program micros and layouts aren't really a problem for me. Just need to fill in the gaps that I have to be able to be a designer and stand on my own feet as a whole package and then grow from there.

Opinions and suggestions will extremely help me and I thank you in advance for taking to time to read this.
 

A lot has changed since K&R days, unfortunately. What was a nice "portable assembler" has grown beyond belief and reason until you need language lawyers.

To get a feel for that, have a look at https://yosefk.com/c++fqa/ which is relevant because of the close relationship between C and C++.

I'm particularly fond of the section on "const correctness", https://yosefk.com/c++fqa/const.html
 

ok i'll look into your resources for recent changes. I'm still stuck.. lol
 

A lot has changed since K&R days, unfortunately. What was a nice "portable assembler" has grown beyond belief and reason until you need language lawyers.

ANSI C is still the valid C standard, and it's 99% K&R. Mastering this stuff is the foundation, either if you want to use the ++ language extensions or not. There are a few changes, things you become aware of when using a recent compiler or porting code.

Most people learn a programming language by solving coding problems. If you use the books mainly as a reference or by systematically reading a number of chapters is a matter of learning style, both is possible.
 
This book i found teaches you C with the intent that you will do embedded programming.

So what i'm going to do is go over the book "Embedded C Programming & Microchip Pic" while i'm going through 8051 stuff. I found over 600+ slides that this guy created that goes over Mazidi's entire book so i'll just go through that.

Defintly will buy a 8051 dev board and get some mini project done and I also bought googlium and will also go through all that material and get a PIC project done.

Along side all that i will be going through the art of electronics book second edition that I have.

I just finalized my learning strategy to being a designer and hopefully in time and this dedication i will put in will be worth it. I'm sure it will.. just have to be consistent.

I have selected my arsenal.
 

Defintly will buy a 8051 dev board and get some mini project done and I also bought googlium and will also go through all that material and get a PIC project done.


I just finalized my learning strategy to being a designer and hopefully in time .....

mixing two controllers (PIC and 8051) while learning may not lead to the goal.

learn only one controller first and preferably stick to it for a sufficint time until u get expertise.

one cannot be a master of embedded c without the knowledge of the underlying controller.
 
Makes sense. I'll do one at a time. First i'll go through those 600+ slides on the 8051 and today i'll order a usb to serial adapter for my laptop, buy pickit 3 (i'll need it later), buy the atmel 8051 chip and a few parts and grab the 5 v from the pickit 3 to power the chip and go from there. Looking to go cheap.

Then after i get comfortable with that I'll learn C for the pic and then go from there.

Thanks for your suggestion.
 

Makes sense. I'll do one at a time.... Looking to go cheap.

in which case , you need not buy the kit right at the beginning stage.

write programs after learning and use a 'simulator'to test your basic codes.
this is zero cost solution.
 
in which case , you need not buy the kit right at the beginning stage.

write programs after learning and use a 'simulator'to test your basic codes.
this is zero cost solution.

So would this be a good simulator, https://www.edsim51.com/ ?

Or do you have something you can recommend.

Good idea though.
 

Proteus is a good simulator. You can draw the schematic in it and do the simulation. If your compiler generates .cof file then you can load .cof file into it and debug the code step by step and watch what happens to the registers. Proteus demo version can be downloaded from http://labcenter.co.uk
 
ANSI C is still the valid C standard, and it's 99% K&R. Mastering this stuff is the foundation, either if you want to use the ++ language extensions or not. There are a few changes, things you become aware of when using a recent compiler or porting code.

Most people learn a programming language by solving coding problems. If you use the books mainly as a reference or by systematically reading a number of chapters is a matter of learning style, both is possible.

There are many C standards since K&R, each adding significant new features. I know; I started prigramming in C 33 years ago when there were precisely 2 books on C: K&R and The C Puzzle Book.

One problem with C is that it is very easy to think you have solved your coding problem - only to have a late surprise when hopefully you discover an error. That kind of thing can and does occur when recompiling with a different compiler, a later version of the "same" compiler, or with different command line arguments.

One simple example... C (until very recently) explicitly made no guarantees about multithreaded operation (although different implementations made differing guarantees). All the multithreading libraries (e.g. POSIX) had to make presumptions about how the code would run - even though they weren't guaranteed by the language. Oops.

The C++ FQA is a starting point which alerts people to the contentious statements made about C.
 

wow sounds good. I allready have alot of resources now to work with. Looks like i don't need to buy anything. niceee

8051 here i come.
 

So would this be a good simulator, https://www.edsim51.com/ ?

Or do you have something you can recommend.

Good idea though.
edsim51 is good.
there are many many simulators with varying degrees of fecilities for the microcontrollers.

from the simple s51 (or edsim51) to full fledged proteus or keil based ones.

in selecting , the simulator should not distract your learning goal.

i mean , some simulators have lot of fecilities , resulting , the learner to concentrate on learning the simulator commands , menu etc , taking away the time meant for your target controller coding.

for a learner , (this is my opinion) , select a simple tool which has minimum fecilities and start learning the controller programming.

many select the demo version of the proessional , all feature , controller dev tools and end up in fighting with it for doing even some basic tasks.
remember they are very good in an industry environment but not preferrable for the beginners.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top