AVR microcontroller can collect Manchester code signal, depth signal, pulse signal and analog signal effectively. It is widely used in logging acquisition system. The system collects the structure of the upper and lower computer, the upper computer is a notebook, the lower computer is a processor, and the master-slave mode is formed by passing through the peripheral excuse. The upper computer notebook computer of the logging acquisition system is mainly used to run the software of logging acquisition, to run and process the management of the system, the sending of logging commands, logging data, the acceptance and processing of signals, graphic display and so on. It also has the function of printing and human-computer interaction. The upper computer needs RS232 serial port to keep communication with the lower computer. The lower computer mainly includes power circuit, transmission of Manchester coded commands, data reception, pulse and depth technology, A/D conversion and so on. The lower computer unit uses two AVR microcontrollers from ATMEL Company to collect data and communicate with serial port. Logging signal is amplified in two-stage in-phase amplifier composed of operational amplifier after signal coupling and first-order RC high-pass filtering and low-pass filtering, including restriction amplitude of positive and negative 5V signals, and amplified by adjusting external potentiometer. The output signal after amplification is the INT0 port of ATmega8535. Acquisition. Under the control of the program, the coding information can be recorded and read, and the logging data content can be recorded.
The command is also generated by the PD6 and PD7 ports of ATmega8535. At the same time, with the help of cable transmission, the logging signal coupling transformer reaches the downhole. After reversing the phase of CD4049, two depth signals A and B are identified by CD4013 to ascend and descend the direction, and then the direction pulse is given. Deep A and B phase pulses and directional pulses are collected by PD5 and PD6 ports of ATtiny2313 respectively. After shaping and amplification, the pulse signal is also collected by PD2 port of ATtiny2313. After the bridge rectifier, the 220 volt AC power supply has obtained positive and negative 5 volt DC power supply and positive and negative 12 volt DC power supply respectively from the integrated voltage stabilized power supply, which can supply power for the lower computer. Serial communication is composed of ATmega8535, ATtiny2313 and ADM2321. Among them, ATmega8535 and ATtiny2313 constitute the master-slave mode through serial peripheral excuse.
Through the master-slave mode and serial communication, the crystal oscillation frequency reaches 9.216MHz. ADM232L has RS232 driver and receiver. Processing. Like PIC processors, AVR microcontrollers are independent computers integrated into a single chip. For any small control application, AVR processor is the best choice of controller in logging acquisition system.
AVR microcontrollers contain a set of built-in on-chip peripherals and can also extend additional functions outside the chip. AVR microcontroller, named Adwanced RISC in English, is an 8-bit microcontroller manufactured by ATMEL and developed in Norway, which can enhance the performance of flash embedded in RISC. This Harvard RISC processor is designed to speed up the execution of instructions and reduce the power consumption of the system. It has 32 8-bit universal registers (r0-r31), 6 of which can be compounded into 3 16-bit index registers, and the AVR microcontroller has 118 instructions in total, providing a multi-functional programming environment. In most AVR processors, the stack exists in general memory space.
For this reason, it can be directly operated by instructions, and the stack size is not limited. AVR has independent program storage and data storage space, and can support 8M address space. The throughput of AVR processors is also very powerful. During the same frequency operation, the execution speed of AVR is 7 times that of PIC16, 15 times that of 68HC11 and 28 times that of 8051. ATmega8535 requires different buses and memory for program storage and book order storage. When executing instructions, frightening instructions can be removed from program memory in advance. Instructions can be executed within a clock cycle, with an average world of 50 ns per instruction. ATmega8535 has UART, which can communicate asynchronously, without taking up the transmission function of timer and SPI, and can handle interrupts independently at the end of transmission, when the sending data register is interrupted in the air, and when the receiving end interrupts. And it can support C language programming, AVR uses internal flash memory to store programs, and also can realize in-circuit programming. If the socket element is used, it can also be programmed out of the circuit. AVR processor is programmed again through the serial peripheral interface SPI on the chip.
When in the programming state, the pins PB0, PB1 and PB2 of the chip are connected to the function end of SPI respectively, and the AVR has AD conversion function with an accuracy of 8-10 bits, which can be selected. According to the application principle of AVR microcontroller, we can know that ATmega8535 and ATtiny2313 use 9.216 MHz working frequency to collect depth, logging direction, pulse and other signals. ATtiny2313 is also used to decode logging coded signals, which can accept 16 bits of data after high-speed A/D conversion and generate commands sent to downhole together. After the analog signal is input to AD976d 1 foot, thermostatic element a 16-bit A/D conversion is performed. There is only one buffer in the sending direction of SPI system and two buffers in the receiving direction. When sending, you must wait until you think the process is complete before you can write to the SPI data register. At the time of data acceptance, the register data of SPI data should be read before the end of the next character shift process, otherwise the first byte will be lost. AVR microcontrollers communicate in master-slave mode. Two AVR microcontrollers are processors of the acquisition system. They can enhance the signal processing ability of the system, and do not need program storage and data storage. Serial communication devices are very simple, which can greatly simplify the hardware of the system. So that the design of the acquisition system can be very portable. The internal hardware system can supervise and implement supervision instructions, which greatly improves the security and applicability of the whole system, makes the operation of the whole system easier and more convenient.