Professional Documents
Culture Documents
Thanks to alert and helpful readers for pointing these out. If you find others,
please send them to me at jan@lvr.com and I'll add them to the list. This list
is available online at www.lvr.com.
These errors are corrected with each printing of the book, so your copy may have
some or all of these errors corrected.
p.43
Additional information about the UART’s MCR. In a PC, in enable changing the
state of DTR or RTS by writing to bits 0 or 1 of the MCR, you must first write 8
to the MCR (set bit 3 to 1, enabling the UART’s IRQ line). (If using MSComm,
this is handled automatically.)
p. 52
Change:
comEvDTR. Change at the DTR input.
to:
comEvDSR. Change at the DSR input.
to:
p.71
(and in the FindPorts routine of serport.bas in the template project)
Change:
http://www.lvr.com/files/spcerr.txt 14/06/2006
Page 2 of 4
to:
If SaveCurrentPort = True Then
PortNumber = SavedPortNumber
frmMain.MSComm1.CommPort = PortNumber
If frmMain.MSComm1.PortOpen = False Then
frmMain.MSComm1.PortOpen = True
End If
End If
Change:
For Count = 1 To 16
frmMain.MSComm1.CommPort = Count
frmMain.MSComm1.PortOpen = True
If Err.Number = 8005 Then
'The port is already open
'The port exists, so add it to the list.
NumberOfPorts = NumberOfPorts + 1
CommPorts(NumberOfPorts) = "COM" & CStr(Count)
ElseIf frmMain.MSComm1.PortOpen = True Then
'If the port opens, it exists.
'Close it and add to the list.
frmMain.MSComm1.PortOpen = False
NumberOfPorts = NumberOfPorts + 1
CommPorts(NumberOfPorts) = "COM" & CStr(Count)
Err.Clear
End If
Next Count
to:
For Count = 1 To 16
frmMain.MSComm1.CommPort = Count
frmMain.MSComm1.PortOpen = True
If Err.Number = 8005 Then
'The port is already open
'The port exists, so add it to the list.
NumberOfPorts = NumberOfPorts + 1
CommPorts(NumberOfPorts) = "COM" & CStr(Count)
'****
'Prevents the SavedPortNumber from being re-opened on exit
http://www.lvr.com/files/spcerr.txt 14/06/2006
Page 3 of 4
Control+S (13h) pauses output, Control+Q (11h) resumes output.3) Pg. 101, Last
line of last paragraph before Custom Communications should say
"... then RUN ..." instead of "... than RUN ..."
p. 270
(the PollSlave routine of frmMain in the 485net project)
Change:
Buffer = MSComm1.Input
to:
If MSComm1.InBufferCount > 0 Then
Buffer = MSComm1.Input
End If
To
'Serial receive input
SerialInput con 15
'Direction-control output
TRControl con 13
Appendix A
See the Serial Port page at http://www.lvr.com for additions and updates to the
Sources list.
***
http://www.lvr.com/files/spcerr.txt 14/06/2006
Page 4 of 4
Dim Sum As Long
Dim Checksum As Byte
Dim ChecksumAsAsciiHex As String
Dim Temp As String
http://www.lvr.com/files/spcerr.txt 14/06/2006