[sdiy] how to learn C?

Scott Gravenhorst music.maker at gte.net
Sat Jan 8 23:54:24 CET 2011


Looking at Dan's question - I didn't answer very well.

I can best answer by describing how I learned C.

First - Ya gotta wanna.  Seems to me Dan has that.

I used a book called _Learn_C_Now_.  I read the book while sitting at my
computer.  As I read the book, I typed in and compiled a lot of the book's
complete code, especially the little ones.  Then I messed with the code,
compiled and tested it.  Did this many times until I could say to myself,
"I understand this bit".  Then I wrote, from scratch and debugged little
test programs, "Hello World" stuff of my own design.  Eventually, I was
writing everything in C.  However - I did this on a PC for a PC processor.  

Embedded work is a little different because you're dealing with hardware
like DAC, ADC, serial device, LEDs, LCD, etc.  For this, you use libraries
and it becomes a matter of function calls.  Here I would also start with
"hello world" stuff first.  See if you can blink an LED at exactly 1 second
intervals forever.  Stuff like that.  Write simple code to test different
I/O devices you have.  Never give up.

-- ScottG
________________________________________________________________________
-- Scott Gravenhorst
-- FPGA MIDI Synthesizer Information: home1.gte.net/res0658s/FPGA_synth/
-- FatMan: home1.gte.net/res0658s/fatman/
-- NonFatMan: home1.gte.net/res0658s/electronics/
-- When the going gets tough, the tough use the command line.




More information about the Synth-diy mailing list