Hello,
I've been searching for PCBs that include the TM1651 to carry out practical exercises, but it seems that the only available product is an LED battery level indicator that uses the TM1651.
The TM1651 integrated circuit allows controlling 4-digit 7-segment displays and reading up to 6 keys. Writing the library for this chip has been particularly easy because it is similar to the TM1637. Therefore, I adapted the library I previously wrote for the TM1637 to work with the TM1651.
I removed all the functions related to digit control and key reading, and then implemented specific functions to control the LEDs included on the PCB.
I am sharing all the necessary files to experiment with the TM1651-based battery level indicator for a while.
TM1651 Library:
TM1651_Init() Initialize the TM1651. TM1651_OutSeg(Seg As Byte, sBit As Bit)
Outputs data to a specific segment of the display (0 to 6, On/Off bit). TM1651_Clear()
Clears all segments of the display, turning them off. TM1651_Full()
Turns on all segments of the display. TM1651_Bright(Bright As Byte)
Adjusts the brightness of the display (0 to 7).
It seems that they are compatible, but for the TM1651, I have only found a battery level PCB that uses it. On the other hand, for the TM1637, it is possible to find PCBs with different key and digit configurations.
It seems that they are compatible, but for the TM1651, I have only found a battery level PCB that uses it. On the other hand, for the TM1637, it is possible to find PCBs with different key and digit configurations.
Well the TM1637 is a larger chip, so has more capabilities, it's probably only worth using the TM1651 for a small application like the battery display. Why not use the 37 instead?, presumably the software is very little different. I've got a couple of different TM1637 boards, and have used them with PIC's using XC8.
I am attaching the library to work with the TM1637 based on the library written in C from the datasheets. I have had several problems because the displays with TM1637 do not all work at the same speed and this is not taken into account in the examples in the datasheets. There is also a big...
They seem to be the same. But I can't prove it 100%.
The initial configuration is the same and the memory address of the first output byte is the same. The brightness has the same levels and memory address, which are the only functions you can test, later I will compare the datasheets in detail.
They seem to be the same. But I can't prove it 100%.
The initial configuration is the same and the memory address of the first output byte is the same. The brightness has the same levels and memory address, which are the only functions you can test, later I will compare the datasheets in detail.
I don't believe the two chips follow exactly the same protocol. Close to the same but different in exactly how the data is sent.
tumbleweed helped me out with this when I was (trapped) on a cruise ship a couple years ago. A lesson learned was the caps for noise filtering on the data lines on some modules are 10× or more than specied, severely limiting data rate.
I have been reviewing the TM1637 and TM1651 integrated circuits in detail and found that they share most of their functions. The TM1637 offers greater control capacity for both digits and keys. Therefore, as long as the common memory addresses are used to access basic functions, a single library can be used for both, since the communication protocol is the same. However, ideally, a dedicated library should be created for each integrated circuit. Nevertheless, having a functional library for one can be easily adapted to the other with minimal modifications.
TM1651_OutSeg(Seg As Byte, sBit As Bit)
Outputs data to a specific segment of the display (0 to 6, On/Off bit). TM1651_Clear()
Clears all segments of the display, turning them off. TM1651_Full()
The Init and brightness functions are common, for this particular case of the battery level indicator, and for the rest of the functions that the TM1651 allows, it would be convenient to have a PCB with digits and a keyboard to perform a complete test.