/* TinyMixer.c - Copyright (c) 2014 Mark Moran Redistribution and use in source and binary forms, with or without modification, are permitted freely. Written for ATtiny13 running at 9.6MHz (internal RC), assumes RSTDSBL fuset is set (using PB5) */ #include #include #include #define REDIN PB5 #define GREENIN PB3 #define BLUEIN PB4 #define REDOUT PB2 #define GREENOUT PB1 #define BLUEOUT PB0 #define REDCH 0 #define GREENCH 3 #define BLUECH 2 // 0 = on all the time (port is low), 255 = off all time time (port is high) volatile uint8_t count = 255, red = 255, green = 255, blue = 255; ISR(TIM0_OVF_vect) { if (count==255) { count = 0; PORTB |= (1<