Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# microcontrollers-labs-part2
# Lab 1
Binary file added TopDesign.cysch
Binary file not shown.
37 changes: 37 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
#include "project.h"

int main(void)
{
/* Place your initialization/startup code here (e.g. MyInst_Start()) */

uint8 registerValue;
LED_Write(0);

for(;;)
{
registerValue = Input_Buttons_Read();
if ((registerValue == 0b00110) || (registerValue == 0b01110) || (registerValue == 0b10101)
|| (registerValue == 0b00111) || (registerValue == 0b11100))
{

LED_Write(1);
}
else
{
LED_Write(0);
}
}
}

/* [] END OF FILE */
11 changes: 11 additions & 0 deletions task.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
buttons = [A, B, C, D, E]

_ _ _ _ _ _ _ _ _ _ _ _ _ _
A*B*C*D*E + A*B*C*D*E + A*B*C*D*E + A*B*C*D*E + A*B*C*D*E

ABCDE LED
00110 1
01110 1
10101 1
00111 1
11100 1