Close

Drawing a pixel

A project log for Library files of LPC2148 for HUB75 Based RGB Panel

Library files of LPC2148 for driving graphics in HUB75 based RGB LED panels

palpoulamipalpoulami 11/17/2017 at 16:470 Comments

__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