How to implement the debugging of the CPLD counting function?

Updated on technology 2024-06-16
9 answers
  1. Anonymous users2024-02-12

    Counters, huh? If it is not necessary, it is generally not recommended to use CPLD as a beam counting device, which consumes resources very much, and if it is necessary, it is also recommended to use a counter of 2 to the n power.

    600 base, how many digits do you want to make?

    It is estimated that 1 digit can consume about 30 vertical potato macros. This rubber dust is a wasteful act.

  2. Anonymous users2024-02-11

    The function you require can be easily achieved by CPLD, and you can choose according to the package and voltage.

  3. Anonymous users2024-02-10

    There are several ways to do this:

    1.Using the external addressing mode of 8951, the data bus of the single-chip microcomputer, part of the address bus and the control bus are connected to the cpld, and then the data is read according to the external addressing time series of the single-chip microcomputer in the cpld, which is the simplest and fastest cpld processing. But the disadvantage is that there are a lot of wires that need to be connected.

    1) Ordinary UART serial communication mode: a start bit, an 8-bit data bit, an end bit, cpld detects the falling edge, thinks that new data is coming, and then starts to read the data into the port, of course, the baud rate is up to you.

    2) SPI mode: This requires a single-chip microcomputer test port to simulate two data lines and one clock line.

    The CPLD starts reading data as soon as it detects a rising edge.

    The UART method is simple, because the 51 microcontroller itself integrates serial communication peripherals, but the SPI communication speed is fast.

    Hope it helps!

  4. Anonymous users2024-02-09

    The simplest is to use cpld to simulate an SPI interface, the protocol is relatively simple, 3 with the line is good (a chip to select CS, a data input DI, a data output DO), and then define a few commands. It would be better if the landlord understood the I2C protocol, just two wires.

  5. Anonymous users2024-02-08

    The key is in the communication protocol, depending on how you define it, the simple CPLD detection of the high and low levels of the single-chip microcomputer is also communication.

  6. Anonymous users2024-02-07

    Parallel, IIC, UART, SPI, depending on your hardware resources, protocol proficiency and project requirements.

  7. Anonymous users2024-02-06

    Of course, you can use a 1kHz clock and use the counter function to achieve it. It is triggered by the rising or falling edge of the clock, the front is set to logic 1, and it is triggered 30 times (i.e. counted to 30), and the level can be changed once.

    Or you can set the timescale time to 1ms, and then use the symbol through the delay.

  8. Anonymous users2024-02-05

    Write a reset signal RST and clock drive signal CLK in Always, the two work together, RST is valid to reset, CLK is valid to count, and so on. always@(posedge rst or posedge clk)..

  9. Anonymous users2024-02-04

    Define a signal to assign the value of a in when the clock changes, and use the if statement to determine the value of the signal and a in as a judgment similar to that of the ain.

Related questions
13 answers2024-06-16

2. In the second step, if you want to get the brand of the phone or tool you are debugging, you can use brand. >>>More

8 answers2024-06-16

Network anchors. According to the content, online anchors are divided into show anchors, game anchors, and other anchors, with show anchors and game anchors being the majority, and other anchors being less formal. >>>More

6 answers2024-06-16

One. Normal work cannot achieve financial freedom, and can only maintain a minimum of well-off life. Because in the company's revenue share, the share of the part-time worker is actually very small, especially in the current situation where there are so many unemployed people, the average person's human resources are not valuable. >>>More

1 answers2024-06-16

This major belongs to the engineering category, but the artistic color is also very strong, and those who do not have a painting foundation can also go to learn, although it is an engineering major, but after graduation, according to personal preferences and abilities, it is easy to find a job as a fashion designer after graduation, and it is easier to find a job in all levels of clothing after graduation. >>>More

2 answers2024-06-16

Just imagine that achieving the effect of complete "transparency" such as glass does not make much sense in actual combat use, transparency will still be found when it is already very close, and transparency does not have much effect when it is far away, such as a distance of more than 20 meters, but it is enough to conceal, and it is enough to add color and conceal to achieve the same tone as the background environment. To give a simple and crude example, hang a display on a red wall, how to make this display blend into this wall, display red, the closer to the color of this wall, the better. Of course, this is just to say that the significance of adding color to the background is hidden, and in real combat application, it is not very good to use a method similar to this active light display. >>>More