Требуется программист в Зеленограде
- обработка данных с датчиков; ColdFire; 40 тыс. e-mail:jobsmp@pochta.ru |
int mas[22]; // это чтобы startup активировать
int counter;int main( void )
{
unsigned char led;PORTB = 0xFF; // Give PORTB and the User LEDs an initial startvalue
led = 1; // Start with LED0
DDRB = 0xFF; // Set PORTB as output
while(1) // Eternal loop
{
counter++;
mas[2]=counter;
PORTB = ~led; // Invert the output since a zero means: LED on
led <<= 1; // Move to next LED by performing a rotate leftif (!led)
led = 1; // If overflow: start with LED0 again__delay_cycles(500000); // Wait for 500 000 cycles
}
}
IAR (*.map):
без оптимизации:
216 bytes of CODE memory (+ 28 range fill )
110 bytes of DATA memory (+ 2 absolute )
с полной оптимизацией по размеру:
204 bytes of CODE memory (+ 28 range fill )
110 bytes of DATA memory (+ 2 absolute )
CVAVR:
Segment Begin End Code Data Used Size Use%
---------------------------------------------------------------
[.cseg] 0x000000 0x0000d6 212 2 214 4096 5.2%
[.dseg] 0x000060 0x0000cc 0 44 44 256 17.2%
[.eseg] 0x000000 0x000000 0 0 0 256 0.0%
Вывод:
Юзай CV и не парься :)))