09-24-2016, 02:49 AM
I have been receiving question about the 41CL serial port and how to validate the serial link.
This is a small test setup to check if the serial communication between your Windows PC and the 41CL works.
Note: macOS & Linux section users will come later.
Load the following FOCAL program into your 41CL
XEQ "SPTST" first to configure the registers and 41CL memory data
LBL A -> 41CL Sending ABABABAB... to the PC at 1200 bauds
LBL B -> 41CL Sending ABABABAB... to the PC at 2400 bauds
LBL C -> 41CL Sending ABABABAB... to the PC at 4800 bauds
LBL D -> 41CL Sending ABABABAB... to the PC at 9600 bauds
LBL F -> 41CL Receiving PC pressed keys at 1200 bauds
LBL G -> 41CL Receiving PC pressed keys at 2400 bauds
LBL H -> 41CL Receiving PC pressed keys at 4800 bauds
LBL I -> 41CL Receiving PC pressed keys at 9600 bauds
Windows Users:
I am using RealTerm on the PC for this demonstration.
On the Windows PC
a) Download & install RealTerm
b) Start the Windows "Device Manager" and look under "Port (Com & LPT)" to find your serial port (COM?)
c) Start RealTerm, under the "Port" tab
c1) Select "Port" number found on step (b)
c2) Set "Parity" to "None"
c3) Set "Data Bits" to "8"
c4) Set "Stop Bits" to "1"
c5) Set "Hardware Flow Control" to "None"
Test #1 : 41CL is sending and PC is receiving at 1200 bauds
PC -> In RealTerm, under the "Port" tab
PC ---> Set "Baud" to 1200
PC ---> Press the "Open" button to close the com port (button should be raised)
PC ---> Press the "Open" button to open the com port (button should be depressed)
PC ---> Press the "Clear" button under the output window to erase it
CL -> Press the A button (same as XEQ A) and the message "SENDING 1200" should be displayed
PC -> You should see in the output window a series of "ABABAB..." on the display
CL -> Press the R/S button to stop the program
Test #2 : 41CL is sending and PC is receiving at 2400 bauds
PC -> In RealTerm, under the "Port" tab
PC ---> Set "Baud" to 2400
PC ---> Press the "Open" button to close the com port (button should be raised)
PC ---> Press the "Open" button to open the com port (button should be depressed)
PC ---> Press the "Clear" button under the output window to erase it
CL -> Press the B button (same as XEQ B) and the message "SENDING 2400" should be displayed
PC -> You should see in the RealTerm output window a series of "ABABAB..." on the display
CL -> Press the R/S button to stop the program
Test #3 : 41CL is sending and PC is receiving at 4800 bauds
PC -> In RealTerm, under the "Port" tab
PC ---> Set "Baud" to 4800
PC ---> Press the "Open" button to close the com port (button should be raised)
PC ---> Press the "Open" button to open the com port (button should be depressed)
PC ---> Press the "Clear" button under the output window to erase it
CL -> Press the C button (same as XEQ C) and the message "SENDING 4800" should be displayed
PC -> You should see in the RealTerm output window a series of "ABABAB..." on the display
CL -> Press the R/S button to stop the program
Test #4 : 41CL is sending and PC is receiving at 9600 bauds
PC -> In RealTerm, under the "Port" tab
PC ---> Set "Baud" to 9600
PC ---> Press the "Open" button to close the com port (button should be raised)
PC ---> Press the "Open" button to open the com port (button should be depressed)
PC ---> Press the "Clear" button under the output window to erase it
CL -> Press the D button (same as XEQ D) and the message "SENDING 9600" should be displayed
PC -> You should see in the RealTerm output window a series of "ABABAB..." on the display
CL -> Press the R/S button to stop the program
Test #5 : PC is sending and 41CL is receiving at 1200 bauds
PC -> In RealTerm, under the "Port" tab
PC ---> Set "Baud" to 1200
PC ---> Press the "Open" button to close the com port (button should be raised)
PC ---> Press the "Open" button to open the com port (button should be depressed)
CL -> Press the F button (same as XEQ F)
PC -> Activate the RealTerm application
PC ---> Type the letter "a" on your PC keyboard and you should see "832003-0061" on the CL display (61 = ASCII value of a)
PC ---> Type the letter "A" on your PC keyboard and you should see "832003-0041" on the CL display (41 = ASCII value of A)
PC ---> Type any letters on your PC keyboard and you should see "832003-00??" on the CL display (?? = ASCII value of the key pressed)
CL -> Press the R/S button to stop the program
CL -> if you wait more than 10 seconds before pressing a key on your PC the 41CL will show the "TIMEOUT" message, when that happen just press the R/S key to continue
Test #6 : PC is sending and 41CL is receiving at 2400 bauds
PC -> In RealTerm, under the "Port" tab
PC ---> Set "Baud" to 2400
PC ---> Press the "Open" button to close the com port (button should be raised)
PC ---> Press the "Open" button to open the com port (button should be depressed)
CL -> Press the G button (same as XEQ G)
PC -> Activate the RealTerm application
PC ---> Type the letter "a" on your PC keyboard and you should see "832003-0061" on the CL display (61 = ASCII value of a)
PC ---> Type the letter "A" on your PC keyboard and you should see "832003-0041" on the CL display (41 = ASCII value of A)
PC ---> Type any letters on your PC keyboard and you should see "832003-00??" on the CL display (?? = ASCII value of the key pressed)
CL -> Press the R/S button to stop the program
CL -> if you wait more than 10 seconds before pressing a key on your PC the 41CL will show the "TIMEOUT" message, when that happen just press the R/S key to continue
Test #7 : PC is sending and 41CL is receiving at 4800 bauds
PC -> In RealTerm, under the "Port" tab
PC ---> Set "Baud" to 4800
PC ---> Press the "Open" button to close the com port (button should be raised)
PC ---> Press the "Open" button to open the com port (button should be depressed)
CL -> Press the H button (same as XEQ H)
PC -> Activate the RealTerm application
PC ---> Type the letter "a" on your PC keyboard and you should see "832003-0061" on the CL display (61 = ASCII value of a)
PC ---> Type the letter "A" on your PC keyboard and you should see "832003-0041" on the CL display (41 = ASCII value of A)
PC ---> Type any letters on your PC keyboard and you should see "832003-00??" on the CL display (?? = ASCII value of the key pressed)
CL -> Press the R/S button to stop the program
CL -> if you wait more than 10 seconds before pressing a key on your PC the 41CL will show the "TIMEOUT" message, when that happen just press the R/S key to continue
Test #8 : PC is sending and 41CL is receiving at 9600 bauds
PC -> In RealTerm, under the "Port" tab
PC ---> Set "Baud" to 9600
PC ---> Press the "Open" button to close the com port (button should be raised)
PC ---> Press the "Open" button to open the com port (button should be depressed)
CL -> Press the I button (same as XEQ I)
PC -> Activate the RealTerm application
PC ---> Type the letter "a" on your PC keyboard and you should see "832003-0061" on the CL display (61 = ASCII value of a)
PC ---> Type the letter "A" on your PC keyboard and you should see "832003-0041" on the CL display (41 = ASCII value of A)
PC ---> Type any letters on your PC keyboard and you should see "832003-00??" on the CL display (?? = ASCII value of the key pressed)
CL -> Press the R/S button to stop the program
CL -> if you wait more than 10 seconds before pressing a key on your PC the 41CL will show the "TIMEOUT" message, when that happen just press the R/S key to continue
EDIT: typos
This is a small test setup to check if the serial communication between your Windows PC and the 41CL works.
Note: macOS & Linux section users will come later.
Load the following FOCAL program into your 41CL
Code:
01♦LBL "SPTST"
02 MMUDIS
03 TURBO50
04 SERINI
05 FIX 0
06 CF 29
07 SF 27
08 "832"
09 ASTO 00
10 "001"
11 ASTO 01
12 "002"
13 ASTO 02
14 "003"
15 ASTO 03
16 "004"
17 ASTO 04
18 CLA
19 ARCL 00
20 ARCL 01
21 "├-0041"
22 YPOKE
23 CLA
24 ARCL 00
25 ARCL 02
26 "├-0042"
27 YPOKE
28 ARCL 00
29 ARCL 03
30 "├-0000"
31 YPOKE
32 RTN
33♦LBL A
34 "SENDING 1200"
35 AVIEW
36 SERINI
37 BAUD12
38 GTO 20
39♦LBL B
40 "SENDING 2400"
41 AVIEW
42 SERINI
43 BAUD24
44 GTO 20
45♦LBL C
46 "SENDING 4800"
47 AVIEW
48 SERINI
49 BAUD48
50 GTO 20
51♦LBL D
52 "SENDING 9600"
53 AVIEW
54 SERINI
55 BAUD96
56 GTO 20
57♦LBL 20
58 CLA
59 ARCL 00
60 ARCL 01
61 YPUTLB
62 CLA
63 ARCL 00
64 ARCL 02
65 YPUTLB
66 GTO 20
67♦LBL F
68 SERINI
69 BAUD12
70 GTO 30
71♦LBL G
72 SERINI
73 BAUD24
74 GTO 30
75♦LBL H
76 SERINI
77 BAUD48
78 GTO 30
79♦LBL I
80 SERINI
81 BAUD96
82 GTO 30
83♦LBL 30
84 CLA
85 ARCL 00
86 ARCL 03
87 YGETLB
88 "├-0000"
89 YPEEK
90 AVIEW
91 GTO 30
92 END
XEQ "SPTST" first to configure the registers and 41CL memory data
LBL A -> 41CL Sending ABABABAB... to the PC at 1200 bauds
LBL B -> 41CL Sending ABABABAB... to the PC at 2400 bauds
LBL C -> 41CL Sending ABABABAB... to the PC at 4800 bauds
LBL D -> 41CL Sending ABABABAB... to the PC at 9600 bauds
LBL F -> 41CL Receiving PC pressed keys at 1200 bauds
LBL G -> 41CL Receiving PC pressed keys at 2400 bauds
LBL H -> 41CL Receiving PC pressed keys at 4800 bauds
LBL I -> 41CL Receiving PC pressed keys at 9600 bauds
Windows Users:
I am using RealTerm on the PC for this demonstration.
On the Windows PC
a) Download & install RealTerm
b) Start the Windows "Device Manager" and look under "Port (Com & LPT)" to find your serial port (COM?)
c) Start RealTerm, under the "Port" tab
c1) Select "Port" number found on step (b)
c2) Set "Parity" to "None"
c3) Set "Data Bits" to "8"
c4) Set "Stop Bits" to "1"
c5) Set "Hardware Flow Control" to "None"
Test #1 : 41CL is sending and PC is receiving at 1200 bauds
PC -> In RealTerm, under the "Port" tab
PC ---> Set "Baud" to 1200
PC ---> Press the "Open" button to close the com port (button should be raised)
PC ---> Press the "Open" button to open the com port (button should be depressed)
PC ---> Press the "Clear" button under the output window to erase it
CL -> Press the A button (same as XEQ A) and the message "SENDING 1200" should be displayed
PC -> You should see in the output window a series of "ABABAB..." on the display
CL -> Press the R/S button to stop the program
Test #2 : 41CL is sending and PC is receiving at 2400 bauds
PC -> In RealTerm, under the "Port" tab
PC ---> Set "Baud" to 2400
PC ---> Press the "Open" button to close the com port (button should be raised)
PC ---> Press the "Open" button to open the com port (button should be depressed)
PC ---> Press the "Clear" button under the output window to erase it
CL -> Press the B button (same as XEQ B) and the message "SENDING 2400" should be displayed
PC -> You should see in the RealTerm output window a series of "ABABAB..." on the display
CL -> Press the R/S button to stop the program
Test #3 : 41CL is sending and PC is receiving at 4800 bauds
PC -> In RealTerm, under the "Port" tab
PC ---> Set "Baud" to 4800
PC ---> Press the "Open" button to close the com port (button should be raised)
PC ---> Press the "Open" button to open the com port (button should be depressed)
PC ---> Press the "Clear" button under the output window to erase it
CL -> Press the C button (same as XEQ C) and the message "SENDING 4800" should be displayed
PC -> You should see in the RealTerm output window a series of "ABABAB..." on the display
CL -> Press the R/S button to stop the program
Test #4 : 41CL is sending and PC is receiving at 9600 bauds
PC -> In RealTerm, under the "Port" tab
PC ---> Set "Baud" to 9600
PC ---> Press the "Open" button to close the com port (button should be raised)
PC ---> Press the "Open" button to open the com port (button should be depressed)
PC ---> Press the "Clear" button under the output window to erase it
CL -> Press the D button (same as XEQ D) and the message "SENDING 9600" should be displayed
PC -> You should see in the RealTerm output window a series of "ABABAB..." on the display
CL -> Press the R/S button to stop the program
Test #5 : PC is sending and 41CL is receiving at 1200 bauds
PC -> In RealTerm, under the "Port" tab
PC ---> Set "Baud" to 1200
PC ---> Press the "Open" button to close the com port (button should be raised)
PC ---> Press the "Open" button to open the com port (button should be depressed)
CL -> Press the F button (same as XEQ F)
PC -> Activate the RealTerm application
PC ---> Type the letter "a" on your PC keyboard and you should see "832003-0061" on the CL display (61 = ASCII value of a)
PC ---> Type the letter "A" on your PC keyboard and you should see "832003-0041" on the CL display (41 = ASCII value of A)
PC ---> Type any letters on your PC keyboard and you should see "832003-00??" on the CL display (?? = ASCII value of the key pressed)
CL -> Press the R/S button to stop the program
CL -> if you wait more than 10 seconds before pressing a key on your PC the 41CL will show the "TIMEOUT" message, when that happen just press the R/S key to continue
Test #6 : PC is sending and 41CL is receiving at 2400 bauds
PC -> In RealTerm, under the "Port" tab
PC ---> Set "Baud" to 2400
PC ---> Press the "Open" button to close the com port (button should be raised)
PC ---> Press the "Open" button to open the com port (button should be depressed)
CL -> Press the G button (same as XEQ G)
PC -> Activate the RealTerm application
PC ---> Type the letter "a" on your PC keyboard and you should see "832003-0061" on the CL display (61 = ASCII value of a)
PC ---> Type the letter "A" on your PC keyboard and you should see "832003-0041" on the CL display (41 = ASCII value of A)
PC ---> Type any letters on your PC keyboard and you should see "832003-00??" on the CL display (?? = ASCII value of the key pressed)
CL -> Press the R/S button to stop the program
CL -> if you wait more than 10 seconds before pressing a key on your PC the 41CL will show the "TIMEOUT" message, when that happen just press the R/S key to continue
Test #7 : PC is sending and 41CL is receiving at 4800 bauds
PC -> In RealTerm, under the "Port" tab
PC ---> Set "Baud" to 4800
PC ---> Press the "Open" button to close the com port (button should be raised)
PC ---> Press the "Open" button to open the com port (button should be depressed)
CL -> Press the H button (same as XEQ H)
PC -> Activate the RealTerm application
PC ---> Type the letter "a" on your PC keyboard and you should see "832003-0061" on the CL display (61 = ASCII value of a)
PC ---> Type the letter "A" on your PC keyboard and you should see "832003-0041" on the CL display (41 = ASCII value of A)
PC ---> Type any letters on your PC keyboard and you should see "832003-00??" on the CL display (?? = ASCII value of the key pressed)
CL -> Press the R/S button to stop the program
CL -> if you wait more than 10 seconds before pressing a key on your PC the 41CL will show the "TIMEOUT" message, when that happen just press the R/S key to continue
Test #8 : PC is sending and 41CL is receiving at 9600 bauds
PC -> In RealTerm, under the "Port" tab
PC ---> Set "Baud" to 9600
PC ---> Press the "Open" button to close the com port (button should be raised)
PC ---> Press the "Open" button to open the com port (button should be depressed)
CL -> Press the I button (same as XEQ I)
PC -> Activate the RealTerm application
PC ---> Type the letter "a" on your PC keyboard and you should see "832003-0061" on the CL display (61 = ASCII value of a)
PC ---> Type the letter "A" on your PC keyboard and you should see "832003-0041" on the CL display (41 = ASCII value of A)
PC ---> Type any letters on your PC keyboard and you should see "832003-00??" on the CL display (?? = ASCII value of the key pressed)
CL -> Press the R/S button to stop the program
CL -> if you wait more than 10 seconds before pressing a key on your PC the 41CL will show the "TIMEOUT" message, when that happen just press the R/S key to continue
EDIT: typos