Hi Guys
I am trying to to wrtie a value in a 32 bit register using a for loop as shown example below.
do i define the counter as
int counter=1;
or int counter= 0x00000001
or there is another way to define a variable in hex;
#include <stdio.h>
#include <LPC23xx.H>
#define A 0xffffffff
int main(void)
{
int counter;
int counter1=A;
for( counter=0; counter<A; counter++)
{
register=counter;
}
for( counter1=A; counter>0; counter--)
{
register=counter;
}
}
I am trying to to wrtie a value in a 32 bit register using a for loop as shown example below.
do i define the counter as
int counter=1;
or int counter= 0x00000001
or there is another way to define a variable in hex;
#include <stdio.h>
#include <LPC23xx.H>
#define A 0xffffffff
int main(void)
{
int counter;
int counter1=A;
for( counter=0; counter<A; counter++)
{
register=counter;
}
for( counter1=A; counter>0; counter--)
{
register=counter;
}
}