| 数据搜索系统,热门电子元器件搜索 |
|
AN1781 数据表(PDF) 5 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1781 数据表(HTML) 5 Page - STMicroelectronics |
|
5 / 8 page ![]() 5/8 STR71x GPIO DRIVING FOUR 7-SEGMENT DISPLAY Depending on which display is selected, and using a Hexadecimal to 7-segment display cor- respondence table, the corresponding 4 bits are extracted, then decoded to a 7-segment dis- play and finally sent to the 7-segment LED display. The C code given below is for guidance only. The file cannot be used alone, the complete soft- ware can be found at http://www.st.com/mcu #include "71x_lib.h" const u8 b7SegmentTable[16] = {0x3F, /* 0 */ 0x06, /* 1 */ 0x5B, /* 2 */ 0x4F, /* 3 */ 0x66, /* 4 */ 0x6D, /* 5 */ 0x7D, /* 6 */ 0x07, /* 7 */ 0x7F, /* 8 */ 0x6F, /* 9 */ 0x77, /* A */ 0x7C, /* B */ 0x39, /* C */ 0x5E, /* D */ 0x79, /* E */ 0x71 /* F */ }; /* Pointer to the variable to display */ u16 *pCharToDisplay; /* DP to display */ u8 bDP; int main(void) { #ifdef DEBUG debug(); #endif /* Set system clock to 32 MHz-------------------------------------------------------*/ /* Configure the PLL with a multiplication factor = 16 and division factor = 4 */ RCCU_PLL1Config(RCCU_Mul_16, RCCU_Div_4); /* Set the APB2 clock to default */ RCCU_PCLKConfig(RCCU_DEFAULT); /* Set the RCLK to the PLL output */ RCCU_RCLKSourceConfig(RCCU_PLL1_Output); /* EIC configuration -------------------------------------------------------------- */ /* Set the Timer 0 IRQ channel priority to 1 */ |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |