??? 05/11/09 11:49 Read: times |
#165232 - Dear Stefan Responding to: ???'s previous message |
As you have told me, to keep the SCLK low when "void convert_and_send(unsigned char hex_data1)" finishes.
But the problem is that during the program, the functions run as the below sequence : 1)void convert_and_send(unsigned char hex_data1) 2)unsigned char receive_convert(void) Now when the function 1 ends, the SCLK stays HIGH, then just after that the function 2 runs. Now the 2 function starts off with SCLK as HIGH.We cannot transform the SCLK form LOW to HIGH or vice versa in between the two functions or the data bit will be lost. Also, we read the bits from the 1380 on the HIGH to LOW edge and write to the 1380 on the LOW to HIGH edge according to the datasheet. Also, the SCLK is LOW when the system is IDLE, i.e. after the function 2. What else could be wrong . . ! ! ! |