Beginning Embedded Electronics - 11
by Nate | June 19, 2008 | 4 comments
Skill Level:
Beginner
Lecture 1 - Background and Power Supply
Lecture 2 - How to Get Code Onto a Microcontroller
Lecture 3 - What is an oscillator?
Lecture 4 - UART and Serial Communication
Lecture 5 - AVR GCC Compiling
Lecture 6 - Soldering Basics
Lecture 7 - SMD Soldering
Lecture 8 - Eagle: Schematics
Lecture 9 - Eagle: PCB Layout
Lecture 10 - Eagle: Creating a new part
Common Mistakes, Tips and Tricks
Comments 4 comments
Hey guys. These are a great selection of tips, I found a few of them useful even at my early stage. As a computer science student however, I have to know: Why does the for-loop in 7 increment indefinitely? I’m not very intimate with the characteristics of an 8-bit integer. With the data sets we work with, I find myself more commonly using 16- and 32-bit integers. Is it simply because of the limited range of the 8-bit integer? If so would not for(x = 0; x < 256; x++) also loop indefinitely? Great advice and great tutorials. I’ve spent nearly $100 at this site already, and it was worth every penny.
If an 8-bit integer is 255, and you increment it, it will rollover and become 0. 8-bit integers can only hold a value from 0 to 255. The condition part of the loop would have to be “x < 255” or lower.
You forgot to take into account that, by default, an 8-bit integer is signed, so +/– 127 is safe
In my schematic I use the FTDI_BASIC for the Sparkfun.lbr. However, I noticed that in the package the pins names are backwards.
GRN is named DTS and ect.