/** * This is the main Blank Simple C++ Project program file. */ #include // Recommended over iostream for saving space #include // Propeller-specific functions #include /* #define Pin_R1 output(4) #define Pin_G1 output(5) #define Pin_B1 output(6) #define Pin_R2 output(7) #define Pin_G2 output(8) #define Pin_B2 output(9) #define Pin_A output(10) #define Pin_B output(11) #define Pin_C output(12) #define Pin_CLK output(13) #define Pin_LE output(14) #define Pin_EN output(15) */ int main(){ //clk mode? // CLKFREQ = 80000000; //set all pins to low set_directions(15,4, 0b111111111111); set_outputs(15,4, 0b000000000000); /*low(4); low(5); low(6); low(7); low(8); low(9); low(10); low(11); low(12); low(13); low(14); low(15);*/ //select 1 of 8 sections low(10);//A low(11);//B low(12);//C //set R1 high, clock, latch, and enable //disable output high(15); //shift in some data high(6); high(7); //repeat1 for(int i=0;i<=1;i++) { freqout(13,1000,80000); /* high(13); low(13);*/ } // low(6); low(7); //repeat 31 for(int i=0;i<=31;i++) { freqout(13,1000,80000); /* high(13); low(13);*/ } //latch data for(int i=0;i<=1;i++) { high(14); low(14); } //enable the display low(15); //Need to toggle the A line or else the protection circuit will turn off the de-multiplexer high(10);//A high high(11);//B high high(12);//C high return 0; }