| ??? 04/29/03 17:05 Read: times |
#44501 - RE: Clock for OSD Responding to: ???'s previous message |
You generate the serial clock the same way you generate the data. Here's an outline of the function I use to send data to my STV5730 (most data sent is 16 bits, unsigned int):
mask = 0x8000 <this is unsigned int> set enable pin active while mask is non-zero if (dat & mask) set data pin high else set data pin low set clock pin active shift mask right one bit set clock inactive set enable pin inactive So the idea is to scan through the data to be sent, msb first, and set the data pin. Wiggle the clock pin, then look at the next data bit. My masking and shifting is an inefficient C equivalent of rlc, mov bit,C and keeping track of how many bits I've sent. You've got the right idea for setting the data pin...now just set the clock pin and then reset it (but keep in mind the minimum clock pulse width; on the 5730 this is 200ns). Dennis |
| Topic | Author | Date |
| Clock for OSD | 01/01/70 00:00 | |
| RE: Clock for OSD | 01/01/70 00:00 | |
| RE: Clock for OSD | 01/01/70 00:00 | |
RE: Clock for OSD | 01/01/70 00:00 |



