D/A Converter
When CS=0 and ILE=1, the signal on the data bus is written into the 8-bit input latch when the WR1 signal is valid.
When XFER=0, the data of the input register is transferred to the 8-bit DAC register when the WR2 signal is valid, and the output value changes accordingly
Way of working:
Direct working mode (as shown in the following experiment)
When a ground line or the output line of the address decoder makes CS valid (low level), ILE high level, and WR1/XFER/WR2 is low level, the data byte on the microcontroller data line passes directly through the D/A converter, is converted and output
CS and WR1 are connected to the pins and set to low level by software
VCC, VREF, ILE connect to POWER
WR2, XFER, RFB, GND*2 to GND
Single buffer mode
Only applicable to systems with only one analog output or several analog outputs but no synchronization is required
ILE, VCC to POWER
CS and XFER are connected to the microcontroller pins, and the input register and DAC register addresses are both 7FFFH
WR1 and WR2 are connected to the MCU WR pin, and the MCU write signal
When the microcontroller performs a write operation on DAC0832, a byte of data is directly written into the DAC register, and the output analog value changes accordingly.
Double buffering
When multiple D/A conversion interfaces require synchronous D/A conversion output, double buffering must be used. The input latching and D/A conversion output of DAC0832 digital quantity are completed in two steps. That is, the CPU data bus outputs digital quantity in time-sharing and latches it in the input register of each D/A converter; then the CPU sends a control signal to all D/A converters, and each input register → DAC register realizes synchronous conversion output.
Each analog output requires a DAC0832
The output latch address of DAC0832 (1) is 0DFFFH
DAC0832 (2) output latch address 0BFFFH
The DAC register address of the two DAC0832s is the same as 7FFFH
————————————————————————————————————————————
Triangle wave generator experiment based on DAC0832
Experimental description:
Use the DAC0832 chip to make a signal generator and output a triangle wave signal
Direct working mode
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Wiring Instructions:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Implementation code:
include typedef unsigned char uchar; typedef unsigned int uint; sbit cs = P3 ^ 7; sbit wr = P3^6; void Delay(uchar m) { while(m--); } void main() { uchar k = 0; //Set the initial value of k to 0 cs = 0; //When CS and WR1 are set to low level, be ready to write data. As long as there is data output from P0 port, DAC0832 will convert it into analog signal wr = 0; while(1) //The output value changes between 0-255 and 255-0, and the analog signal can be seen through the oscilloscope { while(1) //The output value changes between 0-255 { P0 = k++; //output k and k+1 Delay(1); if (k == 0xff) //End the loop when it reaches 255 break; } while(1) //The output value changes between 255-0 { P0 = k--; //Output k and k-1 Delay(1); if (k == 0x00) //End the loop when it reaches 0 break; } } }
Previous article:Design of A/D Digital Voltage Meter Based on Single Chip Microcomputer
Next article:Design of frequency measurement control system based on single chip microcomputer
Recommended ReadingLatest update time:2024-11-24 21:21
Recommended posts
- Tank-1 test stand description (for burning and testing ESP8266 series)
- Tank-1teststanddescriptiondatacanbeburnedandtestedinsmallbatches
- 普拉世科技 Download Centre
- [ST NUCLEO-U575ZI-Q Review] GPIOG port lighting problem
- SomenetizensareaskingwhyPG2doesn'tlightup.Hereisanexplanation.BecausePG2usesVDDIO2,itsVDDIO2powersupplyneedstobeconfiguredseparately. VDDIO2needstobeenabledfirst.NotethatthePWRclockneedstobeenabled
- qinyunti stm32/stm8
- What is the difference between the bypass and filtering functions of capacitors?
- Whatisthedifferencebetweenthebypassandfilteringfunctionsofcapacitors? Bypassingisaimedatthesignalpath,providingalooptothegroundforcertainspectralcomponentsinthesignal,suchashigh-frequencybypass.Bypassingisa
- 深圳小花 MCU
- [Digi-Key Follow me Issue 2] When purchasing Adafruit ESP32-S3 TFT Feather, be careful of the onboard BME280! !
- Shareamessage: AfterseeingtheFollowme2ndevent,Iimmediatelyplacedanorderfortheboard,but...TodayItookacloserlookandfoundthattheonboardsensorwasmissingaBME280.Soifyouaregrouporderingmaterials,youcanconsider
- alanlan86 DigiKey Technology Zone
- Introduction and working principle of humidity sensitive capacitor (humicap)
- Humiditysensitivecapacitors(Englishname:humicap)aregenerallymadeofpolymerfilmcapacitors.Commonlyusedpolymermaterialsincludepolystyrene,polyimide,celluloseacetate,etc.Whentheambienthumiditychanges,thedielectricconstant
- Jacktang Analogue and Mixed Signal
- Reading finalists: "Fun micro-projects, easy to learn Python" + basic knowledge data types
- Pythonisadynamicallytypedlanguage,meaningyoudonotneedtospecifythetypeofavariablewhenyoudeclareit. ThereareindeedmultipledatatypesinPython,whichdeterminewhattypeofdataavariablecanstoreandwhatoperationscanb
- meiyao ARM Technology
- Popular Resources
- Popular amplifiers
- Microgrid Stability Analysis and Control Microgrid Modeling Stability Analysis and Control to Improve Power Distribution and Power Flow Control (
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Introduction to Internet of Things Engineering 2nd Edition (Gongyi Wu)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- CATL releases October battle report
- Battery industry in October 2024: growth momentum remains unabated!
- Mercedes-Benz will launch the eCitaro equipped with NMC4 batteries to provide high energy density and long life
- Many companies have announced progress on solid-state batteries. When will solid-state batteries go into mass production?
- Xsens Sirius Series Inertial Sensors Enable 3D Inertial Navigation in Harsh Environments
- Infineon's Automotive Landscape: From Hardware to Systems
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- Who knows how to use CMU200? I want to learn
- TMS320C2X/C5X Applications
- Six manufacturers won the bid for China Mobile's mobile phone customization
- TI supports Bluetooth technology for high-precision body temperature measurement flexible PCB reference design
- Problems of charging and discharging dual capacitors in peak detectors
- MSP430 SCH and PCB library files
- Keil's video tutorial
- Can the lost humanity be restored? (Speech by Li Ka-shing)
- PCB LAYOUT Manual
- EEWORLD University Hall----Live Replay: HARTING- How to quickly and cost-effectively install cables in electrical control cabinets