1 Reply Latest reply on Sep 30, 2013 12:58 AM by gaya

    Question about an61345

    lee.carter

       Hi

         

      In TD_poll() of slave.c of An61345 example firmware code,

         

      The IOC used like this  IOC |=0x01  But i dont understand. 

         

      As i know, The IOC 's i/o initial direction is used by input. 

         

      So IOC register can read on input direction, but example code show that IOC can write like this  IOC |=0x01. 

         

      Is this something wrong what write data to input register ?

        • 1. Re: Question about an61345
          gaya

           Hi,

             

           

             

          In fw.c you can see that PC.0 is configured as an Output pin and PC.1 as input as below:

             

           

             

          OEC|=0x01; //PC.0 as output (SYNC signal)

             

          SYNCDELAY;

             

          OEC&=0xFD; //PC.1 as input (Clock changing signal)

             

           

             

          SYNCDELAY;

             

           

             

          It is the OEC register that determines which pin of port C acts as input, and which as output. 

             

           

             

          Regards,

             

          Gayathri