Hello,...

after a a course in computer design and logic (textbook by Mano).
i would like to test my knowlage and understandig of the matrieal.
i thout about using a PIC or PLC to do some simple func and connect it thru usb (Since it is extreamly popular protocol).

for the example Simple counter (from 0 to 8)

the actual PIC configuration isn't hard and it can be even created using simple circute (lots of NAND , NOR ,AND, NOT ).

the comunication between the card will be like the next scrinario:
Connection on Counter (chip or assembly).

Code:
 -------------
|clock         |
|clear         | 
|load          |
|d0       o0  |
|i1        o1  |
|i2        o2  |
|i3        o3  |
 --------------
the get msg will be
Clock,Clear,Load,d1,d2,d4
the post msg will be
o0,o1,o2,o3
only if clock = 1 the counter will work
Code:
each value,value,... means (binary) value,(binary) value
how can i conntact this device to a usb port and make an os to talk to it?