/* Program : WR_BIO.C 96/06/24 By Albert Chang. Description : This program is running in PC. It does nothing but send and receive value from C25. It shows the handshake method between PC and C25. The status bit will be set after C25 write data to PC, so this bit can be taken as the handshake signal. The BIO\ pin of C25 is also used as the handshake signals. After C25 sent the data,the status bit will be set. And C25 will wait for data receiving. After PC has sent the data, BIO\ will be cleared. Then C25 is informed to receive the destination data. |------| BIO |------| | |--------->| | | PC | | C25 | | |<---------| | |------| WRITE |------| Running steps: 1. Set necessary parameter of loader, load the object file "wr_br.out" to C25 processor board. 2. Running the handshake program "wr_bio.exe" in PC. Note : 1. This program is compiled under Turbo C 2.0 and will also work under Borland C++ 3.0. 2. To run the program,user needs to type as following: C:\DSPC25>load -la -r1000 wr_bio.out C:\DSPC25>wr_bio.exe */ #include #include #include "..\..\..\include\dsp25.h" void main(void) { Word val; clrscr(); SelectBoard(1); do { while(Is_C25_Write()==YES); ClearBIO(); val = RdData(); printf("%04x ",val); SetBIO(); } while(kbhit()==0); getch(); }