ASCII Serial Com
Serial communication library between computers, microcontrollers, FPGAs, etc. Uses only ASCII. Not the most efficient protocol, but meant to be easy to read
|
#include <avr/io.h>
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | TIMER0_Init(cs, ctc, timsk0) |
Initialize Timer0. | |
#define TIMER0_Init | ( | cs, | |
ctc, | |||
timsk0 ) |
Initialize Timer0.
Normal waveform gen mode (WGM2:1 are 0)
cs | 3 bits: 0: no timer, 1: no prescale, 2, /8 prescale 3: /64 prescale 4: /256 prescale 5: /1024 prescale |
ctc | (1 bit); 1: clear counter when counter reaches OCR0A; 0: clear counter when read 255 |
timsk0 | bits enable interrupts: bit 0: interrup on overflow bit 1: interrupt on match OCR0A bit 2: interrupt on match OCR0B |
OCR0A and OCR0B are writable compare registers to set when interrupt and ctc happens
Definition at line 28 of file avr_timers.h.