Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
There was a post just recently by a user wanting to driver 3 digits of a 7-segment LED on a PSoC6 device.
There is a component to driver multiple segments (7,14 and 16) and multiple digits on the PSoC3 and PSoC5.
Sadly, this component was not available for the PSoC6.
Here is a project to drive 4 digits of a 7-segment LED display for the PSoC6. It implements most of the API calls for the PSoC3/PSoC5 component and is configured as 7-segment drive only.
This implementation differs from the Cypress component version in that:
It is not a component. This requires copying the LED_7seg directory to the user's project directory. Then LED_7seg directory needs to be added in the "Build/Compiler/Additional Include Directories" for the project.
It is intended as a 4 digit 7-segment LED display driver. Elements in the TopDesign can easily be removed to support less digits or added to supportmore digits.
It is a 7-segment implementation only. 14-segment and 16-segment implementation code has been removed from LED_7seg.c
This implementation does NOT use DMA resources.
The refresh rate is fixed at 250 Hz. However, this is easily changed by adjusting the CMN_clk component value.
The Segment drive is active HIGH and the common drive is active HIGH (going to the NPN transistors which invert the commons to an active LOW drive).
Brightness control is NOT implemented.
Most of the API calls of the Cypress component are implemented for 7-segments.
The following API calls are not implemented and will yield a compile error if called.
The file LED_7seg_Unit_Tests.c is supplied ONLY as test vectors to unit test this implementation. This file can be removed from the project.
To use the API calls supported refer to the component datasheet for the 4 Digit 7-segment LED display driver.
This implementation can be constructed as a component for PSoC Creator if the demand is sufficient. ModusToolbox doesn't directly* support UDBs or components at this time. With some effort, a ModusToolbox equivalent can be constructed.
With Cypress' permission, I can be convinced to modify their component to include a PSoC6-specific implementation that should be able to support 14- and 16-segments.
This project is originally built with the PsoC6 used in the CY8CKIT-062-BLE. Other PSoC6s and kits that support UDBs can be used.
PSoC Creator 4.3. It should be able to run on earlier version but it has not been tested.
The TopDesign includes NPN transistors to drive the commons to the digits. This is HIGHLY recommended due to the combined current if all segments are turned on.
The segments are being directly driven by the PSoC. I recommend that the maximum drive current be limited to 8mA. If more current is needed, I recommend that the segments be buffered using PNP transistors.
Len "Engineering is an Art. The Art of Compromise."