I built myself a nice little Boarduino and am now trying to program it. Everything works perfect in the Arduino development environment when using the Arduino's own system calls (the stuff from http://www.arduino.cc/en/Reference/HomePage). I can upload code to board, run programs etc.
I would like to move on to AVR libc and deploy more low-level code, but I am having trouble figuring out how exactly the development toolchain works. As far as I understand, I can just #include the relevant avr libraries and enter the code directly in the Arduino dev. environment. However, when I enter the following code...
- Code: Select all
const int ledPin = 13; // LED connected to digital pin 13
void setup() // run once, when the sketch starts
pinMode(ledPin, OUTPUT); // sets the digital pin as output
digitalWrite(ledPin, LOW); // make sure it's low before going to use the
// libc calls
DDB |= 0b100000; // pinMode(13, OUTPUT)
PORTB |= 0b100000; // digitalWrite(13,1);
void loop() // run over and over again
The Arduino compiler says: "error: invalid suffix "b100000" on integer constant In function 'void setup()':"
I am sure it's something simple I'd need to do... any hints?