Microchip Technology MCP1252 Скачать руководство пользователя страница 13

Installation and Operation

©

 2005 Microchip Technology Inc.

DS51551A-page 9

Activating Application and Changing the LED intensity

1.

To activate the LEDs, simply press the S1 push button. The LEDs will turn on at 
a low intensity level when the push button is pressed, gaining intensity when the 
push button is pressed again. There are 5 levels of LED intensity (plus the “off” 
state). 

The intensity of the LEDs are controlled via the SHDN input pin of the MCP1252. 
A Pulse-Width Modulated (PWM) signal is generated by the PIC10F206 and routed 
to the SHDN input pin of the MCP1252. The MCP1252 is actually pulsed, and the 
duty cycle of the PWM waveform is varied, such that narrow pulses create a 
low-intensity condition, while wider pulses create a high-intensity condition.

2.

The LEDs will be turned off, and the system will enter Sleep mode, when the 
LEDs are in the high-intensity state and the push button is pressed. Subsequent 
push button presses will cycle the LEDs as described in Step 1.

Evaluating the Application

The best way to evaluate the MCP1252 Charge Pump Backlight LED Demo Board is 
to dig into the circuit. Measure voltages and currents with a DVM and probe the board 
with an oscilloscope. Test points have been provided to simplify this task. The test 
points correspond to the pins of the MCP1252: PGD (= PGOOD), Vout, V

DD

 (= V

IN

), 

GND, SHDN and FB.

The firmware program in the PIC10F206 can also be edited to modify the operation of 
the application. For example, the output signal that is routed from GP0 of the 
PIC10F206 to SHDN of the MCP1252 can be changed to implement different light 
intensities, slowly blinking the LEDs on/off or provide some other pattern. There is also 
an optional push button (S2) that can be used to provide additional control options to 
the system

Firmware

The PIC10F206 comes preprogrammed with firmware to operate the system as 
described above. The program file can be found on the CD that comes with the kit. The 
file listing and firmware flow diagram are shown in Appendix C. “00016R1.asm 
Source Code”
.

The program is fairly simple and straightforward. There is an initialization routine at the 
beginning of the program. The constants allow for five LED intensity levels to be 
adjusted to the appropriate light intensity (

LED_HI_ON

LED_MEDHI_ON

, etc.), set the 

PWM period (PERIOD) and maximum time (

MAX_TIME

) before the unit switches back 

to Sleep mode. The variables track what mode the unit is in (

MODE

), implement 

counters (COUNTER, TIMERH, TIMERL), etc.

Upon resetting the processor, the ports are initialized and registers are configured in 
the INIT_PORTS routine. If the device has come out of Sleep mode, the 

MODE

 variable 

is set so the LEDs will be at low intensity. The OPTION register is configured to 
wake-up on Port pin change. The GPIO port is configured to set GP0 (PWM to the 
MCP1252) as an output and GP1, GP2 and GP3 (push button) as inputs. The 
processor will reset on power-up or due to a wake-up from Sleep mode. Therefore, the 
STATUS register needs to be tested to determine the source of the reset. If the reset 
occurred due to powering up the system for the first time, the program proceeds to the 

INIT_VARS

 subroutine, where the program variables are initialized. If the reset 

occurred due to a wake-up from Sleep mode, the program proceeds to the 

WAKE

 

subroutine.

Содержание MCP1252

Страница 1: ...2005 Microchip Technology Inc DS51551A MCP1252 Charge Pump Backlight LED Demo Board User s Guide...

Страница 2: ...l other trademarks mentioned herein are property of their respective companies 2005 Microchip Technology Incorporated Printed in the U S A All Rights Reserved Printed on recycled paper Note the follow...

Страница 3: ...252 Charge Pump Backlight LED Demo Board kit includes 6 Chapter 2 Installation and Operation 7 2 1 Introduction 7 2 2 Features 7 2 3 Getting Started 8 Appendix A Schematic and Layouts 11 A 1 Introduct...

Страница 4: ...MCP1252 Charge Pump Backlight LED Demo Board User s Guide DS51515A page iv 2005 Microchip Technology Inc NOTES...

Страница 5: ...diagrams for the MCP1252 Charge Pump Backlight LED Demo Board Appendix B Bill Of Materials BOM Lists the parts used to build the MCP1252 Charge Pump Backlight LED Demo Board Appendix C 00016R1 asm So...

Страница 6: ...Settings dialog A menu selection select Enable Programmer Quotes A field name in a window or dialog Save project before build Underlined italic text with right angle bracket A menu path File Save Bol...

Страница 7: ...and factory representatives CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels Distributor or Representative Local Sales Office Field Application Engineer FA...

Страница 8: ...MCP1252 Charge Pump Backlight LED Demo Board User s Guide DS51551A page 4 2005 Microchip Technology Inc NOTES...

