2014-07-15 12:38 PM
I have a project that requires an IO pin to switch between High Z (Tri-State) and High. On a previous 8 bit micro the high z condition was satisfied by setting the port to an input and the high was satisfied by making the port and output and driving it high.
I am using the Hal drivers for non-OS and am strugglinig to find the commands to do this. I tried doing the following with o results:// Set Charge to Output and Set HighpalSetPadMode(PORT_B, CHARGE, PAL_MODE_OUTPUT_PUSHPULL);palSetPad(PORT_B, CHARGE); // Delay 5us//osalThreadSleepMicroseconds(CHARGE_WAIT);osalThreadSleepMicroseconds(50000); // Set Charge to Input and set to high zpalSetPadMode(PORT_B, CHARGE, PAL_MODE_INPUT);I played with different delay lengths thinking the scope missed it.Please let me know if you have any ideas.Doug #spc56Solved! Go to Solution.
2014-07-17 08:54 AM
2014-07-17 08:54 AM