51 single chip microcomputer serial port receiving for LCD display data error, wealth full delivery

Updated on technology 2024-06-09
15 answers
  1. Anonymous users2024-02-11

    There is a problem with the visual inspection of the LCD program, not the driving aspect Yes"Data Processing"。Give you a direction, take a good look for yourself.

  2. Anonymous users2024-02-10

    Each time a byte transfer is completed, the RI is set to and an interrupt is made.

    In other words, after sending 0, the program will immediately jump into the serial port interrupt.

    In general, we will set up a buffer queue to store the data that has just come in in time, and set a flag to notify the status of the serial buffer of the main function.

  3. Anonymous users2024-02-09

    sendchar1=(lednumval1%10);

    send_char(sendchar1);

    changed to sendchar1=(lednumval1%10+'0');

    send_char(sendchar1+‘0’);

    It should be sent as a string.

  4. Anonymous users2024-02-08

    Baud rate inconsistencies.

  5. Anonymous users2024-02-07

    It may be caused by a mismatch in the baud rate or too much error. It is recommended to try with a crystal oscillator, and change th1=0xf3 to 0xf4 to try.

  6. Anonymous users2024-02-06

    Receive all the data first, and then separate the digits of each bit. Don't separate from side to side.

  7. Anonymous users2024-02-05

    First of all, you have to determine what base code you are sending?

  8. Anonymous users2024-02-04

    If you use this way to send VB data I phone, send ASCII code, for example, if the data sent is 123, the computer will send 0x31, 0x32, 0x33 continuously, so the MCU receiver program, you need to convert it again, you can try to send hexadecimal data in another way.

    For the microcontroller receiver, because the amount of data you send is relatively small, and when sending data, the time interval between two adjacent data is also very short, you can receive data packets by query in the interrupt.

    void serial ()interrupt 4 using 3}es=1;Reopening the serial port is interrupted.

    Here you can make a flag bit that receives the array, which is used for the main program to query and process the relevant data mc=str[0];

    n=str[1];}

  9. Anonymous users2024-02-03

    void serial ()interrupt 4 using 3

    If you receive the character '7', just subtract '0' to get the number 7, i.e. n=str[1] -'0'

    Note that static method A will always be accumulated, and you need to add judgment when A should be reset to 0

  10. Anonymous users2024-02-02

    For the first problem, a is assigned a value of 0 once every time an interrupt is entered, so only str[0] can receive the data, and uchar a; changed to static uchar a; Static variables can only be initialized once, so the second and nth interrupts cannot change the value of the previous time, but pay attention to the zeroing of a.

    For the second, I don't know, I'm sorry.

  11. Anonymous users2024-02-01

    Appropriate join delay for sending and receiving.

  12. Anonymous users2024-01-31

    send_buf[79+15] = 'd';

    send_buf[79+16] = 'r';

    send_buf[79+17] = 'i';

    send_buf[79+18] = 'v';

    send_buf[79+19] = 'e';

    Changed to: send buf[79+05] ='d';

    send_buf[79+06] = 'r';

    send_buf[79+07] = 'i';

    send_buf[79+08] = 'v';

    send_buf[79+09] = 'e';

    In addition, these two sentences are faulty:

    send_buf[79+22] = ('0';

    send_buf[79+42] = ('0';

    A quotient divided by 10 may be greater than 10.

  13. Anonymous users2024-01-30

    I'm also looking for this kind of program.,I've tried the following C language program.,Whether it's using hex and character data to send data, it's displayed garbled on the LCD.。。。

  14. Anonymous users2024-01-29

    I seem to have written it or seen it. Find out.

  15. Anonymous users2024-01-28

    AD value, 51LCD display, correct or not?

    The computer shows the AD value, is it correct?

    The landlord himself will try it first.

    When asking, make it clear what the problem is.

Related questions
5 answers2024-06-09

If you really want to learn, you don't need to buy a development board. Find a minimal system board, then learn something, buy components and build small circuits by yourself. Run the electronic market by yourself, build the circuit by yourself, in order to know the problem, in order to learn something, buy a development board, according to the circuit on the manual, and then put the program into it, and then the program basically understands, this is not called learning... >>>More

10 answers2024-06-09

It should be that the bias resistor selection is not suitable.

9 answers2024-06-09

Initialize three interrupts, x0 x1 t2.

T2 is started by x0 to send serial data at regular intervals and in cycles; >>>More

16 answers2024-06-09

Scheduled interrupts, external interrupts?

15 answers2024-06-09

Pick up the first sensing; Take the second sensor. As for the LED display program, it is very simple, just write a subprogram. That's it for the basic program, but there are other possibilities to add it yourself according to the actual situation, and the program must pass through two points in turn, otherwise the program will be in an endless loop. >>>More