Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/26/03 22:23
Read: times


 
#40178 - RE: enumerated constants in c
Responding to: ???'s previous message
Jez:
Far better in my opinion to put your constants in a code space array and the make a loop to whack them to the port. Here is example....

<pre>

#define CONSTANT_ONE 111
#define CONSTANT_TWO 222
....
#define CONSTANT_SIXTEEN 1616
...
unsigned char code con_array[]={
CONSTANT_ONE,
CONSTANT_TWO,
...
CONSTANT_SIXTEEN
};
...
...
unsigned char i;
for(i=0; i<sizeof(con_array); i++)
{
P1=con_array[i];
}
...
<pre>

There you go....
Michael Karas



List of 4 messages in thread
TopicAuthorDate
enumerated constants in c            01/01/70 00:00      
   RE: enumerated constants in c            01/01/70 00:00      
   RE: enumerated constants in c            01/01/70 00:00      
      RE: enumerated constants in c            01/01/70 00:00      

Back to Subject List