Getting Started

(lily) #1

Chapter 9 – Digital Meets Analog – ADC and DAC


id enough to send it an array that
as too small, and if they are that dumb, they deserve what they get. C is fast,
was designed to take out some of the meanness by forcing
atures that protect the programmer from himself, but this was done at the

ly won’t be using C to write programs for windows based programs on a
where you’ve got plenty of hardware speed and memory and high level
d speed and memory,
that the arguments for the

choose


Debugg
deadlin
enough
and pa
will dri
underst
C prog
te shingles on roofs
I understand that alcohol also helps as does having an obsessive-
pulsive disorder. Speaking of which, Let’s move on to the next project.


nalo


igital Conversion?

gital
of bringing up Heraclitus and Democritus and the
al nature of reality: is reality made of a
ntinu or of bits of multiple things (digital). He
ook
some s


Why, you may ask, didn’t the designers of the standard library require the itoa
function to check the size of the array before using it? Good question. My guess is
that the standard library functions were written to be as fast and small as possible.
They also likely assumed nobody would be stup
w
small, and mean. C++
fe
expense of size, speed, and simplicity. Other higher-level languages provide even
more protection and are even larger, slower, and more complex. You almost
certain
PC
development tools, but for microcontrollers with their
fs. I acknowledge


limite
C probably has the best set of tradeof
choice of a programming language borders on the religious, so I say that if you
not to use C, you will be eternally damned.


ing can be a maddeningly frustrating process, especially if you are on a
e. I spent half a day finding this problem. I didn’t make my array large

. HALF A DAY! Am I stupid? No, I’m not. This kind of debugging is part
rcel of working with microcontrollers. If you have the wrong attitude, you
ve yourself nuts trying to find these bugs. What is the right attitude? It is to
and that you have to be really smart, work very hard, and know a lot about
ramming and microcontrollers to make a mistake this dumb. You have to
keep lling yourself over and over: “This is better than putting
in the summer.”
com


Analog to Digital Conversion


What is Analog to D


During a discussion with one of my EE professors about Analog to Di
Conversion, I made the mistake
ancient debate about the fundament
co um of a single thing (analog)
sh his head, as my profs often did, and said, “Son, I don’t give a damn what
heep header said 3,000 years ago, this IS an analog world!” Humpf! I say it

Free download pdf