| ??? 05/22/02 12:57 Read: times |
#23244 - Serial Transmission Problem |
Hi,
I have a 89C51RD+ development board, I have been learning making small programs and debugging them on the board. Now I am starting learning serial communication but I am having problem receving a character from the board to my pc which I have connected through RS232. I have written the following code in Visual Basic to receive the character: MSComm1.Settings = "9600,N,8,1" MSComm1.CommPort = 1 MSComm1.PortOpen = True Text1.Text = MSComm1.Input Simultaneously I have programmed the Chip to transmit data through TxD pin the code is: ;TRANSMISSION mov scon,#h'50 ; Serial port in mode 1 mov tmod,#h'20 ; Set up timer 1 in mode 2 (autoreload) ... mov th1,#h'FC ; TO SET UP BAUD RATE mov tl1,#h'FC setb tr1 mov a,#h'45 loop: ; Send P1 contents continuously mov sbuf,a again: jnb TI,again clr TI sjmp loop After running the program i am not receiving any character in the text box. what is the problem??? Although on short(connecting) the RXD and TXD pin and running the VB program I am getting the data outputted. but not with 89C51RD+. I am using simple development board with only RXD,TXD and ground pin to the RS232 (9 pin)connector. Hence I am working with simple serial transmission and not with Handshaking one. Can someone help me or simply show me a code to transmit a single character to PC from 89C51RD+ ??? |
| Topic | Author | Date |
| Serial Transmission Problem | 01/01/70 00:00 | |
| RE: Serial Transmission Problem | 01/01/70 00:00 | |
| RE: Serial Transmission Problem | 01/01/70 00:00 | |
| RE: Serial Transmission Problem | 01/01/70 00:00 | |
| RE: Serial Transmission Problem | 01/01/70 00:00 | |
| RE: Serial Transmission Problem | 01/01/70 00:00 | |
| RE: Serial Transmission Problem | 01/01/70 00:00 | |
RE: Serial Transmission Problem | 01/01/70 00:00 |



