[51 single-chip microcomputer] to start from 0 to do 4-bit 8-segment Common Yin Digital tube 3461AS Drive Talk about the details of the decision to high quality DIY

Source: Internet
Author: User

Directory

1) Problems arise

2) failed attempts

3) Final Plan

4) How to use

5) Knowledge sharing

1) Problems arise

In the previous article "Using PWM control DC motor as an example to build a simple 51 engineering framework " has introduced a packaged 8-bit 8-segment Digital tube driver (such as the led8.c file under the Func folder).

But the drive circuit is to have a certain hardware basis (such as): such as 2 pieces of 74hc573. And I only have a few 4-bit 8-segment Common Yin digital tube and no 74hc573, so you have to seek to use 51 direct drive Solution!

2) failed attempts

Failure operation: Test whether the digital tube is normal by adding 5 volts to the corresponding pins directly

Result: Burnt out 2 x 3461AS

Analysis: Was cheated by the second picture, thought that 3461AS can withstand the pressure difference produced by 01 levels, and the real situation such as: In the P0 Port has 10K of the exclusion, and then measure the voltage finally dawned!

3) Final Plan

Another example is found between the second and third steps: He uses 3-8 decoders and then series resistors to protect them.

Because there are 3-8 examples of decoders my direct drive idea is further verified, so the synthesis of the above analysis gives the following scenario:

4) How to use

The same I put about the 3461AS package up (below)

In the file where you want to use the feature, first include the header file, and then reference the Duanma array, the TempData array, and the display function for displaying.

Then store the data in TempData before you want to display the data (Tempdata[0] represents the first number to display, where the 8-segment digital tube display of the common Yin is stored in the Duanma array from the value of 0~f. So let the first figure show 2 as long as tempdata[0]=duanma[2]). When you have set the information to be displayed in TempData, you can call the display function to refresh the digital tube display (the first parameter of display is displayed starting with the number of digital tubes, for example, firstbit=0 indicates that num bit data is displayed starting with the first digital tube)

Note: to ensure that display has a relatively fast refresh rate

5) Knowledge sharing

Https://github.com/beautifulzzzz/stc89c51-or-stc89c52


[51 single-chip microcomputer] to start from 0 to do 4-bit 8-segment Common Yin Digital tube 3461AS Drive Talk about the details of the decision to high quality DIY

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.