让找料更便捷
电子元器件
采购信息平台
生意随身带
随时随地找货
一站式电子元器件
采购平台
半导体行业观察第一站
标签:
摘要:Abstract: A circuit and program listing for using the MAX6955 LED display driver with a PIC microcontroller and 14-segment displays. The MAX6955 is an LED display driver with an I2C?-compatible, serial interface cap...
"THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG".
The program, shown in Listing 1, can be modified to scroll alphanumeric messages with a length of 8 to 126 characters. The application circuit shown in Figure 1 consists of the MAX6955, the PIC18F442 and four super bright red 14-segment dual character displays from Lumex (Part number LDD-F5406RI).

For Larger Image
Figure 1. MAX6955 application schematic.
The example assembly program continuously scrolls the alphanumeric characters located in the lookup table of the program. The alphanumeric message length is adjustable from 8 to 126 characters long including all blank spaces (0x20). It is recommended to add 7 blank spaces at the beginning and end of the message to obtain the best scrolling effect. In order to customize the message, first modify the hexadecimal representation of the character to scroll in the lookup table of the program. Then modify the CharCount variable value to the number of alphanumeric characters in the selected message including all blank spaces. The program calculates the correct shift count using the equation:
CharCount - 7 = ShiftCountPlusOne
ShiftCount = ShiftCountPlusOne - 1
For example, "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" contains 43 characters. Adding 7 blank spaces before and after the message increases the character count to 57. Using the equation above shows that a message with a character count of 57 would be shifted a total of 49 segments from right to left.
The example program also contains function calls to interface the MAX6955 to the PIC using the internal MSSP I2C port. Since other microcontrollers have similar on-chip peripherals, the example I2C communication routines provided were purposely broken down into single I2C function calls so that the code can be quickly implemented with other microcontrollers. Table 1 shows the single I2C compatible function calls used in the example assembly program.

alt-click (PC) or option-click (Mac) to download Listing 1.
Listing 1. An example assembly program that interfaces the MAX6955 to the PIC18F442's internal MSSP I2C peripheral.
Table 1. Single I2C compatible function calls.
| Single I2C compatible function calls | Description |
| HWI2C_start | Performs an I2C compatible start condition. |
| HWI2C_repeatedStart | Performs an I2C compatible repeated start condition. |
| HWI2C_W_write | Performs all I2C compatible write operations including the initial slave address write frame. |
| HWI2C_readMore_W | Performs an I2C compatible read operation with Master ACK. |
| HWI2C_readLast_W | Performs an I2C compatible read operation with Master NACK. |
| HWI2C_stop | Performs an I2C compatible stop condition. |
| 型号 | 厂商 | 价格 |
|---|---|---|
| EPCOS | 爱普科斯 | / |
| STM32F103RCT6 | ST | ¥461.23 |
| STM32F103C8T6 | ST | ¥84 |
| STM32F103VET6 | ST | ¥426.57 |
| STM32F103RET6 | ST | ¥780.82 |
| STM8S003F3P6 | ST | ¥10.62 |
| STM32F103VCT6 | ST | ¥275.84 |
| STM32F103CBT6 | ST | ¥130.66 |
| STM32F030C8T6 | ST | ¥18.11 |
| N76E003AT20 | NUVOTON | ¥9.67 |