91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 4KB
    文件類型: .zip
    金幣: 2
    下載: 1 次
    發布日期: 2021-05-28
  • 語言: 其他
  • 標簽: MSP430??

資源簡介

自制的MSP430F5529部分庫函數,包括PWM,定時器,按鍵等。使用時直接添加即可。

資源截圖

代碼片段和文件信息

/*
?*?adc.c
?*
?*??Created?on:?2019年7月6日
?*??????Author:?Lenovo
?*/
#include?“adc.h“

void?adc_int()
{
??P6SEL?=?0x0F;?????????????????????????????//?Enable?A/D?channel?inputs
??ADC12CTL0?=?ADC12ON+ADC12MSC+ADC12SHT0_8;?//?Turn?on?ADC12?extend?sampling?time
????????????????????????????????????????????//?to?avoid?overflow?of?results
??ADC12CTL1?=?ADC12SHP+ADC12CONSEQ_3;???????//?Use?sampling?timer?repeated?sequence
??ADC12MCTL0?=?ADC12INCH_0;?????????????????//?ref+=AVcc?channel?=?A0
??ADC12MCTL1?=?ADC12INCH_1;?????????????????//?ref+=AVcc?channel?=?A1
??ADC12MCTL2?=?ADC12INCH_2;?????????????????//?ref+=AVcc?channel?=?A2
??ADC12MCTL3?=?ADC12INCH_3+ADC12EOS;????????//?ref+=AVcc?channel?=?A3?end?seq.
??ADC12IE?=?0x08;???????????????????????????//?Enable?ADC12IFG.3
??ADC12CTL0?|=?ADC12ENC;????????????????????//?Enable?conversions
??ADC12CTL0?|=?ADC12SC;?????????????????????//?Start?convn?-?software?trigger

??__bis_SR_register(LPM0_bits?+?GIE);???????//?Enter?LPM0?Enable?interrupts
??__no_operation();
}

#if?defined(__TI_COMPILER_VERSION__)?||?defined(__IAR_SYSTEMS_ICC__)
#pragma?vector=ADC12_VECTOR
__interrupt?void?ADC12ISR?(void)
#endif
{
??static?unsigned?int?index?=?0;

??switch(__even_in_range(ADC12IV34))
??{
??case?12:??????????????????????????????????//?Vector?12:??ADC12IFG3
A0results[index]?=?ADC12MEM0;???????????//?Move?A0?results?IFG?is?cleared
A1results[index]?=?ADC12MEM1;???????????//?Move?A1?results?IFG?is?cleared
A2results[index]?=?ADC12MEM2;???????????//?Move?A2?results?IFG?is?cleared
A3results[index]?=?ADC12MEM3;???????????//?Move?A3?results?IFG?is?cleared
index++;????????????????????????????????//?Increment?results?index?modulo;?Set?Breakpoint1?here
if?(index?==?8)
{
??(index?=?0);
}
??default:?break;
??}
}


?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????406??2019-07-07?10:26??adc.h
?????文件?????????511??2019-07-06?19:15??key.c
?????文件?????????490??2019-07-06?19:15??key.h
?????文件????????1682??2019-07-07?21:42??pwm.c
?????文件?????????322??2019-07-06?18:46??pwm.h
?????文件????????2390??2019-07-06?20:13??tim.c
?????文件?????????393??2019-07-06?20:00??tim.h
?????文件????????1850??2019-07-07?10:29??adc.c

評論

共有 條評論