Design of data acquisition system based on C8051F060 microcontroller and K9F2808UOC memory

Publisher:幸福梦想Latest update time:2024-02-22 Source: elecfansKeywords:C8051F060 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Since the 1990s, electronic technology has been applied in underground drilling. However, the vibration of downhole drilling tools will have adverse effects on many sensors.


In particular, it has a huge impact on the inertial navigation sensor that measures the attitude of the downhole drill bit. In the vibration environment while drilling, if the signal is not processed, the correct well inclination and azimuth angle cannot be measured at all, and the well trajectory while drilling cannot be realized. control requirements. This article introduces the implementation method of high-speed vibration acquisition and storage function using DMA technology in SoC chip, and gives the test results in the drilling environment.


1 Proposal of method

The traditional data collection method adopts the method of direct control of the CPU for data collection. Data transmission needs to be transferred by the CPU before it can be stored in the memory. The transmission speed is slow and the collection rate is limited by the CPU, which greatly affects the sampling frequency of the system and cannot meet the requirements of the system. Requirements for high-speed acquisition of vibration signals. In the DMA transfer mode, data transfer does not go through the CPU, and the DMA controller realizes direct and rapid transfer of data between the memory and peripherals. In the measurement and control system of XTCS, the SoC chip used in the CPU is integrated with DMA. By working together with other devices, it can achieve simultaneous acquisition and storage, achieve the purpose of high-speed signal acquisition, and obtain high-fidelity underground vibration signals.


2 System introduction

The acquisition system uses C8051F060 SoC as the core, and C8051F060 integrates ADC and DMA internally. In addition, large-capacity memory chip K9F2808 is used as data memory. The system structure is shown in Figure 1.

Design of data acquisition system based on C8051F060 microcontroller and K9F2808UOC memory

Figure 1 Signal acquisition system structure diagram

This system is used as a detection device for underground related signals. Since the pressure and vibration signals collected by the pressure and vibration sensors are relatively weak, an amplifier circuit is required to condition and amplify the signals. The output of the sensor is an analog signal, which will be interfered by noise when collecting data. In order to eliminate the noise and improve the common mode rejection ratio and input impedance of the circuit, the acquisition amplifier circuit uses a pre-input buffer three-op-amp structure. Since ADC0 in the SoC can only collect positive signals, a bias circuit is provided after the conditioning amplifier circuit to convert the voltage of -5V ~ +5V into 0V ~ +2.5V to facilitate signal collection.

The CPU controls the multi-channel selection switch to collect the signal, and then converts it through the ADC. In the DMA transmission mode, the collected data is directly written into the memory K9F2808. While the DMA stores the data, the ADC is also collecting. After software testing, the time required to record and collect a page of 512 bytes using the timer 2 integrated in the SoC is 1.277ms, while writing a page of data to the off-chip memory K9F2808 requires 0.722ms.

The time it takes for the ADC to collect a page of data is less than the time it takes for the DMA to write a page of data off-chip. Therefore, data collection and storage can be performed at the same time without data overwriting and loss, achieving fast and accurate data collection.

3 Hardware part

The C8051F060 microcontroller is core-compatible with the 51 series microcontroller. It integrates two 16-bit SAR (successive comparison) ADCs and a DMA function module. There are 4352 bytes of data memory, 64KB flash memory and 64KB data memory interface on the chip, which can be used for system programming. The two SAR ADCs have 16-bit accuracy and are available as two single-ended or one differential converters. If DMA is used to store data directly into RAM, no additional software overhead is required.

K9F2808UOC memory is an ultra-large-capacity data storage device with NAND structure and is widely used in MP3, USB flash drives, digital cameras and PDAs. Its power supply voltage is 1.7V~3.6V, small size, low power consumption, read and write by page, erase by block, time-sharing multiplexing through the I/O port as command/address/data, the port supports real-time bidirectional input and output . Connect each control port of the flash memory to the P3 port of the SoC, and connect the general I/O port to the P7 port of the SoC. By controlling the output of the SoC port line, the FLASH memory can be read, written, and erased. Figure 2 is the interface circuit diagram of the chip.

Figure 2 Chip interface circuit diagram

4 A/D conversion and data storage

The ADC subsystem of C8051F060 integrates a track-and-hold circuit, a programmable window detector and a DMA interface. The two ADCs can be configured as two independent single-ended ADCs or form a differential pair. Data conversion mode, window detector and DMA interface can all be controlled by software special function registers. ADCn is enabled when the ADnEN bit in the ADC control register ADCnCN is set to logic 1. The ADC0 selected in this system has 4 conversion start modes, which are determined by the status of the ADC0 start conversion mode bits (AD0CM1, AD0CM0) in ADC0CN. The measurement and control system software uses timer 3 overflow to perform timed continuous conversion acquisition. After initializing the ADC, the ADC will automatically collect once when timer 3 overflows. After collecting one page of data, the collected data is directly stored in the off-chip flash memory K9F2808 under the DMA transfer mode, and the chip is read, written and erased.

