| ??? 09/03/03 10:44 Read: times |
#53967 - RE: unpredictable first character Responding to: ???'s previous message |
Dear Mahmood, I did view the assembly code generated by the compiler. Again, nothing's special.
The asm file generated are: ;ser_uart.c:32: void ser_init( unsigned int rate ) { ; ----------------------------------------- ; function ser_init ; ----------------------------------------- _ser_init: ar2 = 0x02 ar3 = 0x03 ar4 = 0x04 ar5 = 0x05 ar6 = 0x06 ar7 = 0x07 ar0 = 0x00 ar1 = 0x01 mov r2,dpl mov r3,dph ;ser_uart.c:34: TH2 = RCAP2H = rate >> 8; mov ar4,r3 mov r5,#0x00 mov _RCAP2H,r4 mov _TH2,r4 ;ser_uart.c:35: TL2 = RCAP2L = rate; mov _RCAP2L,r2 mov _TL2,r2 ;ser_uart.c:36: SCON = 0x72; // Mode 1, REN 1 mov _SCON,#0x72 ;ser_uart.c:37: T2CON = 0x34; // TR2 = 1; mov _T2CON,#0x34 00101$: ret Assalamu alaikum, Fahmy |



