avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] (Newbie)1.How to write variables which are not loaded to


From: Sumeet Pal Singh
Subject: [avr-gcc-list] (Newbie)1.How to write variables which are not loaded to uC but manipulated by compiler
Date: Thu, 8 Dec 2005 06:19:03 +0530

Hi
The background to this is:
For making a line following robot, we need to output a PWM value which is done by setting TCR1A, the value(char) having linear relationship with speed.
We decided to form an array(char), in which the value is equal to the value location.
Now what values are put in each of the array elements we wish to decide by fixing a few variables which we will not require to change after programming.
So, the Array[1]=127-S\100*255;;Array[2]=Array[1]+1;Array[2]=Array[1]+2
Now I do not wish to put the variable S and these calculations in AVR. Just the final Array can be downloaded in memory and it will work. How to specify such variable (as S) while writing declaring the  variable.
Thanks
Sumeet

reply via email to

[Prev in Thread] Current Thread [Next in Thread]