I/O pins help

i just got my hands on the Atom Pro. I couldn’t figure out how to set pins to input/output. Example: set pin1 as input and pin2 to output. How can i configure a pin to be I/O?

You can use the input and output commands to set the mode of each pin as shown on page 128 of the Atom Pro manual.

input p1 output p2

You can also implicitly set a pin to an output pin by using some of the other commands such as High, Low, Toggle.

Kurt

I don’t get it. changing an I/O pin is good for??? I mean, using a SEROUT command or other similar commands shift the pin to input or output mode, so what purpose is there to changing a pin’s “designation” without applying a command that actually does something to it?

You might want to set the starting place of a pulse, for instance, to start high or low. You can use the HIGH and LOW commands with PULSOUT to determine whether the pulse train starts out HIGH or LOW.

You can also use HIGH and LOW within loops to create pulses as fast or slow as you want, if you wish.

These are just two ways you can control the duty cycle and/or starting polarity of a pulse train.

It’s only limited by your imagination. :smiley:

8-Dale

I can understand using commands like HIGH and LOW for pulse trains etc. But could you explain what happens in the controller when a pin is designated as an input or an output pin?!

It serves exactly that function (input or output), but the state of the pin can be affected by other commands that change it. I am really not sure what you are asking here.

8-Dale

When you make a pin an input it is essentially an open circuit. This is useful when sharing a common wire or bus with several devices.