Hi I hope someone can help me out. I am using the cypress EZ-USB CY3671 Development Board with a CY7C64613-128NC chip. I have the following code: #define DATA P1_1 #define SCK P1_0 void s_transstart(void) //---------------------------------------------------------------------------------- // generates a transmission start // _____ ________ // DATA: |_______| // ___ ___ // SCK : ___| |___| |______ { DATA=1; SCK=0; //Initial state _nop_(); SCK=1; _nop_(); DATA=0; _nop_(); SCK=0; _nop_();_nop_();_nop_(); SCK=1; _nop_(); DATA=1; _nop_(); SCK=0; } P1_1 and P1_0 are the pins 1 and 0 of port A, I have tried the following to make the compiler pass the #define lines : #define DATA OUTA.1 #define SCK OUTA.0 #define DATA OUTA^1 #define SCK OUTB^0 Neither worked, please help me. How in the world can I have access to individual port pins form de C compiler. Thanks a lot
OUTA and OUTB are not at SFR locations. In the EZ-USB these are just XDATA memory locations. Therefore you can use AND (&) and OR (|) statements to alter the output ports.