河东软件站

电脑版
提示:原网页已由神马搜索转码, 内容由www.pc0359.cn提供.
所在位置:首页 > 应用软件 > 转换翻译> STM32库函数助手 1.0 绿色版

STM32库函数助手

 1.0 绿色版
  • 软件大小:82 KB
  • 更新日期:2016-11-15
  • 软件语言:简体中文
  • 软件类别:转换翻译
  • 软件授权:免费软件
  • 软件官网:未知
  • 适用平台:WinXP, Win7, Win8, Win10, WinAll
  • 软件厂商:
8.9
软件评分

本地下载

软件介绍人气软件相关文章网友评论下载地址

为您推荐:转换翻译

  STM32库函数助手是一款简单实用的库函数辅助软件,通过该软件,用户可以快速的将函数生成stm32源程序代码,非常方便;该软件操作简单,您只需将一个ADC函数输入软件中,点击一键生成就能立即完成代码的转换,该软件支持两种ADC参数,用户在选择转换的时候可以根据需要自己选择,同时支持一键复制代码,方便用户将该代码进行运用,非常简单,需要的朋友赶快下载试试吧!

STM32库函数助手 1.0 绿色版

STM32

  STM32系列基于专为要求高性能、低成本、低功耗的嵌入式应用专门设计的ARM Cortex-M3内核(ST's product portfolio contains a comprehensive range of microcontrollers, from robust, low-cost 8-bit MCUs up to 32-bit ARM-based Cortex®-M0 and M0+, Cortex®-M3, Cortex®-M4 Flash microcontrollers with a great choice of peripherals. ST has also extended this range to include an ultra-low-power MCU platform)[1] 。按内核架构分为不同产品

软件特色

  1、将ADC函数生成代码

  2、有两种参数ADC1、ADC2

  3、支持复制代码

  4、绿色软件,无需安装

使用方法

  1、下载解压文件,找到STM32库函数助手.exe双击打开

STM32库函数助手 1.0 绿色版

  2、选择需要生产代码的函数

STM32库函数助手 1.0 绿色版

  3、点击生成代码即可

STM32库函数助手 1.0 绿色版

  4、生成的代码区域

STM32库函数助手 1.0 绿色版

  5、复制代码

STM32库函数助手 1.0 绿色版

ADC函数

  /*

  * Analog conversion stuff for 16C71 - see adc.c for more info

  */

  /*

  * Read the adc on the specified channel - result is in ADRES

  */

  extern void adc_read(unsigned char channel);

  #include

  /* Basic A2D sample code for an PIC16F87x device.

  * This code willl set up the A2D module to return an

  * 8-Bit result. If greater precision is needed, a 10-Bit

  * result can be returned if read_a2d() is modified to

  * return the short ((ADRESH<<8)+(ADRESL)). Note also that

  * ADCON1 should be set to 0x80 in the init_a2d() routine

  * instead of zero.

  *

  * This code will sample an A2D value on analog port RA0, and it's value

  * will be used to move a LED's position across PORTB.

  *

  * This project can be demonstrated on the Microchip PICDEM2 board.

  */

  __CONFIG(DEBUGEN& WDTDIS& LVPDIS); // Setup the configuration word for ise with ICD2

  /* Sample code to set up the A2D module */

  void init_a2d(void){

  ADCON0=0; // select Fosc/2

  ADCON1=0; // select left justify result. A/D port configuration 0

  ADON=1; // turn on the A2D conversion module

  }

  /* Return an 8 bit result */

  unsigned char read_a2d(unsigned char channel){

  channel&=0x07; // truncate channel to 3 bits

  ADCON0&=0xC5; // clear current channel select

  ADCON0|=(channel<<3); // apply the new channel select

  ADGO=1; // initiate conversion on the selected channel

  while(ADGO)continue;

  return(ADRESH); // return 8 MSB of the result

  }

  void main(void){

  unsigned char x;

  init_a2d(); // initialise the A2D module

  GIE=0; // we don't want interrupts

  TRISB=0xF0; // the lower four bits of POTRB will be used in output mode

  for(;;){

  x=read_a2d(1); // sample the analog value on RA0

  PORTB = (8>>(x>>6)); // Use the 2 MS Bits of the result to select the bit position of the LED on PORTB

  }

  }

  /*

  * Read the ADC on a 16C71.

  */

  #include

  #include "adc.h"

  void

  adc_read(unsigned char channel)

  {

  ADCON0 = (channel<< 3) + 0xC1; // enable ADC, RC osc.

  ADGO = 1;

  while(ADGO)

  continue; // wait for conversion complete

  }

人气软件

网友评论0

您的评论需要经过审核才能显示