Hi all,
Can someone explain the following code,kindly explain line by line.Since i'm new to hardware programming.
/* Initialize timer for GPIO toggling timing */ enable_timer( 0 );
counter = 0; FIO2SET = 1 << counter; // #define FIO2SET (*(volatile unsigned long *)(FIO_BASE_ADDR + 0x58)) while ( 1 ) { if ( timer0_counter >= (0x20 * counter) ) { FIO2SET = 1 << counter; counter++; if ( counter > 8 ) { counter = 0; timer0_counter = 0; FIO2CLR = 0x000000FF; } } } return 0; }
Chethan
But "sample code" is useless if you haven't also studied the chip documentation.
Have you studied the chip documentation ?.
"There are also many other resources for getting you up and running with your new hardware"
http://www.lpcware.com/
So - have you studied those resources?
Hi
Ya,I have gone through the documentation and for different applications (like adc,can,SPI,I2c etc.) programs i'm trying to understand but not getting some logics in the source file (cleared with header file) and what code i have posted the logic not cleared to me.I know that is not sufficient to ans u people but their many header files are their that's why i compressed it.
So what "logics", exactly, are you not "getting"?
You do have a working understanding of the 'C' programming language, don't you?
blog.antronics.co.uk/.../
Maybe not: http://www.keil.com/forum/58482/