/* * CI - Laborator 4a -Extensie de intrumentatie prevazuta cu * byte led display. Se realizeaza un numarator binar pe cele 8 LED-uri * Conexiuni led bus: * D0 - P1.1 D5 - P0.6 * D1 - P1.9 D6 - P0.2 * D2 - P0.8 D7 - P0.4 * D3 - P3.4 * D4 -P0.12 * * LED -urile sunt active in 1 logic. * */ #include void delay(int j) { for (int i=0;i<0x3fffff*j;i++); // temporizare in s } int k; int main(void) { DAVE_STATUS_t status; status = DAVE_Init(); /* Initialization of DAVE APPs */ if(status == DAVE_STATUS_FAILURE) { /* Placeholder for error handler code. The while loop below can be replaced with an user error handler. */ XMC_DEBUG("DAVE APPs initialization failed\n"); while(1U) { } } /* Placeholderuser application code. */ while(1U) { for(int j=0;j<=0xff;j++) { BUS_IO_Write (&bus, j); //afisez data pe 8 lED delay(1); } } return (1); }