??? 07/12/06 05:52 Read: times Msg Score: -1 -1 Message Not Useful |
#120058 - hy master Responding to: ???'s previous message |
Azfar Javed Wahla said:
Hello!
I am using two 89c55wd. In which sendind data through serial port at baud rate 1200 from one microcontroller to another. As second u_controller receive nearly three string then it transmitt same data to first u_controller and first u_controller display it on LCD(20 * 4). I am facing problem that actuall data didnot received and displayed. I am using bascom-51 compiler. Here is my program given. ' Serial Transmission $regfile = "89c55wd.dat" $crystal = 11059200 $baud = 1200 Dim Rx_data As String * 5 Dim Num As String * 3 Dim Test As Byte Config Lcd = 20 * 4 Config Lcdpin = Pin , Db4 = P1.4 , Db5 = P1.5 , Db6 = P1.6 , Db7 = P1.7 , E = P1.1 , Rs = P1.0 Config Debounce = 30 Cls Lcd "Allah" Lowerline $asm clr scon.1 $end Asm On Serial Isr_ser Enable Serial Enable Interrupts Do Debounce P2.0 , 0 , Test1 , Sub Loop End Isr_ser: $asm clr scon.1 $end Asm Rx_data = Inkey() If Rx_data > "/" And Rx_data < ":" Then Lcd Rx_data End If If Rx_data > "`" And Rx_data < "{" Then Lcd Rx_data End If Return Test1: Test = 4 Disable Serial $asm setb scon.1 $end Asm Print "x" ; Test ; "?" $asm clr scon.1 $end Asm Enable Serial Return Here is Second controller Program code $regfile = "89c55wd.dat" $crystal = 11059200 $baud = 1200 Dim Status As String * 3 Dim Rtt_data As String * 3 Dim St1 As String * 1 Dim St2 As String * 1 Dim St3 As String * 1 Dim A As Byte $asm clr scon.1 $end Asm On Serial Isr_ser Enable Serial Enable Interrupts Do If A = 1 Then St1 = Rtt_data Elseif A = 2 Then St2 = Rtt_data Elseif A = 3 Then St3 = Rtt_data Elseif A = 4 Then Status = Status + St1 Status = Status + St2 Status = Status + St3 Call Check A = 0 Status = "" End If Loop End Isr_ser: $asm clr scon.1 $end Asm Rtt_data = inkey() If Rtt_data > "/" And Rtt_data < ":" Then Incr A End If If Rtt_data > "`" And Rtt_data < "{" Then Incr A End If If Rtt_data = "?" Then End If Return ' Check Sub Check Disable Serial $asm setb scon.1 $end Asm Print Status $asm clr scon.1 $end Asm Enable Serial End Sub Thanks in advance i find the problem. contact me by face. then i explain. ok (Thanks) |
Topic | Author | Date |
89c55wd serial data using bascom-51 | 01/01/70 00:00 | |
89c55wd serial data using bascom-8051 | 01/01/70 00:00 | |
who can send me the bascom software | 01/01/70 00:00 | |
that would be outright theft | 01/01/70 00:00 | |
You buy it here | 01/01/70 00:00 | |
Demo Version | 01/01/70 00:00 | |
hy master | 01/01/70 00:00 | |
Why the big secret?![]() | 01/01/70 00:00 |