__irq void timer0ISR(void){
long int readVal;
if(pixel<256){
if(pixel<3)
FIO0SET = 0x00040000; //rgb
else
FIO0CLR = 0x00FC0000; //rgb
FIO1SET = 0x00010000; //clock 1
FIO1CLR = 0x00010000; //clock 0
if((pixel==31)||(pixel==63)||(pixel==95)||(pixel==127)||(pixel==159)||(pixel==191)||(pixel==223)||(pixel==255))
latch();
}
else pixel=0;
pixel++;
readVal = T0IR; // Read current IR value
T0IR = readVal; // Write back to IR to clear Interrupt Flag
VICVectAddr = 0x0; // End of interrupt execution
}
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.