??? 02/28/06 01:21 Read: times |
#110895 - TI Responding to: ???'s previous message |
M Chitrakar said:
Andy, thanks but anyway my problem is not with the putchar() function but the confusion on TI flag. You probably also need to look at the putchar() source to see how it relates to TI 1) Is TI flag to be set by software after end of tx.? No. However, some interrupt-driven serial IO implemantations do require you to set TI in software to start transmission if the transmitter is currently idle (ie, the Tx buffer is currently empty). or set by hardware automatically? Yes, TI is definitely det by the UART hardware at the end of transmitting a byte (check the "bible" for precisely where & when it gets set). This may or may not cause an interrupt, depending on which interrupts you have enabled at the time... While writing in asm, we have to clear TI flag and wait till TI flag is set by H/W. I found same not be true while executing C code of same asm instructions. That can't be true. There must be some difference. The processor understands neither assembler nor 'C' - only binary opcodes. |
Topic | Author | Date |
putchar C51 serial communication problem | 01/01/70 00:00 | |
Keil putchar source | 01/01/70 00:00 | |
putchar() reworded | 01/01/70 00:00 | |
TI | 01/01/70 00:00 | |
thanks and here is my C code of asm... | 01/01/70 00:00 | |
should be obvious | 01/01/70 00:00 | |
To be fair | 01/01/70 00:00 | |
C gives higher performance! | 01/01/70 00:00 | |
Initial conditions | 01/01/70 00:00 | |
waiting better than uninten effcy | 01/01/70 00:00 | |
Better? | 01/01/70 00:00 | |
Math? | 01/01/70 00:00 | |
What????? | 01/01/70 00:00 | |
no work to do unitl bytes send | 01/01/70 00:00 | |
OK | 01/01/70 00:00 | |
or... | 01/01/70 00:00 | |
That is better | 01/01/70 00:00 | |
i read about putchar() | 01/01/70 00:00 | |
Try \Keil\C51\LIB\getkey.c | 01/01/70 00:00 | |
Keil Library Source Files | 01/01/70 00:00 | |
ok | 01/01/70 00:00 | |
No and Yes | 01/01/70 00:00 | |
but what about AT cmd | 01/01/70 00:00 | |
No![]() | 01/01/70 00:00 |