This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

simulate spi

Hi Friends,
i have two problems:

1-i try writting a code in C using atmel 89c52 to simulate spi.does anyone has a helpful code for me?

2-in the program declaration,i declare an array:
int Read_Va[]=0x0D;
when i try to read it during the program:
ACC=Read_Va;

ACC equal A to D why?
Thanks

Parents
  • No, I'm afraid you are wrong: you cannot rely upon the compiler not to use the accumulator for its own purposes - therefore, you must not use it for your purposes.

    You might be lucky (sic?) and happen to get away with it on this occasion - but, if you continue to rely upon it, you will come unstuck!

Reply
  • No, I'm afraid you are wrong: you cannot rely upon the compiler not to use the accumulator for its own purposes - therefore, you must not use it for your purposes.

    You might be lucky (sic?) and happen to get away with it on this occasion - but, if you continue to rely upon it, you will come unstuck!

Children
No data