In this measurement and control system, VB language is used to write the upper computer program, and C51 language is used to write the lower computer program. The upper computer controls the lower computer to perform corresponding tasks. Since the system's SoC integrates UART, communication can be achieved through the RS232 serial port of the PC. Each time the slave computer receives a task command, the program of the slave computer jumps into the corresponding serial interrupt program to execute the task. The main program of the lower computer includes continuously starting the DMA program, calling the writing program of the external memory K9F2808UOC, and sending the 512 bytes collected by DMA to the K9F2808 to achieve synchronization of collection and storage. The main program flow chart is shown in Figure 3. The subroutines mainly include: crystal oscillator initialization, port initialization, serial port initialization, ADC initialization, DMA initialization, timer 3 initialization, erasure program of the off-chip memory K9F2808UOC, delay program, etc.

Figure 3 Lower computer main program flow chart

Here, crystal oscillator initialization mainly completes the configuration of the external oscillator; port initialization completes the initial configuration of ports p0~p7; serial port initialization completes the configuration of timing counters T0 and T1 and the setting of the baud rate; ADC0 initialization completes ADC0 Configuration; DMA0 initialization mainly completes the configuration of DMA0, setting the external data memory start value, ADC0 start mode, etc.; Timer 3 initialization mainly completes the setting of the reload value and stimulates ADC0 to collect; the erasure of the off-chip memory K9F2808 The program completes erasing the data in K9F2808.


5 Performance testing and indoor experiments

After the hardware and software debugging, we sent the test circuit and sensor to the standard vibration table of the Petroleum Instrument Quality Inspection Center, and tested it on (10g, 1000Hz), (25g, 100Hz), (25g, 200Hz), (25g, 1000Hz) The test system was calibrated under the conditions and proved that the measurement accuracy of vibration amplitude is 1% and the measurement accuracy of vibration frequency is 5‰. This accuracy can meet the vibration measurement requirements of the steerable drilling system.


Keywords:C8051F060 Reference address:Design of data acquisition system based on C8051F060 microcontroller and K9F2808UOC memory

Previous article:Design of seismic survey sensor network based on C8051f020 microcontroller and UDP/IP protocol
Next article:Design of digital circuit for acoustic detection system based on CPLD chip and C8051F020

Recommended ReadingLatest update time:2024-11-23 05:05

Despite the powerful configuration of the M1 iPad Pro: RAM usage is limited to 5GB
Although Apple offers M1 iPad Pro configurations with 8GB and 16GB of RAM, developers now say that RAM usage is limited to 5GB regardless of what configuration the app runs on. The ‌M1 ‌‌iPad Pro ‌ comes in two RAM configurations: 8GB of RAM for the 128GB, 256GB, and 512GB models, while the 1TB and 2TB models have 1
[Mobile phone portable]
STM32F1_External SRAM as running memory
Preface Today's summary of "STM32F103   External SRAM as running memory". We all know what running memory means. It is mainly the RAM used when the program is running. For example, the global variables and local variables we define will open up a space for them in RAM when the program is running for use during runtime
[Microcontroller]
STM32F1_External SRAM as running memory
Memory Management Unit MMU
The Memory Management Unit (MMU) is responsible for mapping virtual addresses to physical addresses and provides hardware-based memory access permission checks. Modern multi-user, multi-process operating systems use MMU to allow each user process to have its own independent address space: the address mapping function
[Microcontroller]
Memory Management Unit MMU
Nubia Red Magic 7: There is an under-screen camera version, Snapdragon 8 Gen1 + 18GB large memory
 The Red Magic Gaming Phone 7 is equipped with the Snapdragon 8 Gen 1 chip, has four industry firsts, and will be officially released in February.   According to digital blogger @数码闲聊站, the Red Magic Gaming Phone 7 will be the first gaming phone with an under-screen front camera and will have an under-screen camera ve
[Mobile phone portable]
Nubia Red Magic 7: There is an under-screen camera version, Snapdragon 8 Gen1 + 18GB large memory
Samsung HBM memory chips pass Nvidia test and will start mass production
On July 4, South Korean media NewDaily reported that Samsung Electronics passed Nvidia's HBM3e (high bandwidth memory) quality test. Samsung is about to start mass production of HBM memory chips and negotiate with Nvidia on supply issues. Samsung Electronics recently received a PRA (Product Readiness Approval)
[Semiconductor design/manufacturing]
TQ2440 National Embedded Academy gboot-memory initialization
The S3C2440A memory controller provides memory control signals that are required for external memory access. The S3C2440A has the following features: — Little/Big endian ( selectable by a software) — Address space: 128Mbytes per bank (total 1GB/8 banks) — Programmable access size (8/16/32-bit) for all banks except
[Microcontroller]
DigiKey announces global partnership with Kingston Technology, one of the leaders in memory and storage solutions
DigiKey Announces Global Partnership with Kingston Technology, a Leader in Memory and Storage Solutions DigiKey, a global distributor of electronic components and automation products with full stock and fast delivery, today announced a partnership with Kingston Technology to distribute its memory prod
[Embedded]
DigiKey announces global partnership with Kingston Technology, one of the leaders in memory and storage solutions
u-boot-2011.03 porting on mini2440/micro2440 runs in RAM
2.1 include/configs/micro2440.h delete #define CONFIG_S3C2410 1 /* specifically a SAMSUNG S3C2410 SoC */ #define CONFIG_SMDK2410 1 /* on a SAMSUNG SMDK2410 Board */ Add #define CONFIG_S3C2440 1 /* specifically a SAMSUNG S3C2440 SoC */ #define CONF
[Microcontroller]
u-boot-2011.03 porting on mini2440/micro2440 runs in RAM
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号