Skip to content

Commit

Permalink
[utils] - make the identify-output have 1:3 mark/space ratio to assis…
Browse files Browse the repository at this point in the history
…t in phase debugging.
  • Loading branch information
Richard Neill committed Mar 3, 2011
1 parent d49f140 commit e29171a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion man/pb_test-flash-2Hz.1
Expand Up @@ -17,7 +17,7 @@ Flash the LEDs on all 24 channels, simultaneously at 5.5555 MHz (the limit of th
.LP
\fBpb_test-identify-output BIT_N\fR
.IP
Flash one specific bit at 2Hz. Useful for channel identification. Invoke with \fB-h\fR for help.
Flash one specific bit at 2Hz. Useful for channel identification and phase check. Invoke with \fB-h\fR for help.

.SH "SEE ALSO"
\fBpulseblaster\fR(1), \fBpb_driver-load\fR(1)
7 changes: 5 additions & 2 deletions pbctl/pb_test-identify-output.sh
Expand Up @@ -9,15 +9,17 @@

#A very simple pulseblaster program: so trivial we can store it as a string!
#Note that the first 3 bytes must be prepended as the outputs that we set.
BIN_IMAGE_END="00 0000 017d 783d 0000 0000 0006 017d 783d"
BIN_IMAGE_END="00 0000 00be bc1d 0000 0000 0006 023c 345d"

#Program and start interface.
PROGRAM=/sys/class/pulseblaster/pulseblaster0/program
START=/sys/class/pulseblaster/pulseblaster0/start
STOP=/sys/class/pulseblaster/pulseblaster0/stop

if [ "$1" == "-h" -o "$1" == "--help" ] ;then
echo "Identify pulseblaster outputs. Flash one line at 2Hz."
echo "Identify pulseblaster outputs. Flash requested line at 2Hz."
echo "To verify phase (in case of inversion), the mark:space ratio is 1:3 (0.25s logic 1 : 0.75s logic 0)."
echo "The other lines are always low."
echo "Usage: `basename $0` BIT_N"
echo " where BIT_N is 0 .. 23"
exit 1
Expand Down Expand Up @@ -70,5 +72,6 @@ echo 1 > $START

#Say something
echo "Pulseblaster is now flashing output bit $BIT ($OUT) at 2Hz."
echo "The mark:space ratio is 1:3 (0.25s logic 1 : 0.75s logic 0). All other lines stay low."
echo "To stop it: 'echo 1 > $STOP'"

0 comments on commit e29171a

Please sign in to comment.