0 Members and 1 Guest are viewing this topic.
#include <SID.h>#define SOUND 1#define MIDI 0// MACROs#define PIN2H (PIND & 0B00000100)#define PIN3L !(PIND & 0B00001000)#define CLR(x,y) (x&=(~(1<<y)))#define SET(x,y) (x|=(1<<y))SID mySid;void setup() { pinMode(2,INPUT); pinMode(3,INPUT); mySid.begin();}int n=0;int timer=0;int count=0;int dcount=0;byte get=B00000000;int addrval[3] = {0,0,0}; #define CHANNEL1 0 #define CHANNEL2 7 #define CHANNEL3 14void loop(){ do{ do { if (PIN3L) { if (PIN2H) { CLR(get,count); } else { SET(get,count); } count++; while(PIN3L) { timer++; if (timer==500){ n=count=0; break; } } timer=0; } }while(count!=8); addrval[n]=get; n++; count=0; }while(n!=2); mySid.set_register(addrval[0], addrval[1]); n=0;}
Nice! Now just build it INSIDE of a calculator
Ninja'd you. I already made it