Скачать презентацию
Идет загрузка презентации. Пожалуйста, подождите
Презентация была опубликована 11 лет назад пользователемГлеб Шестаков
4 .include"m8535def.inc".deftmp=R16.org0 rjmpInit.org14 rjmpADC_Comp Init: ; ldir16,high(RAMEND) outSPH,r16 ldir16,low(RAMEND) outSPL,r16 ; lditmp,0b outDDRB,tmp outPORTB,tmp lditmp,0b outDDRD,tmp outPORTD,tmp
5 lditmp,0b outTCCR0,tmp lditmp,254 outOCR0,tmp lditmp,0b outTCCR1A,tmp lditmp,0b outTCCR1B,tmp lditmp,254 outOCR1AH,R7 outOCR1AL,tmp lditmp,0b outTCCR2,tmp lditmp,0 outASSR,tmp lditmp,254 outOCR2,tmp
6 lditmp,0b outSFIOR,tmp ; lditmp,0b outADMUX,tmp lditmp,0b outADCSRA,tmp ; sei Loop:nop nop rjmpLoop ADC_Comp: lditmp,1 outOCR0,tmp reti intmp,ADCH outOCR0,tmp lditmp,0b outADMUX,tmp lditmp,0b outADCSRA,tmp reti
7 intmp,ADMUX anditmp,0b cpitmp,0 breqChangeBlue cpitmp,2 breqChangeGreen cpitmp,4 breqChangeRed ChangeBlue: intmp,ADCH outOCR0,tmp lditmp,0b outADMUX,tmp lditmp,0b outADCSRA,tmp reti ChangeGreen: intmp,ADCH outOCR1AH,R7 outOCR1AL,tmp lditmp,0b outADMUX,tmp lditmp,0b outADCSRA,tmp reti
8 ChangeRed: intmp,ADCH outOCR2,tmp lditmp,0b outADMUX,tmp lditmp,0b outADCSRA,tmp reti
Еще похожие презентации в нашем архиве:
© 2024 MyShared Inc.
All rights reserved.