Help!

*_âÕÄØ ÚÄÒÁ×_*, /_All_/!

HõÖÅÎ ÓÏ×ÅÔ ÎÏ×ÉÞËÕ, ÄÁÂÙ ÎÅ ÚÁÓÏÒÑÔØ ÜÈÕ ÐÒÏÛÕ × ÍÙÌ... óÉÔÕÁÃÉÑ ÔÁËÁÑ, ËÏÄ ÎÁ óÉ ÓËÏÍÐÉÌÉÒÏ×ÁÎÎÙÊ × ÐÒÏÇÒÁÍÍÅ CodeVisionAVR... òÁÂÏÔÁÅÔ × ÜÍÕÌÑÔÏÒÅ VMLAB, × ÖÅÌÅÚÅ ÎÅ ÐÁÛÅÔ. çÄÅ Ñ ÎÅ ÐÒÁ×?!

int ArrayX[8] = {0x8,0xC,0x4,0x6,0x2,0x3,0x1,0x9}; int StepX,PStepX,CounterX = 0;

void main(void) { PORTA=0xFF; DDRA=0x00; PORTB=0x00; DDRB=0xFF; PORTC=0x00; DDRC=0xFF; PORTD=0x00; DDRD=0x00; PORTE=0x00; DDRE=0x00; PORTF=0x00; DDRF=0x00; PORTG=0x00; DDRG=0x00;

ASSR=0x00; TCCR0=0x00; TCNT0=0x00; OCR0=0x00; TCCR1A=0x00; TCCR1B=0x00; TCNT1H=0x00; TCNT1L=0x00; ICR1H=0x00; ICR1L=0x00; OCR1AH=0x00; OCR1AL=0x00; OCR1BH=0x00; OCR1BL=0x00; OCR1CH=0x00; OCR1CL=0x00;

TCCR2=0x00; TCNT2=0x00; OCR2=0x00;

TCCR3A=0x00; TCCR3B=0x00; TCNT3H=0x00; TCNT3L=0x00; ICR3H=0x00; ICR3L=0x00; OCR3AH=0x00; OCR3AL=0x00; OCR3BH=0x00; OCR3BL=0x00; OCR3CH=0x00; OCR3CL=0x00;

EICRA=0x00; EICRB=0x00; EIMSK=0x00;

TIMSK=0x00; ETIMSK=0x00;

ACSR=0x80; SFIOR=0x00;

while (1) { StepX = PINA.1; if ((PStepX)&&(!StepX)) PStepX = 0 ; if (PINA.0) { if ((StepX)&&(!PStepX)) { PORTB = ArrayX[CounterX]; CounterX++; PStepX = 1; if (CounterX == 8) CounterX = 0; }; } else { if ((StepX)&&(!PStepX)) { PORTB = ArrayX[CounterX]; if (CounterX == 0) CounterX = 8; CounterX--; PStepX = 1; }; }; }; }

/ó Õ×ÁÖÅÎÉÅÍ/, _/Andrew/_... - [òÕÓÓËÉÊ òÏË] -

Reply to
Andrew Mitrohin
Loading thread data ...
Reply to
Alexey Gushin

"Andrew Mitrohin" snipped-for-privacy@p70.f.n5027.z2.fidonet.org> сообщил/сообщила в новостях следующее: news: snipped-for-privacy@p70.f.n5027.z2.ftn...

Какой контроллер ? Может FUSE bits неправильно выставил и он вообще не запускается?

Reply to
Konstantin Morozov
Reply to
Alex Mogilnikov
Reply to
Dimmy Timchenko
Reply to
Alex Mogilnikov

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.