Craig's Arduino Software Reference

Serial void begin(long speed);

void end(void);

int available(void);

int read(void);

Returns the next byte or -1 if no data is available

int peek(void);

void flush(void);

size_t print(); size_t print(const char *); size_t print(char); size_t print(unsigned char, int); size_t print(unsigned char); size_t print(int, int); size_t print(int); size_t print(unsigned int, int); size_t print(unsigned int); size_t print(long, int); size_t print(unsigned long, int); size_t print(double, int); size_t print(const Printable&);

size_t println();

size_t write(uint8_t);
size_t write(const char *);
size_t write(const uint8_t *buffer, size_t size);

Links


Timers

With a 16 MHz clock, clockCyclesPerMicrosecond() is 16000000 / 1000000 or 16 clock cycles per microsecond.

Interrupts


ATmega328P
General
Physical Logical Function Description
7   VCC +5V
8   GND  
20   AVCC +5V
21   AREF  
22   GND  
Port D
Physical Logical Function Description
2 0 RX RS-232
3 1 TX RS-232
4 2 d2  
5 3 d3  
6 4 d4  
11 5 d5  
12 6 d6  
13 7 d7  
Port B
Physical Logical Function Description
9   XTAL1  
10   XTAL2  
14 8 d8  
15 9 d9  
16 10 d10  
17 11 MOSI SPI
18 12 MISO SPI
19 13 SCK SPI
Port C
Physical Logical Function Description
1   RESET  
23 14 a0  
24 15 a1  
25 16 a2  
26 17 a3  
27 18 SDA TWI
28 19 SCL TWI


Copyright © 2012
Craig Leres