This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Some matter with my "printf()",what can i do ?

When program running to "printf()",the PC always stop at

C:0X0A2A 3099FD JNB TI(0X98.1),C:0A2A
I try adding some word as following :
ES = 0;   //UART INT is Enable before
TI = 1;
printf("%bd",3);
ES = 1;

So , the program running well.Can you tell why being disable UARTs'INT and Setting TI are necessary? How can i overleap this word ?

Another question,why "printf("%bd",3);" can send unsigned char variable to PC right while "printf("%c",3);" not ? What's different between %bd and %c?

Parents
  • Thanks Jon.
    The puchar() routine doesn't be changed ,I just write a UART INTTERUPT routine for receiving the data from Decode_Card and enable UART Interrupt in Initial().When debugged in UV3,the program output nothing without

      ES = 0; TI = 1
    ,and the same to running on object_board

Reply
  • Thanks Jon.
    The puchar() routine doesn't be changed ,I just write a UART INTTERUPT routine for receiving the data from Decode_Card and enable UART Interrupt in Initial().When debugged in UV3,the program output nothing without

      ES = 0; TI = 1
    ,and the same to running on object_board

Children