/*L2b- XMC2Go byte - utilizare componenta BUS pentru tratare evenimente de intrare; * * Conexiuni: * D0-P0.6 * D1-P0.7 * D2-P0.8 * D3-P0.9 * D4-P0.14 * D5-P0.15 * D6-P2.0 * D7-P2.10 * Microintrerupator conectat intre P0.5 si GND * */ #include int main(void) { int i,j; DAVE_Init(); BUS_IO_Write (&byte, 0xFF); //sting leduri i=0; while(1U) { if(DIGITAL_IO_GetInput (&k)==0) // generare eveniment { while (DIGITAL_IO_GetInput (&k)==0); // terminare eveniment i++; BUS_IO_Write (&byte,i^0xff); //actiune raspuns } if(i==256) // initializare display i=0; } return 1; }