Страница 9: ...g other LED applications Light intensity is controlled uniformly through the use of ballast resistors The peak intensity is set by the feedback FB to the the MCP1252 ADJ Dimming is accomplished by pul...

Страница 10: ...output current In addition a charge pump is a low cost compact and simple solution for an application as it only requires one external capacitor to transfer charge from the input supply to the regulat...

Страница 11: ...he system in a standby mode that consumes less than 1 A of current typ The PIC10F206 microcontroller is programmable allowing the user to modify or develop their own firmware routines to further evalu...

Страница 12: ...d remain in a low power sleep mode 1 A until the S1 button is pressed by the user The MCP1252 Charge Pump Backlight LED Demo Board does not need a power switch or power jumper because of the standby o...

Страница 13: ...n be changed to implement different light intensities slowly blinking the LEDs on off or provide some other pattern There is also an optional push button S2 that can be used to provide additional cont...

Страница 14: ...ard comes pre programmed with F W to operate the system The PIC10F206 can be reprogrammed with the Baseline Flash Microcontroller Programmer BFMP The BFMP is a simple and easy to use in circuit serial...

Страница 15: ...logy Inc DS51551A page 11 Appendix A Schematic and Layouts A 1 INTRODUCTION This appendix contains the following schematics and layouts for the MCP1252 Charge Pump Backlight LED Demo Board Board Schem...

Страница 16: ...MCP1252 Charge Pump Backlight LED Demo Board User s Guide DS51551A page 12 2005 Microchip Technology Inc A 2 BOARD SCHEMATIC M...

Страница 17: ...Schematic and Layouts 2005 Microchip Technology Inc DS51551A page 13 A 3 BOARD TOP ASSEMBLY DRAWING M...

Страница 18: ...MCP1252 Charge Pump Backlight LED Demo Board User s Guide DS51551A page 14 2005 Microchip Technology Inc A 4 BOARD TOP LAYER SILK SCREEN...

Страница 19: ...Schematic and Layouts 2005 Microchip Technology Inc DS51551A page 15 A 5 BOARD BOTTOM LAYER FROM TOP...

Страница 20: ...MCP1252 Charge Pump Backlight LED Demo Board User s Guide DS51551A page 16 2005 Microchip Technology Inc NOTES...

Страница 21: ...6ENF1002V 2 R7 R12 RES 4 99K OHM 1 10W 1 0805 SMD Panasonic ECG ERJ 6ENF4991V 3 R6 R8 R10 RES 49 9K OHM 1 10W 1 0805 SMD Panasonic ECG ERJ 6ENF4992V 1 R11 RES 100K OHM 1 10W 1 0805 SMD Panasonic ECG...

Страница 22: ...MCP1252 Charge Pump Backlight LED Demo Board User s Guide DS51515A page 18 2005 Microchip Technology Inc NOTES...

Страница 23: ...rictions may subject the user to criminal sanctions under applicable laws as well as to civil liability for the breach of the terms and conditions of this license THIS SOFTWARE IS PROVIDED IN AN AS IS...

Страница 24: ...figuration word constants increase led_xxx_on to increase intensity value must be less than period value increase period to reduce PWM frequency and increase PWM resolution led_hi_on 0x16 on loops for...

Страница 25: ...eset org 0x10 reset nop nop bcf OSCCAL FOSC4 GP2 T0CKI COUT applied to GP2 pin init_ports movlw 0x01 initalize mode upon wake up led will be at low intensity movwf mode movlw b 00001111 configure for...

Страница 26: ...led_med_off f movlw period addwf led_med_off f movlw led_low_on calculate off times based on time remaining in PWM period movwf led_low_off add the complement of on time to the window time comf led_lo...

Страница 27: ...btfss flag new_mode goto led_full goto mode_select high brightness routine led_high bsf GPIO pwm turn on LED s for a set time movlw led_hi_on call delay bcf GPIO pwm turn off LED s fo a set time movf...

Страница 28: ...turn off LED s movf GPIO w read port before entering sleep mode sleep delay loop for on and off time delay movwf counter Delay 3 3 counter 2 Tcy loop decfsz counter f goto loop retlw 0x00 check for bu...

Страница 29: ...00016R1 asm Source Code 2005 Microchip Technology Inc DS51551A page 25 NOTES...

Страница 30: ...el 86 21 5407 5533 Fax 86 21 5407 5066 China Shenyang Tel 86 24 2334 2829 Fax 86 24 2334 2393 China Shenzhen Tel 86 755 8203 2660 Fax 86 755 8203 1760 China Shunde Tel 86 757 2839 5507 Fax 86 757 2839...

Страница 31: ...Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery Lifecycle Information Microchip MCP1252DM BKLT...

Отзывы: