深圳市瑞申电子有限公司

深圳市瑞申电子有限公司是一家10年专业大功率电感生产加工厂商,主要以大功率,大电流、扁平线圈电感、平面变压器设计、生产、销售工厂。设计、绕线、组装、检测、包装、出货等全制程的工艺流程!拥有完整、科学的质量管理体系。专业技术团队10人,我们的诚信、实力和产品质量获得业界的认可。欢迎各界朋友莅临参观、指导和业务洽谈。 ...

How to build a simple, interactive digital voltmeter

时间:2015-03-15 08:09:38 点击:
This application note uses the MAXQ2010 microcontroller's evaluation (EV) kit Rev D to implement a digital voltmeter. The article demonstrates how to measure the voltages with the ADC and display them on the EV kit's LCD. An onboard 5-way switch is used to select the ADC channel to be displayed on the LCD. No additional parts are needed aside from the EV kit.

<-- ======================================================================= --><-- CONTENT: DB HTML --><-- ======================================================================= -->Download an example project with the code described in this application note.

Introduction

The MAXQ2010-KIT showcases the MAXQ2010 microcontroller. The kit has a versatile board with the following features:
  • Two pushbuttons for reset and interrupt lines
  • One 5-way switch
  • 19 exposed GPIO pins
  • Eight ADC channels
  • A photocell
  • A thermistor
  • An LCD screen
Using these resources it is simple to build a digital voltmeter.

The MAXQ2010's integrated ADC accepts a voltage from 0V to 3.3V and translates it into a bit value from 0 to 4095 (12 bits of precision)功率电感器. The microcontroller then scales the value to a range from 0 to 3.3000 and writes it on the board's LCD. The application code repetitively samples all eight ADC channels and uses the 5-way switch to determine which channel to display.

Aside from the EV kit, no additional parts are required. Included in the EV kit is a limited version of the IAR Embedded Workbench® software. The full version of the software can be purchased from the IAR™ website. The sample application was written and compiled on version 2.20I.

Getting started

Set up the board according to the EV kit documentation. You should also install jumpers J30 and J31, which will connect the photocell (R17) to ADC input 6 (AN6) and connect the thermistor (R20) to ADC input 7 (AN7). You can also add voltages on ports 0–5, as long as the voltages stay within the 0V to 3.3V range.

Next, run the IAR software. In the top left corner click File Open Workspace. Navigate to the directory containing the voltmeter project and open voltmeter.eww. The project settings will already be set up. To ensure that the JTAG is set to the correct COM port, right click on the bold-faced project name on the left side of the screen and select Options (Figure 1). Go to Categories, click JTAG under Debugger, and enter the COM port to which your programmer is connected (Figure 2). To check which COM port is being used, open Device Manager. The EV kit documentation details how to get there.

Figure 1. To verify that the JTAG is set to the correct COM port, start with the Options menu.
Figure 1. To verify that the JTAG is set to the correct COM port, start with the Options menu.

Figure 2. Find the JTAG option and enter the COM port to which your programmer is connected.
Figure 2. Find the JTAG option and enter the COM port to which your programmer is connected.

Next, click Debug on the far right side of the toolbar (Figure 3). This will compile, link, and program your board. The debug menu will be brought up momentarily. A green arrow will be pointing to the main function. Run the program by pressing F5 or clicking the button on the toolbar that looks like a flat piece of paper with three arrows above it.

Figure 3. Use the Debug command to compile, link, and program your EV kit board.
Figure 3. Use the Debug command to compile, link, and program your EV kit board.

Application results

Featured on the EV kit board are two analog in电感厂家puts, the thermistor and photocell, which continuously output voltage signals. Both of these inputs are connected to ADC pins so their voltage can be measured. The sample application reads eight ADC values (on channels 0 through 7) at a time. The values are sent to a software lowpass filter that removes high-frequency noise. The selected ADC channel is displayed on the LCD. On the lower right-hand corner of the board is a switch. Pressing this switch down or to the right increments the ADC channel to be monitored. If t扁平型电感he channel selected is greater than s电感厂家even电脑电感器, the software selects channel zero instead. Conversely, pressing the switch up or to the left decreases the ADC channel; channel seven is monitored if the channel selected is less than zero. To display the current channel being monitored, press in the switch. To stop the ADC from sampling, hold the button SW3 down. While SW3 is held down, the channel can still be changed. 大功率电感厂家 |大电流电感工厂
  • 零成本让你的电视盒子变身无线路由器
    4月08日 第三届·无线通信技术研讨会 立即报名 12月04日 2015•第二届中国IoT大会 精彩回顾 10月30日ETF•智能硬件开发技术培训会 精彩回顾 10月23日ETF•第三届 消费
  • 功率电感:4040封装尺寸的超薄、大电流电感器
    推出业界首款翼式且采用4040封装尺寸的超薄、大电流电感器IHLW-4040CF-11。IHLW-4040CF-11是为安装在分离(cut-o电感器公司ut)PCB上而设计的,透过使用较大尺寸的部件
  • [逆变器]DC-DC电路(BOOST)设计分析【精解析】
    DC-DC升压(BOOST)电路原理 BOOST升压电路中: 电感的作用:是将电能和磁场能相互转换的能量转换器件,当MOS开关管闭合后,电感将电能转换为磁场能储存起来,当MOS断开后电感将储存的
  • 大功率电感