dnhuruag
Junior Member level 1
pls help... how can i receive 3 bytes of data from PIC16f877a microcontroller to PC using visual basic 6... when i write 3 consecutive bytes using USART, i only read special characters from vb6... anyone can help me with my code?
Private Sub MSComm1_OnComm()
Dim sData As String
If MSComm1.CommEvent = comEvReceive Then
sData = MSComm1.Input
Text2.Text = sData
End If
End Sub
example if i send
usart_write('1');
usart_write('0');
usart_write('0');
i must read the "100" from vb, sad to say but i only receive special characters from vb... what would be my code look like to display the "100" from vb?
i would be grateful any means of help... thanks...
Private Sub MSComm1_OnComm()
Dim sData As String
If MSComm1.CommEvent = comEvReceive Then
sData = MSComm1.Input
Text2.Text = sData
End If
End Sub
example if i send
usart_write('1');
usart_write('0');
usart_write('0');
i must read the "100" from vb, sad to say but i only receive special characters from vb... what would be my code look like to display the "100" from vb?
i would be grateful any means of help... thanks...