It is the core and basic function of this kind of green laser pointer

Each cycle at the beginning of the PWM waveform is high, when the flip, the PWM waveform change, until the next cycle at the beginning of the PWM waveform is again high, and so on. Anti-logic: at the beginning of each cycle, the PWM waveform is low, when the flip, the PWM waveform change until the next cycle at the beginning of the PWM waveform is again low, and so on. This topic is anti-logic. Because the hardware circuit design on the reverse processing of the PWM logic, but the duty cycle calculation is based on positive logic to calculate the program will need PWM logic and then reverse. EVA is the TIMER1 generate the PWM principle shown in Figure 4 3. So that the customer can take green laser pointer along with them.
AD sampling interrupt. AD sampling interrupt is generated by the DSP hardware, after the When DSP completion of one AD sample, will produce an AD sampling interrupt. The program responds to the interruption, into the AD sample the ISR. IR AD sample, obtained 12 AD sample value. Sampled values into digital controller program to calculate the PWM duty cycle of the next cycle, and then update EVA_TIMER1 compare register. Finally reset the AD converter to complete the interrupt acknowledge []. Execution flow is shown in Figure 43. Digital controller. Digital controller design is the difficulty of the entire software system. The controller is good or bad, is directly related to overall system performance. Digital controller design the most difficult is precisely the transfer function.  green laser pointer  is useful during the travel or camp in the open air.
First in a changing input voltage; Second, the internal resistance of the load is non-linear changes; Finally, the output filter inductor inductance decreases with increasing current. By the relationship between current and inductance, ferrite core 10A in the inductance decreased by 20%. Inductance change, a direct impact on the system transfer function. Buck circuit current continuous mode input voltage and output voltage: Vo = Vin * D. Change the duty cycle, you can change the size of the output voltage, thereby changing the entire loop current. RLC tester measured in the 25Khz frequency, output LC filter parameters, L, 0.7mH; C, 2000uF, ESR/50mΩ. Krypton lamp dynamic impedance R = 3Ω or so. This kind of green laser pointer is especially suitable and appropriate.
As a result of the average current control method, the actual control is the average inductor current. Inductor current and duty cycle of the transfer function onto the process is as follows, using state space averaging method to establish a system of small-signal model, and its strike Laplace's transform. Similarly, the DSP core frequency of 150Mhz, the switching frequency of 25Khz, so that each switching cycle resolution is. The above analysis assumes that the system is a continuous system, while the actual system is a discrete sampling system, you need to take into account the sample and hold time and control delay time. Sample and hold time the main aspects of the decision of the AD converter link and PWM output to control the delay time is determined by the software architecture adopted.  green laser pointer  is for the outdoor use of the customer.
Consider a discrete link delay, the phase delay of the system increases, will reduce the stability of the system. From zero frequency to the frequency area, the gain of the system should be based on the slope of the -40dB/dec decline, so you can ensure that low-frequency gain of the system is infinite, can achieve the steady-state error is zero; the slope of the frequency area gain -20dB/dec decline, and the system's crossover frequency as high as possible. This will ensure that the system frequency area is wide enough to speed up the speed of the system dynamic response; high frequency region gain to -40dB/dec or higher, the slope of the attenuation can effectively suppress the noise and other high-frequency interference. Analysis of the Bode diagram of the existing system can be seen that the existing system is stable, but not good enough. Because this kind of green laser pointer owns the water-proof design.
articles from:
http://laserpointers.neoblogs.gr/2012/04/06/the-dream-of-owning-a-green-laser-pointer-can-come-true/
http://laserpointers.blogbnd.com/2012/04/06/the-dream-of-owning-a-green-laser-pointer-can-come-true/
http://laserpointers.onlineshoe.co.cc/2012/04/06/the-dream-of-owning-a-green-laser-pointer-can-come-true/
http://laserpointers.javidblog.com/1391/01/18/the-dream-of-owning-a-green-laser-pointer-can-come-true/
http://www.blogvan.nl/laserpointers/2012/04/06/the-dream-of-owning-a-green-laser-pointer-can-come-true/