Yes, the second drawing is what I am doing. Late last week in a forum exchange with Darrel and after some extensive research, we concluded that since USB is packet-based and such high speed, that filtering information on a tap-wire would be computationally impossible for a PIC. Even if computationally possible, writing the filter in program code would be like trying to write something to filter fiber connections.... possible, but....
Also, through connection analysis, we discovered first-hand that what comes across a tap-wire is just about everything on the bus except information that you're looking for.
I'll post a drawing and some complete code soon, but in the mean time, have a quick question. The USBN9604 has a microwire interface that we are trying to implement, instead of a parallel interface that is available. I have no experience programming for SPI, and am still new to PBP... but have coded quite a bit in MPASM. Attached is some rough code put together for this project. The code does no recording of keystrokes, it just takes one byte in from the USBN9604 and sends that byte out to the PIC USB connection.
The 9604 data sheet is here, which says that I have to send a read/write command before executing such read and writes. Also, it says, "1 cycle = 8 SK clocks. Data is transferred after the 8th SK of 1 cycle."
This is code that has been snipped from all over, then peppered with morsels fixing, then cut, replaced, and interrogated. I will not be able to test it on the PIC until tonight. But before that, can somebody take a look and critique?
What is the difference between hardware SPI and software SPI? I think my code might be a mix of both.... which probably will not work. In other words should I be observing SSPBUF for changes, or should I use an interrupt? Also, how do I tie the SPI interrupt to a particular pin? A solid code example or link to would be appreciated.
USBN9604 Data Sheet:
http://www.national.com/ds/US/USBN9604.pdf
Thanks all.





Bookmarks