阅读:930回复:1
菜鸟紧急求助!!!
各位前辈,我是一名菜鸟,毕设选了比较难的驱动程序设计,现在的情形有点进退两难。本来我认为写手柄驱动应简单一些(其他的有的没硬件,有的没有各种端口信息),可现在我感到越来越困难了。有哪位好心人能就下面的资料给提点建议或给点帮助(有原程序最好),菜鸟会不盛感激!!!!
1. pin assign memory card _______________________________ | | | O O O O O O O O | (front view PSX) |_______________________________| pin 9 7 6 5 4 3 2 1 PS PAD connecter ============================= | O O O| O O O| O O O | (front view PSX) \\________|________|_________/ pin 9 8 7 6 5 4 3 2 1 Pin signal dir active description -------------------------------------------------------------------- 1. dat in pos data from pad or memory-card 2. cmd out pos command data to pad or memory-card 3. +7V -- -- +7.6V power source for CD-ROM drive 4. gnd -- -- 5. +3V -- -- +3.6V power source for system 6. sel out neg select pad or memory-card 7. clk out -- data shift clock 8. -- -- -- N.A. 9. ack in neg acknowladge signal from pad or memory-card -------------------------------------------------------------------- *1) direction(in/out) is based from PSX *2) metal edge in pad connecter is connected pin 4 and sheald calbe. *3) signal SEL in PAD1, PAD2 is separated. 2. Comminucation timing chart Timing is compatibled in PAD, Memory-card. Overview ____ _____ SEL- |____________________________________________________________| ______ ____ ____ ____ ____ _________ CLK |||||||| |||||||| |||||||| |||||||| |||||||| _______________________________________________________________________ CMD X 01h XXXX 42h XXXX 00h XXXX 00h XXXX 00h XXXX ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _____________________________________________________________ DAT -----XXXXXXXXXXXXX ID XXXX 5Ah XXXX key1 XXXX key2 XXXX----- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ACK- ---------------|_|---------|_|---------|_|---------|_|----------------- top command. first comminucation(device check?) ____ SEL- |__________________________________________________________________ ______ _ _ _ _ _ _ _ __________________ _ _ _ _ CLK |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| __________ ___ CMD |________________________________________________| |_______ ____ DAT -----XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |___________ ACK- ----------------------------------------------|___|-------------------- X = none, - = Hi-Z 0x81 is memory-card, 0x01 is standard-pad at top command. serial data transfer is LSB-First format. data is down edged output, PSX is read at up edge in shift clock. PSX expects No-connection if not returned Acknoledge less than 100 usec. clock pluse is 250KHz. no need Acknoledge at last data. Acknoledge signal width is more than 2 usec. time is 16msec between SEL from previous SEL. SEL- for memory card in PAD access. 3. example schematic chart of interface(5 volte to 3.3 volte convertion) example in PAD PAD PS system /| P R,200ohm P=pullup(no need?) PAD SEL ---- O< |--+--\\/\\/\\/-- PS SEL- \\| HC14 /| P R,200ohm PAD CMD- ---- O< |--+--\\/\\/\\/-- PS CMD \\| HC14 /| P R,200ohm PAD CLK- ---- O< |--+--\\/\\/\\/-- PS CLK \\| HC14 PAD DAT _________ | |\\O ----| > ------------- PS DAT | |/ V HC125 PAD ACK- _________ | |\\O ----| > ------------- PS ACK- | |/ V HC125 example in PSX PSX PAD SEL- _________ | |\\O P P=pullup ----| >--+---------- PAD SEL- | |/ V HC125 CLK _________ | |\\O P ----| >--+---------- PAD CLK | |/ V HC125 CMD _________ | |\\O P ----| >--+---------- PAD CMD | |/ V HC125 /| P R,200ohm DAT- ----O< |--+--\\/\\/\\/-- PAD DAT \\| HC14 /| P R,200ohm ACK- ----O< |--+--\\/\\/\\/-- PAD ACK- \\| HC14 4. communication format in PAD must be start translation, after command expected \"0x01h\" from PS-system. PAD has 1-byte ID. pad is send a 2 byte of key-code + extend code after PAD ID \'Z\'(5Ah). normal pad timing flow -> 10000000 01000010 01011010 01234567 01234567 |--------|--------|--------|--------|--------| CMD | 01h | 42h | 00h | 00h | 00h | |--------|--------|--------|--------|--------| xxxxxxxx 10000010 10100101 01234567 01234567 |--------|--------|--------|--------|--------| DAT | ---- | 41h | 5ah | SW.1 | SW.2 | |--------|--------|--------|--------|--------| device ID \'Z\' data contents of normal PAD.(push low) +----------+----+----+----+----+----+----+----+----+ | byte | b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | +==========+====+====+====+====+====+====+====+====+ | +0 | ----- | N.A. +----------+---------------------------------------+ | +1 | 0x41 | \'A\' +----------+---------------------------------------+ | +2 | 0x5a | \'Z\' +----------+----+----+----+----+----+----+----+----+ | +3 |LEFT|DOWN|RGHT| UP | STA| 1 | 1 | SEL| +----------+----+----+----+----+----+----+----+----+ | +4 | [] | X | O | /\\ | R1 | L1 | R2 | L2 | +----------+----+----+----+----+----+----+----+----+ |
|
沙发#
发布于:2002-05-24 09:31
本来有一幅手柄和并口的接线图,我不知道怎样贴,只好用文字了。
D0----cmd D1----sel D2----clk (D3, D4, D5,--二极管--+3.6V D6, D7) ACK---data PE----ack GND---GND 左边是并口线,右边是手柄线。 |
|