• Based on AVR monolithic integrated circuit’s high accuracy frequency regulator

    Abstract: The precise frequency control is the modernization industrial production and the high accuracy test necessary method. May occur based on AD9850 surpasses the 1Hz frequency precision the signal, this regarding the frequency test very important. This article introduced this kind of frequency regulator takes the control core by Atmel Corporation’s AVR monolithic integrated circuit Atmega16L, uses 4×4 the keyboard to take the frequency value input device. And AVR monolithic integrated circuit scanning keyboard read-in user hypothesis frequency value. Afterward, the AVR monolithic integrated circuit calculates AD9850 the control word, and issues the instruction to AD9850. This article introduced the frequency controller may pass ” 1Hz” the key and “- 1Hz” the key trimming frequency value. This article expanded the liquid crystal display module to the frequency controller, therefore the current frequency value may by the real time display. It may produce the square-wave and the sine wave. In the design used the watch-dog timer to prevent the procedure to enter the endless loop, but could not the normal work.
       Key word: AVR, monolithic integrated circuit, frequency, control

    1 introduction
        In the modernization industrial production and the high accuracy test, we need the quite precise frequency to help the judgment equipment performance target. Moreover we hope to be able trimming this frequency. Uses the pressure to control the frequency which the oscillator obtains to be not very precise, the trimming frequency step is troublesome, time-consuming long, therefore some test item limited the pressure to control oscillator’s use.
    The Mega series monolithic integrated circuit was Atmel Corporation promotes one after another in 2002. This section of AVR enlargement mode monolithic integrated circuit has the speed to be quick, antijamming ability, low in price and so on many merits. In order to speed up the AVR monolithic integrated circuit’s software establishment, Atmel as well as the third party provide the development kit are many and varied, the procedure development convenience is effective. This monolithic integrated circuit interior FLASH structure function is flexible, after locking, is very difficult to decipher, may maximum limit protect the intellectual property rights. The AVR monolithic integrated circuit may widely apply in domains and so on correspondence, field assay, automobile electron, medical instrument, and is suitable for each kind of low voltage, the low power loss situation.

       This article proposed that one method can based on the AVR monolithic integrated circuit, use AD9850 to provide precisely to the 1Hz frequency code, not only may have the sine wave, may also have the square-wave, thus has solved the difficult problem for the request frequency precision high enterprise. It takes the core by Atmel Corporation’s AVR monolithic integrated circuit Atmega16L, can convenient, control the output frequency accurately. Because the AVR monolithic integrated circuit has realized online programmable, therefore simplified the design procedure greatly, sped up the design advancement, simultaneously will not burn down, the fever to spend the chip, saved the cost.

       Figure 1 has given this frequency regulator’s overall design diagram. The user through 4×4 the keyboard hypothesis frequency value, the AVR monolithic integrated circuit uses the I/O port, the scanning read-in frequency value. Afterward the AVR monolithic integrated circuit controls AD9850 to adjust the user request the frequency. The AD9850 output may meet the voltage comparator reshaping is a square-wave, may also pass through the low pass filter limit band width, the output sinusoidal waveform. The AVR monolithic integrated circuit simultaneously controls the liquid crystal display module, causes it real time display current frequency.

    Figure 1. Frequency regulator overall diagram

    2 control cores and the frequency have the technology
    2.1 control cores
        This design used Atmel Corporation’s AVR monolithic integrated circuit Atmega16L to take the control core. The AVR monolithic integrated circuit’s monocycle instruction can guarantee that high carries out the efficiency and the low cost, is simplifies in set of instructions CPU the high performance component. The AVR monolithic integrated circuit may provide reaches as high as 16 MIPS the execution times, has 128K the byte programmable Flash memory, simultaneously has 4096 byte static RAM. The AVR monolithic integrated circuit bringing watch-dog timer, may prevent the procedure under the intense electromagnetic interference condition to run flies. In this design uses Atmega16L also has the following characteristic:
    ·   The interior contains has the hardware multiplier, speeds up the multiply operation speed; The I/O port pin number reaches 32 much; 
    ·   Supports the online programmable function, does not need to insert frequently from the circuit wafer pulls out the chip; Has the programmable support synchronized transmission UART port;
    ·    Supports three to transmit the SPI port; Has the convenience I2C bus port, direct and Philips chip connection;
    ·   Supports the JTAG boundary scan electric circuit; Has the BOD low voltage measuring ability;
    ·   The interior has 8 group 10 A/D converters; Has 4 PMW, may coordinate or work alone;
    ·   The interior has the real-time clock electric circuit; The operating frequency is highest may reach 16MHz.

    2.2 AD9850 frequencies have the technology
        AD9850 is the low power loss direct digit frequency synthesizer chip which AD Corporation promotes, may produce from the cocurrent to the 62.5MHz wide band rate signal, from put into the market already to apply into today in the radar system, in the low power loss frequency source. Its good frequency synthesis function suits in the application in the high accuracy test. This design used AD9850 to take the profile generator, had the volume to be small, power loss low merit.

       In the control flow, the AVR monolithic integrated circuit was AD9850 has calculated the frequency control word, and read in the frequency control word in which. Unites on the small keyboard ” 1Hz” the key and “- 1Hz” the key, this design causes the frequency to be possible to the length of stride to be the 1Hz adjustment precisely. It may have the square-wave and the sine wave. The user requests when has the sine wave, we design the low pass filter to use for to filter the signal the high frequency component. This low pass filter may also use the fifth-order ellipse filter to realize. Figure 2 showed this system’s AD9850 electric circuit design drawing. PC2–PC5 may simultaneously as the I2C bus port.

    Figure 2 AD9850 circuit design

    3 input devices and output unit
    3.1 keyboard entry equipment and corresponding software
         This design used 4×4 the keyboard to take the frequency input device. Because the pressed key integer are few, only then 16, need to express from the 1Hz - 10MHz widespread frequency, therefore has selected the AVR monolithic integrated circuit scanning method in the software design. Port A 8 I/O pin completely as scanning keyboard use. Keyboard definition besides 0–9 altogether 10 digit, but also defined “the backspacing” the key, “to delete” the key, “the input” the key, ” 1Hz” the key and “- 1Hz” the key, like this might facilitate the user momentarily to revise the frequency and the trimming frequency enormously. When read-in user input frequency value, used the time delay against to shake the antijamming the software routine. The scanning variable’s starting value establishment is 0xFE, 0 changes in turn by the low level realizes the scanning. This monolithic integrated circuit keyboard scans the C code as follows shows:
                sccode=0xFE; /*every scan initiative value,11111110*/
                while (sccode! =0xEF)/*sccode is not 11101111, follow; or return 0*/
                {
                    PORTA=sccode; /*send scan code 11111110 to portA*/
                    PORTA=sccode; /*send scan code 11111110 to portA*/
                    if((PINA&0xF0)! =0xF0)/*read portA, if high 4 bits are not 1111, key pressed in this line*/
                    {
                        recode=(PINA&0xF0)|0×0F; /*portA high 4 bits reserved, low 4 bits are 1111*/
                        while((PINA&0xF0)! =0xF0)
                        {};
                        /*read portA, if portA high 4 bits are not 1111, key pressed,
                        if key pressed, we must wait, wait for key released*/
                        return((~sccode) (~recode)); /*return row column*/
                    }
                    else
                    {
                        sccode=(sccode<<1)|0×01;
                        /*scan code left shift 1 bit, add 1 to right,11111101*/
                    }
                }
        Returns finally the scan result includes the good value which and a row value the pressed key is. The judgment step is: The port A high 4 bit records in scanning variable recode, the low 4 bits sets at is 1111 first. Reads in port A once more high 4 bits, from this judges the pressed key whether to loosen. When the user has not loosened the pressed key, in the middle of the high 4 bits has the low level 0 existences, this time can only circulate the waiting. When after the user loosens the pressed key, will be only then high 4 bits to carry on with the low 4 bits according to the position counter-operation, and compound forms the scan result which returns finally. If has not examined has the pressed key to press down, will scan the variable sccode left shift 1 bit, continues to carry on the next scanning.

    3.2 liquid crystal display module
        The user after is carrying on the input frequency many times as well as ” 1Hz” and “- 1Hz” the trimming, concentrates in the observation signal output to under first-level electric circuit’s influence, often has forgotten the present system’s output frequency. Like this causes requests the trimming when the precise test not to know should to the high adjustment to the low adjustment. In order to inform the current frequency which the subscriber system locates, we expanded the liquid crystal display module, has realized the current frequency in the liquid crystal display module the real time display. The liquid crystal display module took monolithic integrated circuit Atmega16L PD0-PD7 to take the data interface, used monolithic integrated circuit’s PB0-PB4 achievement to control the port. Figure 3 has given the liquid crystal display module and the controller circuit design circuit diagram.
     
       The PB0 pin choice liquid crystal display module’s data-carrier storage or the instruction memory, the PB1 pin indicated that this operation is reads the liquid crystal display module to write the liquid crystal display module, PB2 constitutes the rise along along to complete the read-write succession with the drop. PB3 selects the liquid crystal display module responsibly the left half part, PB4 selects the right half part responsibly, usually PB3 and PB4 set are 1. What needs to pay attention, after the data or the instruction prepared, let PB2 carry on the level fluctuation again, otherwise the read-write will make a mistake.

       This design with the aid of the monolithic integrated circuit Atmega16L large capacity procedure memory, stores English letter and certain Chinese character’s font lattice as the array in monolithic integrated circuit’s procedure memory. Needs to demonstrate when some character direct transfer array, thus simplified the design, has realized English, the Chinese character as well as the graph demonstration. This design demonstration contact surface is friendly, operation controllability.

    Figure 3 liquid crystal display module and controller circuit design

    4 conclusions
        For the convenience modernization industrial production and the precise frequency test, we have designed based on the AVR monolithic integrated circuit’s high accuracy frequency regulator. In this design, may use on the small keyboard ” 1Hz” the key and “- 1Hz” the key, carries on the frequency conveniently precisely to the 1Hz adjustment. This frequency regulator volume is small, but function, makes the control core by Atmel Corporation’s AVR monolithic integrated circuit Atmega16L, the user may momentarily the regulating system output frequency. Used 4×4 the keyboard entry user hypothesis frequency value, the perch has been small, but the efficiency was high, the coding let the AVR monolithic integrated circuit scanning then obtain the frequency, has omitted the special-purpose keyboard interface chip 8279. The liquid crystal display module may the real time display current frequency, the demonstration contact surface be friendly, operation controllability. This system may have the square-wave and the sine wave.

       This design’s hardware and the software already applied in some frequency test production line. The industrial production and the test use indicated that this design simplified the frequency control process, the user easy to operate, has the electricity saving, the low cost, antijamming ability to be strong, frequency control precision high velocity quick characteristic.

    Reference
    [1] Atmel Corporation. 8-bit AVR Microcontroller with 16K Bytes In-System Programmable Flash Atmega16L data sheet. Atmel Corporation, 2003:3 - 18.
    [2] Atmel Data Sheets. http://www.atmel.com/dyn/products/devices.asp?family_id=607
    [3] Atmel Application Note. http://www.atmel.com/dyn/products/app_notes.asp?family_id=607

    Share/Save/Bookmark

No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

TOP
Copyright © 51 Research and Design, Electronic Engineers website - Embedded Systems, MCU, DSP, EDA, Test and Measurement, Components, Communications, Power, Microelectronics, Semiconductors
Powered by WordPress | Theme by mg12 | Valid XHTML 1.1 and CSS 3