void procesar_comando(void)
{
for ( char i=0; i<16; i++)
{
LCD_LUZ = (bool)((unsigned int)dato.variable & ((unsigned int)1 << i));
PORTBbits.RB3 = 1; __delay_ms( 500 );
PORTBbits.RB3 = 0; __delay_ms( 500 );
}
// #######################
// #### ESTO FUNCIONA ####
// #######################
// LCD_LUZ = dato.d0; PORTBbits.RB3 = 1; __delay_ms( 500 ); PORTBbits.RB3 = 0; __delay_ms( 500 );
// LCD_LUZ = dato.d1; PORTBbits.RB3 = 1; __delay_ms( 500 ); PORTBbits.RB3 = 0; __delay_ms( 500 );
// LCD_LUZ = dato.d2; PORTBbits.RB3 = 1; __delay_ms( 500 ); PORTBbits.RB3 = 0; __delay_ms( 500 );
// LCD_LUZ = dato.d3; PORTBbits.RB3 = 1; __delay_ms( 500 ); PORTBbits.RB3 = 0; __delay_ms( 500 );
// LCD_LUZ = dato.d4; PORTBbits.RB3 = 1; __delay_ms( 500 ); PORTBbits.RB3 = 0; __delay_ms( 500 );
// LCD_LUZ = dato.d5; PORTBbits.RB3 = 1; __delay_ms( 500 ); PORTBbits.RB3 = 0; __delay_ms( 500 );
// LCD_LUZ = dato.d6; PORTBbits.RB3 = 1; __delay_ms( 500 ); PORTBbits.RB3 = 0; __delay_ms( 500 );
// LCD_LUZ = dato.d7; PORTBbits.RB3 = 1; __delay_ms( 500 ); PORTBbits.RB3 = 0; __delay_ms( 500 );
// LCD_LUZ = dato.d8; PORTBbits.RB3 = 1; __delay_ms( 500 ); PORTBbits.RB3 = 0; __delay_ms( 500 );
// LCD_LUZ = dato.d9; PORTBbits.RB3 = 1; __delay_ms( 500 ); PORTBbits.RB3 = 0; __delay_ms( 500 );
// LCD_LUZ = dato.d10; PORTBbits.RB3 = 1; __delay_ms( 500 ); PORTBbits.RB3 = 0; __delay_ms( 500 );
// LCD_LUZ = dato.d11; PORTBbits.RB3 = 1; __delay_ms( 500 ); PORTBbits.RB3 = 0; __delay_ms( 500 );
// LCD_LUZ = dato.d12; PORTBbits.RB3 = 1; __delay_ms( 500 ); PORTBbits.RB3 = 0; __delay_ms( 500 );
// LCD_LUZ = dato.d13; PORTBbits.RB3 = 1; __delay_ms( 500 ); PORTBbits.RB3 = 0; __delay_ms( 500 );
// LCD_LUZ = dato.d14; PORTBbits.RB3 = 1; __delay_ms( 500 ); PORTBbits.RB3 = 0; __delay_ms( 500 );
// LCD_LUZ = dato.d15; PORTBbits.RB3 = 1; __delay_ms( 500 ); PORTBbits.RB3 = 0; __delay_ms( 500 );
}