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.

how to learn C language ?

Status
Not open for further replies.
Be careful with Schildt books. They tend to be very friendly easy to read books, but teach you some bad habits.
 

The best way to learn C, is "learning by doing".
When you have a good C book, the you should program and test all the examples along you read the chapters.
Don't read a whole book and first then start programming, it's much easier to learn the languesges by programming the examples and excercises from the book.
If you just read a book without programming excercises after each chapter or while you read the chapter, then you will learn very little.
Learning is also much more fun when you program instead of just reading.
Try to make your own changes to the excercices to learn more and understand the language.
You don't need to learn all the commands before you can make the first simple examples.
Books are usally made so they start with very simple examples with very few commands, they don't expect you to know all commands to do the first programming.
I would reccomend you to do all the programming for a PC and use a dos window as output display and keyboard as input.
Don't start using any embedded microcontrollers before you have finished the book and made the examples on the PC.
There's much more that can go wrong at an embedded system. It's easier to debug PC dos code. The book will explain you how to use the screen and keyboard very simple with build ín standard C library functions.
Wait reading any books about embedded programming until you have learned the C language.
After that you can move on to program small microcontrollers instead of programming the PC.
Get Microsoft Visual C/C++ compiler or Borland C/C++ compiler or a similar one for C programming. Some are free and some can be expensive.
There can besome dificaulties compiling your firts program, because you might have to do some settings in the compiler IDE before it's set up in the right way.
This might be explained in your textbook.
The book I used was Ditel's "C++ How to Program", and it included a CD-ROm with a free Microsoft Visual C++ Introdutory Edition.
I think the book also explained how to use Borland instead, but I'm not sure.
 

Hi
I think learning programming is like learning any language e.g. u have to learn Hindi then u first go for alphabets, then u know how words form...after that sentence come and look! With determination u r writing the whole book..
That’s the life goes...
ASC
mail me at magic_onnet@yahoo.com
 

As a Hardware Engineering, you need to know c, this language gives to you all programation power that you need to have fun with yours computer hardware.

A good Book is the Deitel's "how to program in C".

Good Luck!
 

start with c++. learn visual c++ 21 lesson is a good begining..
 

for a HW engineer, following software abilities should acquire:
1. assembler: to know how a mcu/cpu runs
2. C: to know what achitecture featurs are suitable for a mcu/cpu. and it's the primary programing language for firmware.
3. script language(s): TCL, perl, ruby, python... TCL is the script language of almost EDA SWs. and the others can improve your productivity greatly.
 

vale said:
3. script language(s): TCL, perl, ruby, python... TCL is the script language of almost EDA SWs. and the others can improve your productivity greatly.
What should a HW engineer use these languges for? And how do they improve produtivity?
I know some assembley, C/C++ and VHDL, but know nothing about script languges and what I should use them for as a HW engineer.
At my engineering college they teach assembly and C/C++ but they don't teach anything about these script languages. What should a HW engineer use them for?
 

it's just the problem to me;
I just study it through books&web, so my knowledge about that is not systematic!
 

ME said:
vale said:
3. script language(s): TCL, perl, ruby, python... TCL is the script language of almost EDA SWs. and the others can improve your productivity greatly.
What should a HW engineer use these languges for? And how do they improve produtivity?
I know some assembley, C/C++ and VHDL, but know nothing about script languges and what I should use them for as a HW engineer.
At my engineering college they teach assembly and C/C++ but they don't teach anything about these script languages. What should a HW engineer use them for?

Generally, all engineers (hw, sw, ic.. ) should know a(some) script language(s), in my opion. I list some usages in my own work:
1. EDA scritp file: auto compile/configurate/synthesis design. anyone work on asic or fpga should use it. Those click GUI buttons must be newbie.
2. I need access my hw boards through 232 or usb, etc.... Accessing serial port needs hundreds of lines by C/C++, while only no more than 10 lines in a script language.
3. I design a 32-bit RISC core. And I use less 1000 Ruby code lines to implement a system level verification model, including a assembler and debug and test-case generation environment. It will be a nightmare if I use C/C++.
4. I developed a universal testing/verification platform by Tcl. The benefits are:
a) testbenchs of all kinds of chips are almost same, whose main tasks are providing communication between tcl platform and DUT.
b) All my testcases are written in Tcl, enabling powerful programming ability (variables, loop, conditional execution, random generation, algorithms invoking...)
c) testcases are shared between software verification, FPGA emulation board and wafer testing.
5. many other small tasks, such as file processing, date conversion...
In short, try a script language, you will get the productivity.
 

hi vale,

oooh, script programming is needed for EDA engineers. I try to learn it but I do not know where I can start.
Can you give me some advices and some documents to start with Tcl programming. I use Cadence tools for my works.

tks in advance,
 

tutx said:
hi vale,

oooh, script programming is needed for EDA engineers. I try to learn it but I do not know where I can start.
Can you give me some advices and some documents to start with Tcl programming. I use Cadence tools for my works.

tks in advance,

you can download a free distribution containing many useful packages and a good manual:
https://www.activestate.com/Products/ActiveTcl/
I remember that there is a tcl book on eadboard. you can search it.
Tcl is a very easy language. You can learn it in half a day.
 

I suggest Kernighan and Ritchie because its available online. And the best way to learn is to write programs.
 

Studying C language is very easy, but it is a little difficult if you want to apply it into the hardware.
I need you have necessary hardware knowledge.
and you should uderstand the function principle of C in hardware design.
 

For me,
I know C by reading Teaching yourself C in 21 days. This is the easiest found document on the net. Its structure is easy to follow. However this is just the beginning. But I'm sure that it is the basic you must have. If anyone reads this book and has some question, just send questions to me by this address hoangviendu@yahoo.com
 

systemc and c have many differences, and there are also many difference in c and C++. for a hardware engineer, i think it is not necessary to learn c++.
 

To learn any programing language is like learning any other language

learn how can you make snetence in language
learn how can you make statment in programing language

learn idioms in programing language have good knowledge of Algo
also type programs compile them and try to understand what you code is doing

Added after 30 seconds:

To learn any programing language is like learning any other language

learn how can you make snetence in language
learn how can you make statment in programing language

learn idioms in programing language have good knowledge of Algo
also type programs compile them and try to understand what you code is doing
 

i recommend you to start with C, because it is the most basic language. Once you learn and play around with C for a while, you can go for C++ which is the basic of object oriented language. This is my 2cents
 

Deitel's How to program C is very easy to learn C in the first step!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top