Fujitsu MB95F430 Series Application Note
Fujitsu MB95F430 Series Application Note

Fujitsu MB95F430 Series Application Note

F²mc-8fx family 8-bit microcontroller operational amplifier
Hide thumbs Also See for MB95F430 Series:

Advertisement

Quick Links

Fujitsu Semiconductor (Shanghai) Co., Ltd.
MCU-AN-500080-E-10

Application Note

F²MC-8FX FAMILY
8-BIT MICROCONTROLLER
MB95F430 SERIES
OPERATIONAL AMPLIFIER
APPLICATION NOTE

Advertisement

Table of Contents
loading

Summary of Contents for Fujitsu MB95F430 Series

  • Page 1: Application Note

    Fujitsu Semiconductor (Shanghai) Co., Ltd. MCU-AN-500080-E-10 Application Note F²MC-8FX FAMILY 8-BIT MICROCONTROLLER MB95F430 SERIES OPERATIONAL AMPLIFIER APPLICATION NOTE...
  • Page 2: Revision History

    To obtain up-to-date information and/or specifications, contact your Fujitsu sales representative or Fujitsu authorized dealer. Fujitsu will not be liable for infringement of copyright, industrial property right, or other rights of a third party caused by the use of information or drawings described in this manual.
  • Page 3: Table Of Contents

    Revision History ... 2  Table of Contents ... 3  1  Introduction ... 4  2  Amplifier Overview ... 5  2.1  Block Diagram of Operational Amplifier ... 6  2.2  Pins of Operational Amplifier ... 6  2.3  OPAMP Control Register ... 7  3  Operations of Operational Amplifier ...
  • Page 4: Introduction

    Operational Amplifier Version 1.0 Chapter 1 Introduction 1 Introduction In this document, we will introduce how to use the amplifier function on the MB95F430 series. Chapter 2 gives an overview on operational amplifier. Chapter 3 introduces the operations of operational amplifier.
  • Page 5: Amplifier Overview

    Operational Amplifier Version 1.0 Chapter 2 Amplifier Overview 2 Amplifier Overview Amplifier Overview The operational amplifier can be used to sense the ground current, and support front-end The operational amplifier can be used to sense the ground current, and support front-end analog signal conditioning prior to A/D conversion.
  • Page 6: Block Diagram Of Operational Amplifier

    Block Diagram of Operational Amplifier Figure 1 Block Diagram of Operational Amplifier Pins of Operational Amplifier The OPAMP uses the OPAMP_P pin and the OPAMP_N pin as the analog input pins of the operational amplifier, and uses the OPAMP_O pin as the analog output pin of the operational amplifier.
  • Page 7: Opamp Control Register

    Operational Amplifier Version 1.0 Chapter 2 Amplifier Overview OPAMP Control Register The OPAMP control register (OPCR) is used to turn on and off the OPAMP, to enable and disable OPAMP analog output, and to enable and disable OPAMP analog input. The register can also be used to set the OPAMP to operate as a standalone open loop operational amplifier, or a non-inverting closed loop operational amplifier with six different closed loop gain settings that can be selected by the software.
  • Page 8 Operational Amplifier Version 1.0 Chapter 2 Amplifier Overview ■ Functions of Bits in OPAMP Control Register (OPCR) ■ OPAMP Operating Mode Settings Notes: •While the OPAMP is operating, modifying the settings of RES2, RES1 and RES0 is allowed, however, do not use the output signal of the OPAMP or execute A/D conversion until OPAMP output becomes stable.
  • Page 9: Operations Of Operational Amplifier

    Operational Amplifier Version 1.0 Chapter 3 Operations of Operational Amplifier 3 Operations of Operational Amplifier Operations of Operational Amplifier The operational amplifier can be activated by setting the PD bit in the OPCR register using the The operational amplifier can be activated by setting the PD bit in the OPCR register using the software.
  • Page 10: Amplifier Setting Procedure

    Operational Amplifier Version 1.0 Chapter 4 Amplifier setting procedure 4 Amplifier setting procedure Below is an example of procedure for setting the operational amplifier. ● Initial settings 1) Set both OPCR: OPID and OPCR: OPOD to "0" to enable both OPAMP analog input and OPAMP analog output.
  • Page 11: Amplifier Driver

    5 Amplifier Driver This is OPAMP driver description. 5.1 Peripheral Usage The MCU pins used as below: OPAMP_N,used as amplifier negative input; OPAMP_P,used as amplifier positive input; OPAMP_O,used as amplifier output; 5.2 Driver Code 5.2.1 General Definition typedef unsigned char BOOLEAN; typedef unsigned char INT8U;...
  • Page 12: Amplifier Routine

    5.2.2 Amplifier Routine void AmpOpenLoop() Return : none. Parameters : none. Description : open-loop setting. Example : AmpOpenLoop(); void AmpOpenLoop() DDR6_P60=0; DDR6_P61=0; DDR6_P62=1; OPCR=0x60;//Amplifier gain is R3/R1 void AmpCloseLoop() Return : none. Parameters : none. Description : close-loop setting. Example : AmpCloseLoop();...
  • Page 13: Typical Application

    6 Typical Application This is the typical application introduction. 6.1 HW Design In this application, we will test the operational amplifier in the MB95F430K. The HW is designed as below. The R1, R2, R3 is used in open-loop amplifier. Figure 4 Hardware Design 6.2 Sample Code void main(void) Return...
  • Page 14: More Information

    Operational Amplifier Version 1.0 Chapter 7 More Information 7 More Information For more Information on FUJITSU Semiconductor products, visit the following websites: English version: http://www.fujitsu.com/cn/fsp/services/mcu/mb95/application_notes.html Simplified Chinese Version: http://www.fujitsu.com/cn/fss/services/mcu/mb95/application_notes.html MCU-AN-500080-E-10 - Page 14...
  • Page 15: Appendix

    Operational Amplifier Version 1.0 Chapter 8 Appendix 8 Appendix Figure 1 Block Diagram of Operational Amplifier ... 6  Figure 2 OPAMP Control Register ... 7  Figure 3 Settings for Activating Operational Amplifier ... 9  Figure 4 Hardware Design ... 13  MCU-AN-500080-E-10- Page 15...
  • Page 16: Sample Code

    9 Sample Code main.c #include "mb95430.h" #include "TypeDef.h" /*---------------------------------------------------------------------------*/ /* Amplifier Setting /*---------------------------------------------------------------------------*/ void AmpOpenLoop() DDR6_P60=0; DDR6_P61=0; DDR6_P62=1; OPCR=0x60;//Amplifier gain is R3/R1 void AmpCloseLoop() DDR6_P60=0; DDR6_P61=0; DDR6_P62=1; OPCR=0x40;//Amplifier gain is 20V/V void main(void) __DI(); __set_il(3); InitIrqLevels(); WDTH =0xA5; WDTL =0x96; WATR =0xEE;...
  • Page 17 /* ILRx ILR0 = 0xFF; // IRQ0: external interrupt ch0 | ch4 // IRQ1: external interrupt ch1 | ch5 // IRQ2: external interrupt ch2 | ch6 // IRQ3: external interrupt ch3 | ch7 ILR1 = 0xFF; // IRQ4: UART/SIO ch0 // IRQ5: 8/16-bit timer ch0 (lower) // IRQ6: 8/16-bit timer ch0 (upper) // IRQ7: Output Compare ch0...
  • Page 18 #pragma intvect DefaultIRQHandler 6 #pragma intvect DefaultIRQHandler 7 #pragma intvect DefaultIRQHandler 8 #pragma intvect DefaultIRQHandler 9 #pragma intvect DefaultIRQHandler 10 // IRQ10: Voltage Compare ch0 #pragma intvect DefaultIRQHandler 11 // IRQ11: Voltage Compare ch1 #pragma intvect DefaultIRQHandler 12 // IRQ12: Voltage Compare ch2 #pragma intvect DefaultIRQHandler 13 // IRQ13: Voltage Compare ch3 #pragma intvect DefaultIRQHandler 14 // IRQ14: 16-bit free run timer #pragma intvect DefaultIRQHandler 15 // IRQ15: 16-bit PPG0...

Table of Contents