I am just seeing how I can pull down and make high the pin I am using for the one wire protocol.
So as I understand it, pins on the 328p are not open drain but can be used as bi-directional using the high impedance setting. To test this, the program, shown below, just toggles a pin. The actual output of the program is that the pin starts out high, goes low but does not go high again as it should based on the software. So, I am wondering why the pin did not get pulled up because of the last instruction.
noweare:
So, I am wondering why the pin did not get pulled up because of the last instruction
while (1); //here's there reason!
that line basically makes your code stuck in an infini loop which it cannot exit and restart the main loop. comment that out and it might fix your prob
Paul's comments can be a bit harsh, but they're usually good advice. The first step to creating good code is to make is readable, use standard conventions, use meaningful variable names, and put in comments where they would help. All of this is especially true if you are expecting someone else to give you some free help in a public forum.
So... As Paul stated, mixing direct port manipulation with the Arduino pin functions is not a good idea. Pick one or the other and stick to it.
Comments would help immensely. We can easily see what the code does, but that doesn't tell us what you think the code is doing. The comments would tell us what you are thinking so we can see if the code is appropriate.
It would also be helpful if you provide a reference for your comment "...as I understand it..." regarding the use of the direction register to change the signal level. This statement is what you are trying to confirm, but without knowing the source of that, we can't determine if you are actually trying to do what the original source is saying.
Also, how are you checking the output? Are you using an oscilloscope to see any transitions, or just checking the final state with a multimeter or LED?