| поискавой системы для электроныых деталей |
|
AN420 датащи(PDF) 12 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN420 датащи(HTML) 12 Page - STMicroelectronics |
|
12 / 16 page ![]() Application example AN420 12/15 Doc ID 2078 Rev 2 Hres .def 0bdh,0ffh,0ffh ;MS 2 bits of conversion result, and ;conversion flag conv_f .equ 7;the MSB of Hres is the high resolution ;end of conversion flag c1 .equ 6 ;conversion step flags c2 .equ 5 c3 .equ 4 c4 .equ 3 ;using Hres Lres .def 0beh,0ffh,0ffh ;LSB of conversion result ;************************** N O T E *********************************************** ;register W is used to save the accumulator contents ;in standard interrupt routines ;******************************************************************************** .org 880h ;one module only. Do not use this ;assembly directive if you organize ;your software in linkable modules init ldi drb,1 ldi orb,1 ;PB0 is analog input ldi ddrc,070h ;PC4..6 are open drain outputs ldi orc,070h ;PC4..6 are push-pull outputs now ldi drcs,0 ;assume PC7 is input with pull-up, ;no interrupt ldi ior,10h ;enable interrupts ldi Hres,0 reti ;initialize interrupt machine conv ;this is an endless loop converting ;PB0 input with 10-bit resolution ;the first time here after reset, ;VN1=VN2=VN3=0 set conv_f,Hres set c1,Hres set 5,adcr ;start high resolution conversion jrs conv_f,Hres,$ nop ;here the high resolution result is ;available in Hres-Lres jp conv adcint ld w,a ;save accumulator ld a,adr ;in accumulator conversion result jrs c1,Hres,c1conv |
|
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |