手创科技技术汇集二程序初始化说明书_第1页
手创科技技术汇集二程序初始化说明书_第2页
手创科技技术汇集二程序初始化说明书_第3页
手创科技技术汇集二程序初始化说明书_第4页
手创科技技术汇集二程序初始化说明书_第5页
免费预览已结束,剩余23页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、手创科技技术资料汇集(一)手创科技拥有强大团队阵容,其中有多个成员曾参加飞思智能小车竞赛并获得一等奖、华南赛区一等奖等,参加过机械创新设计大赛取得省一等奖,同时有队员获得国家专利。技术实力雄厚,愿与各位参赛选手交流比赛心得,广交朋友,追求一起进步。永无止境。(手创科技淘宝店: HYPERLINK http:/s/ http:/s/)此资料汇集的部分程序初始化模块:MC9S12XS128 系列例程-0/*/手创科技鼎力的技术支持。包括硬件和的支持,欢迎朋友们支持。并祝愿参赛选手们取得好成绩。淘宝店: HYPERLINK http:/s/ http:/s/Code Warrior 4.7: MC9

2、S12XS128Crystal: 16.000Mhz busclock:16.000MHz pllclock:32.000MHz=*/i nclude i nclude i nclude /* common defines and macros */#pragma LINK_INFO DERIVATIVE mc9s12xs128 byte u8_RCV_Ch=0 xff;/=中断函数=#pragma CODE_SEG NON_BEDvoiderrupt 66 PIT0errupt(void)T;/ chesudu 需要定义的量PITTF_PTF0=1;T=0X0000;#pragma CODE

3、_SEG DEFAULTstatic void SCI_Init(void)SCI0CR2=0 x2c; /enable Receive Fullerrupt,RX enable,Tx enableSCI0BDH=0 x00; /busclk8MHz,19200bps,SCI0BDL=0 x1a SCI0BDL=0 x68; /SCI0BDL=busclk/(16*SCI0BDL)/busclk 16MHz, 9600bps,SCI0BDL=0 x68void uart_phar(unsigned char ch)if (ch = n)while(!(SCI0SR1&0 x80) ; SCI0

4、DRL= 0 x0d;return;while(!(SCI0SR1&0 x80) ; SCI0DRL=ch;/outpR/keep waiting when not emptyvoid putstr(char ch)unsigned char ptr=0; while(chptr)uart_phar(unsigned char)chptr+);unsigned char uart_getkey(void)byte res=0; while(!(SCI0SR1&0 x80) ; return (SCI0DRL);/keep waiting when not empty/sic void Port

5、_Init(void)DDRB = 0 xff;/LEDPTB0-7,PORTB= 0 xff;/LEDs on/ PLL 初始化子程序void setbusclock(void)CLKSEL=0X00;BUS Clock=16M/disengage PLL to system/turn on PLLPLLCTL_PLLON=1; SYNR=1; REFDV=1;_asm(nop);_asm(nop);/pllclock=2*osc*(1+SYNR)/(1+REFDV)=32MHz;/BUS CLOCK=16Mwhile(!(CRG_LOCK=1);/when pll is steady ,t

6、hen use it;/engage PLL to system;CLKSEL_PLLSEL =1;/sic void_Init(void)/SB,B for ch2367/SA,A for ch0145PRCLK = 0X55; SCLA = 0 x02;clock=clockA/4=125KHz;SCLB = 0X02;/clockA,CLK B 32 分频:500khz/ 对 clock SA 进行 2*SCLA=4分频; /clk SB=clk B/(2*sclb)=125KHZ/1T1 = 0; CAE_CAE1=0; POL_PPOL1=0; PER1 =125;DTY1 =100

7、;CLK_PCLK1 = 1;E_E1 = 0;/void Init_Dev(void)setbusclock(); Port_Init(); SCI_Init();_Init();/void Beep(void)word tmper=125,tmdty=100;tmpWMPER1;tmdty=E_DTY1;E1 = 1;PER1 =125;DTY1 =100;Dly_ms(40);PER1 =tmper; DTY1 =tmdty;E_E1 = 0;#pragma CODE_SEG NEAR_SEG NON_BEDvoiderrupt 20 SCI0_ISR(void)SCI0CR2_RIE=

8、0;/此处为串口中断需要处理的事情uart_phar(u8_RCV_Ch=uart_getkey();/PORTA_PA0=PORTA_PA0; PORTB_PB7=PORTB_PB7;switch(u8_RCV_Ch)case u:u8_RCV_Ch=0 xff;E_E1 = 1;/开启/增大频率0 波形输出if(PER115)PER1-=5;break; case d:u8_RCV_Ch=0 xff;E_E1 = 1;if(PER1DTY1=/减小频率if(PER1+10)/减小占空比PER1*4/5;/20%break; case l:u8_RCV_Ch=0 xff;E_E1 = 1;i

9、f(DTY1DTY1+;PER1)/增大占空比break; case r:u8_RCV_Ch=0 xff;E_E1 = 1;if(DTY1PER1)/减小占空比DTY1-;break; default:break;/switch(u8_RCV_Ch)/Beep();SCI0CR2_RIE = 1;/=main()=#pragma CODE_SEG DEFAULT void main(void)chartxtbuf16=;Init_Dev(); PORTB=0 x00;Dly_ms(1000); PORTB=0 xFF;Enableerrupts; for(;)Dly_ms(500);/0POR

10、TB_PB0=PORTB_PB0;/for(;) /mainMC9S12XS128 系列例程-RTI 0*/i nclude i nclude i nclude #pragma LINK_INFO DERIVATIVE mc9s12xs128volatile dwordt=0;/sic void Port_Init(void)DDRA = 0 xff;PORTA= 0 x00;DDRB = 0 xff;/LEDPTB0-7,PORTB= 0 xff;/LEDs off/sic void SCI_Init(void)SCI0CR2=0 x2c; /enable Receive Fullerrup

11、t,RX enable,Tx enableSCI0BDH=0 x00; /busclk8MHz,19200bps,SCI0BDL=0 x1a SCI0BDL=0 x68; /SCI0BDL=busclk/(16*SCI0BDL)/busclk 16MHz, 9600bps,SCI0BDL=0 x68void uart_phar(unsigned char ch)if (ch = n)while(!(SCI0SR1&0 x80) ; SCI0DRL= 0 x0d;return;while(!(SCI0SR1&0 x80) ; SCI0DRL=ch;/outpR/keep waiting when

12、 not emptyvoid putstr(char ch)unsigned char ptr=0; while(chptr)uart_phar(unsigned char)chptr+);/ setup of the RTIerrupt frequencysic void RTI_Init(void)RTICTL=0 x77;/CRG=0X80;/8x216 =32,75ms,30.5175Hz/enable RTIerruptCRG=0X80;/enable RTIerrupt/ PLL 初始化子程序void setbusclock(void)CLKSEL=0X00;BUS Clock=1

13、6M/disengage PLL to systemPLLCTL_PLLON=1;/turn on PLLSYNR=1;REFDV=1;/pllclock=2*osc*(1+SYNR)/(1+REFDV)=32MHz;_asm(nop);_asm(nop); while(!(CRG/BUS CLOCK=16M_LOCK=1);/when pll is steady ,then use it;/engage PLL to system;CLKSEL_PLLSEL =1;/#pragma CODE_SEG DEFAULT void Init_Dev(void)setbusclock(); Port

14、_Init(); SCI_Init(); RTI_Init();/=main()=#pragma CODE_SEG DEFAULT void main(void)char bytewordtxtbuf66=; u8_mes=0;u16_sec=0,u16_ms=0;Init_Dev(); PORTB=0 x00;putstr(nLongQiu s.&t. Co. putstr(nDLY_ms(1000); PORTB=0 xFF;Enableerrupts; for(;).););/时钟计时器u1t*131/4;/理论值为 32.75ms,时间计算部分u16_ms=u16_sec%1000;

15、u16_sec=u16_sec/1000;sprf(txtbuf,n%d:%02ds-%03dms ,u8_mes,u16_sec,u16_ms); putstr(txtbuf);if(u16_sec58)u8_mes+;t=0;/PORTB_PB0=PORTB_PB0; DLY_ms(50);/for(;) /maini nclude /* common defines and macros */i nclude i nclude /* derivative information */#pragma LINK_INFO DERIVATIVE mc9s12xs128#pragma CODE_

16、SEG DEFAULT/void setbusclock(void)CLKSEL=0X00; PLLCTL_PLLON=1; SYNR=1; REFDV=1;_asm(nop);_asm(nop);/disengage PLL to system/turn on PLL/pllclock=2*osc*(1+SYNR)/(1+REFDV)=32MHz;/BUS CLOCK=16Mwhile(!(CRG_LOCK=1);/when pll is steady ,then use it;/engage PLL to system;CLKSEL_PLLSEL =1;/ sic void SCI_Ini

17、t(void)SCI0CR2=0 x2c; /enable Receive Fullerrupt,RX enable,Tx enableSCI0BDH=0 x00; /busclk8MHz,19200bps,SCI0BDL=0 x1a SCI0BDL=0 x68; /SCI0BDL=busclk/(16*SCI0BDL)/busclk 16MHz, 9600bps,SCI0BDL=0 x68void uart_phar(unsigned char ch)if (ch = n)while(!(SCI0SR1&0 x80) ; SCI0DRL= 0 x0d;return;while(!(SCI0S

18、R1&0 x80) ; SCI0DRL=ch;/outpR/keep waiting when not emptyvoid putstr(char ch)unsigned char ptr=0;while(chptr)uart_phar(unsigned char)chptr+);unsigned char uart_getkey(void)byte res=0; while(!(SCI0SR1&0 x80) ; return (SCI0DRL);/keep waiting when not empty/void AD_Init(void)ATD0CTL1=0 x00; ATD0CTL2=0

19、x40; ATD0CTL3=0 xa0;ATD0CTL4=0 x01;/7:1-外部触发,65:00-8 位精度,4:放电,3210:ch/外部触发, 中断/右对齐无符号,每次转换 4 个序列, No FIFO, Freeze 模式下继续转/765:采 样 时 间为4个AD时钟周期,ATDClock=BusClock*0.5/PRS+1ATD0CTL5=0 x30;/6:0 特殊通道,5:1 连续转换,4:1 多通道轮流采样ATD0DIEN=0 x00;/数字输入/void Dly_ms(ii,jj;ms)if (ms1) ms=1; for(ii=0;iims;ii+)for(jj=0;jj

20、t);/修改延时以修改数据发送频率/低电平灯亮用这句,注释掉下面那句 PORTA_PA0=PORTA_PA0;t;/灯亮用这句,注释掉上面那句t;fenwei=ReadATD(0) *100/51;/参考电压 5V, 500/255 gewei=fenwei/100;fenwei=fenwei%100;sprf(txtbuf,nAD0:%d.%02dV,gewei,fenwei);putstr(txtbuf);fenwei=ReadATD(1) *100/51;/参考电压 5V, 500/255 gewei=fenwei/100;fenwei=fenwei%100;sprf(txtbuf,nA

21、D1:%d.%02dV,gewei,fenwei); putstr(txtbuf);fenwei=ReadATD(2) *100/51;/参考电压 5V, 500/255 gewei=fenwei/100;fenwei=fenwei%100;sprf(txtbuf,nAD2:%d.%02dV,gewei,fenwei); putstr(txtbuf);fenwei=ReadATD(3) *100/51;/参考电压 5V, 500/255 gewei=fenwei/100;fenwei=fenwei%100;sprf(txtbuf,nAD3:%d.%02dV;,gewei,fenwei); pu

22、tstr(txtbuf);MC9S12XS128 系列例程-IOC0i nclude i nclude i nclude #pragma LINK_INFO DERIVATIVE mc9s12xs128/void setbusclock(void)CLKSEL=0X00; PLLCTL_PLLON=1; SYNR=1; REFDV=1;_asm(nop);_asm(nop);/disengage PLL to system/turn on PLL/pllclock=2*osc*(1+SYNR)/(1+REFDV)=32MHz;/BUS CLOCK=16Mwhile(!(CRG_LOCK=1);

23、/when pll is steady ,then use it;/engage PLL to system;CLKSEL_PLLSEL =1;/sic void SCI_Init(void)SCI0CR2=0 x2c; /enable Receive Fullerrupt,RX enable,Tx enableSCI0BDH=0 x00; /busclk8MHz,19200bps,SCI0BDL=0 x1a SCI0BDL=0 x68; /SCI0BDL=busclk/(16*SCI0BDL)/busclk 16MHz, 9600bps,SCI0BDL=0 x68void uart_phar

24、(unsigned char ch)if (ch = n)while(!(SCI0SR1&0 x80) ; SCI0DRL= 0 x0d;return;while(!(SCI0SR1&0 x80) ; SCI0DRL=ch;/outpR/keep waiting when not emptyvoid putstr(char ch)unsigned char ptr=0; while(chptr)uart_phar(unsigned char)chptr+);/sic void IOC_Init(void)PACTL=0X50;/PT732 16BIT,FALLing edge,NOTERRUP

25、TTCTL3=0 xc0;/c-输入捕捉 7 任何沿有效,TCTL4=0 xc0;/40 表示 IC止, 1 表示上升沿, 2 表示下降沿, 3 表示任何沿TIE=0 x00;/每一位对应相应通道中断允许,0 表示中断TIOS =0 x00;/每一位对应通道的: 0 输入捕捉,1 输出比较TCTL3_EDG7x=1;/c-输入捕捉 7 任何沿有效,/void Dly_ms(ii,jj;ms)if (ms1) ms=1; for(ii=0;iims;ii+)for(jj=0;jjt);/修改延时以修改数据发送频率/低电平灯亮用这句,注释掉下面那句t;/灯亮用这句,注释掉上面那句t;T;t999)

26、if(sprT=0;f(mystr,nIOC pulses:%dt);putstr(mystr);*/#include /* common defines and macros */#include /* derivative information */#pragma LINK_INFO DERIVATIVE mc9s12xs128void delayms(ii,jj;ms)if (ms1) ms=1; for(ii=0;iims;ii+)for(jj=0;jjt);/ 修改延时以修改数据发送频率/低电平灯亮用这句,注释掉下面那句t;/ 测试版系统板PORTA_PA0=PORTA_PA0;/

27、 测试龙丘最小系统板/PORTB_BIT7=PORTB_BIT7;/灯亮用这句,注释掉上面那句t; /* wait forever */* please make suret you never leave this function */MC9S12XS128 系列例程-0/*手创科技鼎力的技术支持。包括硬件和的支持,欢迎朋友们支持。并祝愿参赛选手们取得好成绩。淘宝店: HYPERLINK http:/s/ http:/s/Code Warrior 4.7: MC9S12XS128Crystal: 16.000Mhz busclock:16.000MHz pllclock:32.000MHz

28、=*/i nclude i nclude i nclude /* common defines and macros */#pragma LINK_INFO DERIVATIVE mc9s12xs128 byte u8_RCV_Ch=0 xff;/=中断函数=#pragma CODE_SEG NON_BEDvoiderrupt 66 PIT0errupt(void)T;/ chesudu 需要定义的量PITTF_PTF0=1;T=0X0000;#pragma CODE_SEG DEFAULTstatic void SCI_Init(void)SCI0CR2=0 x2c; /enable Rec

29、eive Fullerrupt,RX enable,Tx enableSCI0BDH=0 x00; /busclk8MHz,19200bps,SCI0BDL=0 x1a SCI0BDL=0 x68; /SCI0BDL=busclk/(16*SCI0BDL)/busclk 16MHz, 9600bps,SCI0BDL=0 x68void uart_phar(unsigned char ch)if (ch = n)while(!(SCI0SR1&0 x80) ; SCI0DRL= 0 x0d;return;while(!(SCI0SR1&0 x80) ; SCI0DRL=ch;/outpR/kee

30、p waiting when not emptyvoid putstr(char ch)unsigned char ptr=0; while(chptr)uart_phar(unsigned char)chptr+);unsigned char uart_getkey(void)byte res=0; while(!(SCI0SR1&0 x80) ; return (SCI0DRL);/keep waiting when not empty/sic void Port_Init(void)DDRB = 0 xff;/LEDPTB0-7,PORTB= 0 xff;/LEDs on/ PLL 初始

31、化子程序void setbusclock(void)CLKSEL=0X00;BUS Clock=16M/disengage PLL to system/turn on PLLPLLCTL_PLLON=1; SYNR=1; REFDV=1;_asm(nop);_asm(nop);/pllclock=2*osc*(1+SYNR)/(1+REFDV)=32MHz;/BUS CLOCK=16Mwhile(!(CRG_LOCK=1);/when pll is steady ,then use it;/engage PLL to system;CLKSEL_PLLSEL =1;/sic void_Init

32、(void)/SB,B for ch2367/SA,A for ch0145PRCLK = 0X55; SCLA = 0 x02;clock=clockA/4=125KHz;SCLB = 0X02;/clockA,CLK B 32 分频:500khz/ 对 clock SA 进行 2*SCLA=4分频; /clk SB=clk B/(2*sclb)=125KHZ/1T1 = 0;CAE_CAE1=0;POL_PPOL1=0; PER1 =125;DTY1 =100;CLK_PCLK1 = 1;E_E1 = 0;/void Init_Dev(void)setbusclock(); Port_In

33、it(); SCI_Init();_Init();/void Beep(void)word tmper=125,tmdty=100; tmpWMPER1;tmdty=E_DTY1;E1 = 1;PER1 =125;DTY1 =100;Dly_ms(40);PER1 =tmper; DTY1 =tmdty;E_E1 = 0;#pragma CODE_SEG NEAR_SEG NON_BEDvoiderrupt 20 SCI0_ISR(void)SCI0CR2_RIE=0;/此处为串口中断需要处理的事情uart_phar(u8_RCV_Ch=uart_getkey();/PORTA_PA0=POR

34、TA_PA0; PORTB_PB7=PORTB_PB7;switch(u8_RCV_Ch)case u:u8_RCV_Ch=0 xff;E_E1 = 1;/开启/增大频率0 波形输出if(PER115)PER1-=5;break; case d:u8_RCV_Ch=0 xff;E_E1 = 1;if(PER1DTY1=/减小频率if(PER1+10)/减小占空比PER1*4/5;/20%break; case l:u8_RCV_Ch=0 xff;E_E1 = 1;if(DTY1DTY1+;PER1)/增大占空比break; case r:u8_RCV_Ch=0 xff;E_E1 = 1;if(

35、DTY1PER1)/减小占空比DTY1-;break; default:break;/switch(u8_RCV_Ch)/Beep();SCI0CR2_RIE = 1;/=main()=#pragma CODE_SEG DEFAULT void main(void)chartxtbuf16=;Init_Dev(); PORTB=0 x00;Dly_ms(1000); PORTB=0 xFF;Enableerrupts; for(;)Dly_ms(500);/0PORTB_PB0=PORTB_PB0;/for(;) /mainMC9S12XS128 系列例程-RTI 0*/i nclude i

36、nclude i nclude #pragma LINK_INFO DERIVATIVE mc9s12xs128volatile dwordt=0;/sic void Port_Init(void)DDRA = 0 xff; PORTA= 0 x00;DDRB = 0 xff;/LEDPTB0-7,PORTB= 0 xff;/LEDs off/sic void SCI_Init(void)SCI0CR2=0 x2c; /enable Receive Fullerrupt,RX enable,Tx enableSCI0BDH=0 x00; /busclk8MHz,19200bps,SCI0BDL

37、=0 x1a SCI0BDL=0 x68; /SCI0BDL=busclk/(16*SCI0BDL)/busclk 16MHz, 9600bps,SCI0BDL=0 x68void uart_phar(unsigned char ch)if (ch = n)while(!(SCI0SR1&0 x80) ; SCI0DRL= 0 x0d;return;while(!(SCI0SR1&0 x80) ; SCI0DRL=ch;/outpR/keep waiting when not emptyvoid putstr(char ch)unsigned char ptr=0; while(chptr)u

38、art_phar(unsigned char)chptr+);/ setup of the RTIerrupt frequencysic void RTI_Init(void)RTICTL=0 x77;/CRG=0X80;/8x216 =32,75ms,30.5175Hz/enable RTIerruptCRG=0X80;/enable RTIerrupt/ PLL 初始化子程序void setbusclock(void)CLKSEL=0X00;BUS Clock=16M/disengage PLL to system/turn on PLLPLLCTL_PLLON=1; SYNR=1; RE

39、FDV=1;_asm(nop);_asm(nop);/pllclock=2*osc*(1+SYNR)/(1+REFDV)=32MHz;/BUS CLOCK=16Mwhile(!(CRG_LOCK=1);/when pll is steady ,then use it;/engage PLL to system;CLKSEL_PLLSEL =1;/#pragma CODE_SEG DEFAULT void Init_Dev(void)setbusclock(); Port_Init(); SCI_Init(); RTI_Init();/=main()=#pragma CODE_SEG DEFAU

40、LT void main(void)char bytewordtxtbuf66=; u8_mes=0;u16_sec=0,u16_ms=0;Init_Dev(); PORTB=0 x00;putstr(nLongQiu s.&t. Co.putstr(n.););DLY_ms(1000); PORTB=0 xFF;Enableerrupts; for(;)/时钟计时器u1t*131/4;/理论值为 32.75ms,时间计算部分u16_ms=u16_sec%1000; u16_sec=u16_sec/1000;sprf(txtbuf,n%d:%02ds-%03dms ,u8_mes,u16_se

41、c,u16_ms); putstr(txtbuf);if(u16_sec58)u8_mes+;t=0;/PORTB_PB0=PORTB_PB0; DLY_ms(50);/for(;) /maini nclude /* common defines and macros */i nclude i nclude /* derivative information */#pragma LINK_INFO DERIVATIVE mc9s12xs128#pragma CODE_SEG DEFAULT/void setbusclock(void)CLKSEL=0X00; PLLCTL_PLLON=1; S

42、YNR=1; REFDV=1;_asm(nop);_asm(nop);/disengage PLL to system/turn on PLL/pllclock=2*osc*(1+SYNR)/(1+REFDV)=32MHz;/BUS CLOCK=16Mwhile(!(CRG_LOCK=1);/when pll is steady ,then use it;/engage PLL to system;CLKSEL_PLLSEL =1;/sic void SCI_Init(void)SCI0CR2=0 x2c; /enable Receive Fullerrupt,RX enable,Tx ena

43、bleSCI0BDH=0 x00; /busclk8MHz,19200bps,SCI0BDL=0 x1a SCI0BDL=0 x68; /SCI0BDL=busclk/(16*SCI0BDL)/busclk 16MHz, 9600bps,SCI0BDL=0 x68void uart_phar(unsigned char ch)if (ch = n)while(!(SCI0SR1&0 x80) ; SCI0DRL= 0 x0d;return;while(!(SCI0SR1&0 x80) ; SCI0DRL=ch;/outpR/keep waiting when not emptyvoid put

44、str(char ch)unsigned char ptr=0; while(chptr)uart_phar(unsigned char)chptr+);unsigned char uart_getkey(void)byte res=0; while(!(SCI0SR1&0 x80) ; return (SCI0DRL);/keep waiting when not empty/void AD_Init(void)ATD0CTL1=0 x00; ATD0CTL2=0 x40; ATD0CTL3=0 xa0;ATD0CTL4=0 x01;/7:1-外部触发,65:00-8 位精度,4:放电,32

45、10:ch/外部触发, 中断/右对齐无符号,每次转换 4 个序列, No FIFO, Freeze 模式下继续转/765:采 样 时 间 为4个AD时 钟 周期,ATDClock=BusClock*0.5/PRS+1ATD0CTL5=0 x30;ATD0DIEN=0 x00;/6:0 特殊通道,5:1 连续转换 ,4:1 多通道轮流采样/数字输入/void Dly_ms(ii,jj;ms)if (ms1) ms=1; for(ii=0;iims;ii+)for(jj=0;jjt);/修改延时以修改数据发送频率/低电平灯亮用这句,注释掉下面那句 PORTA_PA0=PORTA_PA0;t;/灯亮

46、用这句,注释掉上面那句t;fenwei=ReadATD(0) *100/51;/参考电压 5V, 500/255 gewei=fenwei/100;fenwei=fenwei%100;sprf(txtbuf,nAD0:%d.%02dV,gewei,fenwei);putstr(txtbuf);fenwei=ReadATD(1) *100/51;/参考电压 5V, 500/255 gewei=fenwei/100;fenwei=fenwei%100;sprf(txtbuf,nAD1:%d.%02dV,gewei,fenwei); putstr(txtbuf);fenwei=ReadATD(2) *100/51;/参考电压 5V, 500/255 gewei=fenwei/100;fenwei=fenwei%100;sprf(txtbuf,nAD2:%d.%02dV,gewei,fenwei);putstr(txtbuf);fenwei=ReadATD(3) *100/51;/参考电压 5V, 500/255 gewei=fenwei/100;fenwei=fenwei%100;sprf(txtbuf,nAD3:%d.%02dV;,gewei,fenwei); putstr(txtbuf);MC9S12XS128 系列例程-IOC0i nclude i nclude i n

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论