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
Business center
Publish Info
Publish Info
Rank Promotion
Rank Promotion
 
Location: Home » Know » Notice: Undefined index: 115 in /home/www/html/en.liang360.net/html/include/global.func.php on line 505 » 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.

Total19 concern     Question person: admin I want to 
answer  


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

 
Question Searching
     
Related Problem
Notice: Undefined index: 115 in /home/www/html/en.liang360.net/html/include/tag.func.php on line 66
Waiting for your answer
 
 
Home | Copyright | User agreement | Contact us | About us | Site map | Links | Guestbook | Advertising
Copyright©de.liang360.com
Powered by Liang360