07-20-2011 07:28 AM
I have an old basic program that writes, reads, compares, and writes to COM port 2.
The Code has several for loops to create 76 bits of data to Self Clocking Differential +5V/-5V where A to B voltage is +5V =1 and -5V =0. A & B both at +5V resepct to GND =Null.
The Code is written as follows
For i=1 to 16
If MID$(TOTALDIGITS$, 17-I< !) ="0" then
OUT &H2FC, (&HFE AND INP(&H2FC)) 'PIN 20 COM PORT 2 DTR
For j=1 to Bottom: Next J ' null time for bottom square wave
OUT &H2FC, (&H1 OR INP(&H2FC)) 'PIN 20 COM PORT 2 DTR
else
OUT &H2FC, (&HFD AND INP(&H2FC)) 'PIN 4 COM PORT 2 RTS
For j=1 to Bottom: Next J ' null time for bottom square wave
OUT &H2FC, (&H2 OR INP(&H2FC)) 'PIN 4 COM PORT 2 RTS
endif
FOR j=1 to TOP: Next J ' Null time for top of square wave
Next i
For j=1 to worddelay: next j ' Delay between words.
else where in the program initalizes port RTS & DTR states
OUT &H2FC, (&HFE)
OUT &H2FC, (&H1)
OUT &H2FC, (&HFD)
OUT &H2FC, (&H2)
Question
I saw several post about serial visa writes, How would read the port memory for the DTR RTS pins and make the connection back
port write/read/data compare? How does this compare to unasserted and asserted for the DTR adn RTS pins using property nodes?
Thanks,
Greg
07-20-2011 07:47 AM
07-20-2011 10:36 AM
I don't understand your question.
It looks like you've already found the property node for DTR and RTS. There are also property nodes for CTS and DSR. I don't know why you have a For Loop of 16 iterations where on the first 14, it does one thing and the last two iterations it does something else. You have no delay going on in there, so those iterations are going to run unbeleivably fast.
You don't have any VISA reads or writes in there. It looks like you are just toggling the handshaking pins. Is that what you want? What are you really trying to do here?
07-20-2011 10:45 AM
Thanks. I was attempting to duplicate the basic program in the first post.
The program does not work. I am getting 0000 on the display always.
The problem is the the 76 bit data string that gets made to talk to the serial display.
I have parsed out the 1000's, 100's. 10's, 1's Digit. Now I need to develop a conversion method to populate the 76 bit string show the appropriate Digiit and BCD segment is illuminated. See attached.
Thanks,