by Theo Verelst
$mc bind dot <Button-1> { set i [$mc find withtag current]; if {[$mc itemcget $i -fill] == "red"} { $mc itemco $i -fill yellow } { $mc itemco $i -fill red } }
for {set i 0} {$i<5} {incr i} { set o {}; for {set j 7} {$j>=0} {incr j -1} { set k [tag_and "display dot x$i y$j"] ; if {[$mc itemcget $k -fill] == "red"} { set ii 1 } {set ii 0} ; append o $ii } ; puts [format {%x} [fromBinary $o]] puts -nonewline "0x[format {%x} [fromBinary $o]], " } ; puts {}
See also [L1 ] and [L2 ] where in a little while I''ll have added the Xilinx CPLD demo board and EZLITE BF533 DSP board (Open) Sources.