Full Duplex Serial Problem
John Abshier
Posts: 1,116
I want to capture some numbers in binary.· I can capture them in decimal or hex OK.· Here is the code fragment (Complete program attached):
· repeat idx from 1 to 256
··· num ?
··· sio.tx(byte[noparse][[/noparse]num][noparse][[/noparse]0])
··· sio.tx(byte[noparse][[/noparse]num][noparse][[/noparse]1])
··· sio.tx(byte[noparse][[/noparse]num][noparse][[/noparse]2])
··· sio.tx(byte[noparse][[/noparse]num][noparse][[/noparse]3])
I capture the output into a file with hyperterm.· Using a hex editor the first 4·byest are:
8C 6C 8C 96
If I write the values·out in hex, the first 4 bytes are
72E5E5E9 which is the hex value for the decimal output 1927669225
When I write the bytes I get lots of 0x00 values, often more than 4 in a row.· I also used [url=mailto:Br@y]Br@y[/url]++ terminal to capute the bytes and get the same results as with hyperterm.
I am using 8 data bits, no parity, 1 stop bit.· I also tried slowing the baud down to 1200 with no difference than at 115200.
The goal is to capture mega bytes of the results of the random operator to test its properties.
I haven't a clue as to what is happening when I try to write and capture the bytes.
· repeat idx from 1 to 256
··· num ?
··· sio.tx(byte[noparse][[/noparse]num][noparse][[/noparse]0])
··· sio.tx(byte[noparse][[/noparse]num][noparse][[/noparse]1])
··· sio.tx(byte[noparse][[/noparse]num][noparse][[/noparse]2])
··· sio.tx(byte[noparse][[/noparse]num][noparse][[/noparse]3])
I capture the output into a file with hyperterm.· Using a hex editor the first 4·byest are:
8C 6C 8C 96
If I write the values·out in hex, the first 4 bytes are
72E5E5E9 which is the hex value for the decimal output 1927669225
When I write the bytes I get lots of 0x00 values, often more than 4 in a row.· I also used [url=mailto:Br@y]Br@y[/url]++ terminal to capute the bytes and get the same results as with hyperterm.
I am using 8 data bits, no parity, 1 stop bit.· I also tried slowing the baud down to 1200 with no difference than at 115200.
The goal is to capture mega bytes of the results of the random operator to test its properties.
I haven't a clue as to what is happening when I try to write and capture the bytes.
Comments