Things I've Learned Working With Embedded Systems
So here will be a collection of things I've learned while working on an embedded system, so far just wiring it up and testing the chip. For those interested I'm using an ATMEGA8-16PI.
- LEDs do have polarity, and if you get it wrong they don't flash, and it dosn't mean your code is wrong.
- The logical or "||" and the bitwise or "|" do NOT mean the same thing and writing: DDRB = 0x1 || 0x2 || 0x4 will not enable ports 1, 2, and 3, but only port 1, since 0x1 || 0x2 || 0x4 == 1. This makes you think the ports are bad, when really you wanted 0x1 | 0x2 | 0x4.