Click here to Skip to main content
15,867,330 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,
I don't know what data the external device contains but the data is in intel hex format
I have to write a code to download it connecting rs232 using mscomm in vb6
pls help me
Thank You

What I have tried:

Private Sub open_Click()
MSComm1.comport=4
MSComm1.settings="115200,n,8,1"
MSComm1.PortOpen = True

End Sub

Private Sub download_Click()

dim data as variant
With CommonDialog1
.InitDir = App.Path
.FileName = ""
.Filter = "Hex File (*.hex)|*.hex"
.ShowSave

Do
ff = FreeFile
data=MSComm1.Input
Open .FileName For Output As #ff
Print #ff, data
Close #ff

Loop Until MSComm1.InBufferCount=0
End With


End Sub
Posted
Updated 27-Mar-18 1:44am
Comments
Richard MacCutchan 27-Mar-18 8:22am    
"the data is in intel hex format"
If you still do not understand how this device presents its data, you need to study its documentation again.
Member 13396059 28-Mar-18 4:36am    
I'm not having document of the device
Richard MacCutchan 28-Mar-18 5:25am    
Well how do you expect to operate it correctly if you do not have the most important information?
CPallini 27-Mar-18 8:57am    
Are you going to update the internal firmware of a microcontroller?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900