Society of Robots - Robot Forum

Software => Software => Topic started by: Its_Friday on April 10, 2009, 03:18:29 PM

Title: simple Digital output question (Axon)
Post by: Its_Friday on April 10, 2009, 03:18:29 PM
I've built my H-Bridge for 2 motors and all there is to do is to write a program to make them turn clockwise and counter clock wise. I just need to use 4 ports and switch them off and on.

Using the axon microcontroller, how to i turn ports off and on? For example, say i need port H3 to send 12 volts to a motor, and then when a condition is met, the port drops the voltage to 0.

Could i use....:

PORT_ON(PORTH,3);

if (something happens)
{
PORT_OFF(PORTH,3);
}
Title: Re: simple Digital output question (Axon)
Post by: Razor Concepts on April 10, 2009, 03:28:12 PM
Yes you can do that  ;D