More=> LED | pv-sources.com | Equipments | Job | BBS | Join free | Join free | Join free | Join free | Join free | Join free
| WAP Browse | RSS Feed
Business center
center
Publish Info
Info
Rank Promotion
Rank
 
Location: Home » Know » Tchnology R & D » Text

With two-color LED indication 10 status

Be resolved Tags:0 - There from the end of the problem

Market, a large number of optional two-color LED, a variety of shapes and colors, manufacturers such as Kingbright, Optosupply and so on. The LED provides a new opportunity, a LED can indicate only 10 states. Press a connection to an external interrupt pin micro-controller key switch, you can set the state (Figure 1). Each time you press, the interrupt routine will set the device to the next state (Figure 2).

 

State 0 is the standby mode, LED is off. Press the switch at this time waiting for equipment. LED colors indicate the following three states. For example, Kingbright's WP5A9EGW12.3SF LED may issue a red, green, orange color. With flashes can indicate the rest of the state. Red and green LED can be independently controlled, resulting in six indication combinations (Table 1).

Microcontroller's internal oscillator as a clock source, simplifying the circuit, because the oscillator does not require external components, the 5% tolerance sufficient for this application. Firmware to set the external interrupt input pull-up resistor built.

Clock speed prescaler and clock counter mode register values ​​together determine the LED blink rate. A 12.8 MHz internal oscillator clock, to obtain 3.2 MHz bus frequency, each cycle is equal to 0.3125 μs. The prescaler value is selected as 64, the time counter mode register can be calculated as 50 times a cycle timer period (in milliseconds). For example, to get the blink rate 1s, should be time counter mode is set to 50000, or hexadecimal $ C350.

List instead of using the method of polling procedures, can greatly reduce the size of the firmware (Reference 1). Here you can download the firmware into assembly code. This method is applicable to any micro-controller. Can even use different blink rate, indicating an increase in the number of states.

Total163 concern     Question person: admin I want to 
answer  


[ KnowSearch ]  [ ]  [ Tell friends ]  [ Print this text ]  [ Close ]  [ Back ]

 
Question Searching
     
Related Problem
Waiting for your answer
 
 
Home | Copyright | User agreement | Contact us | About us | Site map | Links | Guestbook | Advertising | 粤ICP备12039402号 |LED技术论坛 | 照明技术论坛 | 光电技术论坛 | LED展会 | LED china | china LED | LED灯出口德国 | LED灯出口西班牙 | LED灯出口阿拉伯 | LED灯出口东欧 | LED灯出口美国 | LED灯出口
Contact us
Powered by Liang360