// NeoPixel1.C // // This program drives a NeoPixel connected to RD0 // The color sent to the NeoPixel changes from red // to green to blue and repeats // // Global Variables unsigned char PIXEL @ 0x000; const unsigned char MSG0[20] = "NeoPixel1.C "; const unsigned char MSG1[20] = "Level: "; // Subroutine Declarationsb #include // Subroutines #include "lcd_portd.c" void NeoPixel_Display(unsigned char RED, unsigned char GREEN, unsigned char BLUE) { PIXEL = GREEN; asm(" call Pixel_8 "); PIXEL = RED; asm(" call Pixel_8 "); PIXEL = BLUE; asm(" call Pixel_8 "); asm(" return"); #asm Pixel_8: call Pixel_1 call Pixel_1 call Pixel_1 call Pixel_1 call Pixel_1 call Pixel_1 call Pixel_1 call Pixel_1 return Pixel_1: bsf ((c:3971)),0 ; PORTD,0 nop btfss ((c:0000)),7 bcf ((c:3971)),0 rlncf ((c:0000)),F nop nop bcf ((c:3971)),0 return #endasm } void Wait(unsigned int X) { unsigned int i, j; for (i=0; i