LV1ZAD4 Adam Stanic, Alen Sjenicaku

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #define dp23 P0_0
00003  
00004 BusOut bus(dp23,dp24,dp25,dp26,dp27,dp5,dp6,dp28);
00005 DigitalOut enable(dp14);
00006 
00007 
00008 int main()
00009 {
00010     int brojac=1;
00011     enable=0;
00012 
00013     while(1)
00014     {
00015         for(brojac=1; brojac<=256 ;brojac=brojac*2)
00016         if(brojac == 256) 
00017         {
00018             brojac=1;
00019         }
00020         bus=brojac;
00021         wait(1);
00022     }
00023     
00024 }