لقد قمت بكتابة برنامج يقوم بعملية قراءة الحروف من الكيبورد ومن ثم يظهرها الى UART ولكن المشكلة هو كيف اقوم من خلال UART بكتابة مثلا اي كلمة وتظيء اللوحة الخاصة بألـ LED disiplay
وهنا في اعتقادي لابد ان نفعل ذللك من buffer وقد حاولت كثيرا ولكن لا فائدة.
وهذا هو البرنامج
CLR SM0 SETB SM1;clear SM0 and set SM1 to put the serial port in mode 1 MOV TMOD, #20H;put timer 1 in mode 2 interval timing MOV TH1, #253;put the reload value in TH1 - this results in a baud rate of 9600 SETB TR1;start timer 1 MOV 40H, #'a' MOV 41H, #'b' MOV 42H, #'c';store the text in memory starting at address 40H MOV 43H, #0;terminate the text with 0 MOV R0, #40H;put the start address in R0 CALL sendText The main program is show above, which calls the subrotine as detailed below. sendText: MOV A, @R0;move data pointed to by R0 into A JZ finish;if contents of A are equal to 0 jump to finish loop: MOV SBUF, A;move contents of A to the serial buffer - this initiates the transmission down the serial line INC R0;increment R0 to point to next character JNB TI, $;wait for entire character (ie; the current character that was sent to SBUF) to be sent down serial line CLR TI;clear the transmit overflow JMP loop;go back to send next character finish: RET