<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Technology of Robotics &#187; Robotics Tutorial</title>
	<atom:link href="http://robotechno.us/category/robotics-tutorial/feed" rel="self" type="application/rss+xml" />
	<link>http://robotechno.us</link>
	<description>Robotics Technology &#124; Robotics News, Articles and Tutorial</description>
	<lastBuildDate>Mon, 30 Jan 2012 16:12:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>AVR GCC : Microcontrollers Port Management (Part 2 end)</title>
		<link>http://robotechno.us/avr-gcc-microcontrollers-port-management-part-2.html</link>
		<comments>http://robotechno.us/avr-gcc-microcontrollers-port-management-part-2.html#comments</comments>
		<pubDate>Fri, 30 Dec 2011 20:06:48 +0000</pubDate>
		<dc:creator>Robot Technology</dc:creator>
				<category><![CDATA[Robotics Tutorial]]></category>
		<category><![CDATA[AVR-GCC]]></category>
		<category><![CDATA[Connect the LED to a microcontroller]]></category>
		<category><![CDATA[Management of the ports]]></category>
		<category><![CDATA[Microcontrollers Port Management]]></category>
		<category><![CDATA[ports of the microcontroller]]></category>
		<category><![CDATA[simple programs microcontroller]]></category>

		<guid isPermaLink="false">http://robotechno.us/?p=1370</guid>
		<description><![CDATA[A continuation of the article AVR GCC : Microcontrollers Port Management (Part 1). &#62;&#62;Once the data transfer direction for the port is configured, you can set the port value to be stored in the appropriate register PORTx. PORTx &#8211; register the port, where x is the port name. If the output is configured as an output, then [...]]]></description>
			<content:encoded><![CDATA[<p>A continuation of the article <a target="_blank" title="Power Supply: AVR GCC : Microcontrollers Port Management (Part 1)" href="http://www.keepbrowse.com/index.php?q=aHR0cDovL3JvYm90ZWNobm8udXMvYXZyLWdjYy1taWNyb2NvbnRyb2xsZXJzLXBvcnQtbWFuYWdlbWVudC0yLmh0bWw%3D" rel="bookmark">AVR GCC : Microcontrollers Port Management (Part 1)</a>.</p>
<p>&gt;&gt;Once the data transfer direction for the port is configured, you can set the port value to be stored in the appropriate register PORTx.<br />
PORTx &#8211; register the port, where x is the port name.</p>
<p>If the output is configured as an output, then the corresponding bit in the register PORTx forms on output high signal, and zero &#8211; low signal.</p>
<p>If the output is configured as an input, the corresponding bit in the register PORTx connects to the output internal pull-up resistor, which provides a high level of input in the absence of an external signal.</p>
<p><span id="more-1370"></span>Set to &#8220;1&#8243; on all the outputs of port D as follows.</p>
<p><strong>PORTD = 0xff;</strong></p>
<p>A set of &#8220;0&#8243; on all the outputs of the port D may be the case.</p>
<p><strong>PORTD = 0&#215;00;</strong></p>
<p>For each bit registers can be accessed PORTx and individually as well as in the case of registers DDRx.</p>
<p>For example, the command</p>
<p><strong>PORTD | = 1 &lt;&lt;3;</strong></p>
<p>set to &#8220;1&#8243; (high signal) on output PD3.</p>
<p>Command</p>
<p><strong>PORTD &amp; = ~ (1 &lt;&lt;4);</strong></p>
<p>set to &#8220;0&#8243; (low signal) on output PD4.</p>
<p>In AVR GCC and the shift can be made using the _BV (), which performs the bitwise shift and inserts the result in the compiled code.</p>
<p>In the case of functions _BV () the previous two commands will look like.</p>
<p><strong>PORTD | = _BV (PD3);</strong> <em>/ / set to &#8220;1&#8243; on line 3 of port D</em></p>
<p><strong>PORTD &amp; = ~ _BV (PD4);</strong> / / <em>set to &#8220;0&#8243; on line 4 port D</em></p>
<p>Now try to write some simple programs to better understand how to work with the ports of the microcontroller.</p>
<p>Our first program will consist of only a few lines, and their task will include lighting LEDs connected to the microcontroller.</p>
<p>Connect the LED to a microcontroller in various ways.<br />
<a href="http://robotechno.us/avr-gcc-microcontrollers-port-management-part-2.html/connect-the-led" rel="attachment wp-att-1373"><img class="size-medium wp-image-1373 aligncenter" title="Connect the LED to a microcontroller in various ways." src="http://robotechno.us/wp-content/uploads/2011/12/Connect-the-LED-300x154.jpg" alt="Connect the LED 300x154 AVR GCC : Microcontrollers Port Management (Part 2 end)" width="300" height="154" /></a><br />
Depending on how you connect the LED will light up any signal from a high level applied to the output of the microcontroller PD1, as in the first figure, or from low-level signal in the case of connection shown The second figure.</p>
<pre>/************************************************* ************************
EXAMPLE LED on High-level inputs
Connection example in Figure 1
************************************************** ************************/

# include &lt;avr/io.h&gt;
int main (void) {    / / start the main program
DDRD = 0xff;         / / D port pins are configured as outputs
PORTD | = _BV (PD1); / / set to "1" (high level) on output PD1
}                    / / Closing bracket of the main program

/************************************************* **********************
EXAMPLE LED on low-level signals
Connection example in Figure 2
************************************************** **********************/

# include &lt;avr/io.h&gt;

int main (void) {      / / start the main program
DDRD = 0xff;           / / D port pins are configured as outputs
PORTD &amp; = ~ _BV (PD1); / / set to "0" (low level) on output PD1
}                      / / Closing bracket of the main program</pre>
<p>Now try to blink an LED connected as shown in the left figure. For this we use the delay function _delay_ms ().</p>
<p>Function _delay_ms () creates a delay, depending on the argument passed to it, expressed in milliseconds (one second in 1000 milliseconds). The maximum delay can be up to 262.14 milliseconds. If the user submits the function value is greater than 262.14, it will automatically reduce the resolution to 1 / 10 milliseconds, which provides a delay of up to 6.5535 seconds.</p>
<p>Function _delay_ms () is contained in a file delay.h, so we will need to attach this file to the program. In addition to the normal operation of this feature, you must specify the rate at which works a microcontroller, in hertz.</p>
<pre>/*************************************
EXAMPLE flashing LED
Connection example in Figure 1
**************************************/

# define F_CPU 1000000UL / / specify the frequency in hertz

# include &lt;avr/io.h&gt;
# include &lt;util/delay.h&gt;

int main (void) {        / / start the main program

DDRD = 0xff;             / / D port pins are configured as outputs

PORTD | = _BV (PD1);     / / set to "1" (high level) on output PD1,
                         / / LED light

_delay_ms (500)          / / wait for 0.5 seconds.

PORTD &amp; = ~ _BV (PD1);   / / set to "0" (low level) on output PD1,
/ / LED to extinguish

_delay_ms (500)          / / wait for 0.5 seconds.

PORTD | = _BV (PD1);     / / set to "1" (high level) on output PD1,
/ / LED light

_delay_ms (500)          / / wait for 0.5 seconds.

PORTD &amp; = ~ _BV (PD1);   / / set to "0" (low level) on output PD1,
                         / / LED to extinguish

}                        / / Closing bracket of the main program</pre>
<p>A series of LED flashes, it will be very short. In order to make continuous flashing, you can organize an infinite loop by using an unconditional jump &#8220;goto&#8221;. The goto statement jumps to the place of the program, the designated mark. Name tags can not contain spaces. After the name tags put a colon. Between the tag name and a colon should be no spaces.</p>
<pre>/************************************************* ******
Examples of infinitely flashing LED
Connection example in Figure 1
************************************************** ******/

# define F_CPU 1000000UL / / specify the frequency in hertz

# include &lt;avr/io.h&gt;
# include &lt;util/delay.h&gt;

int main (void) {        / / start the main program

DDRD = 0xff;             / / D port pins are configured as outputs

start:                   / / label for the command goto start

PORTD | = _BV (PD1);     / / set to "1" (high level) on output PD1,
/ / LED light

_delay_ms (250)          / / wait 0.25 seconds.

PORTD &amp; = ~ _BV (PD1);   / / set to "0" (low level) on output PD1,
/ / LED to extinguish

_delay_ms (250)          / / wait 0.25 seconds.

goto start;              / / go to label start

}                        / / Closing bracket of the main program</pre>
<div id="seo_alrp_related"><div class="seo_alrp_rl_content"><a href="http://robotechno.us/avr-gcc-microcontrollers-port-management-2.html" rel="bookmark">AVR GCC : Microcontrollers Port Management (Part 1)</a> <br />Management of the ports in the AVR GCC. Registers and DDRx PORTx. FSE. Bitwise operations. The function of delay. Unconditional jump in the program. Ports of the microcontroller - this I / O devices, allowing the microcontroller to send or receive data. The default port of the AVR microcontroller has ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/avrgcc-code-compliance.html" rel="bookmark">AVR-GCC : CODE COMPLIANCE</a> <br />On the Internet there are many examples of code for AVR-GCC , written using functions and macros that are no longer supported in newer versions of the compiler. To use these examples and understand them with the essence of the ports of the microcontroller, you need to rewrite code or ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/dc-motor-speed-regulation-with-a-pwm-feed-back-system.html" rel="bookmark">DC Motor Speed Regulation with A PWM Feed Back System</a> <br />This tutorial will helps you how the PWM works. You will learn what is PWM, the usage of PWM also how to program a DC Motor with PWM. Some Robots need to control the motor speed for its to work. Just use PWM system and you will get your motor's ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/arduino-tutorial-display-characters-lcd-module.html" rel="bookmark">Arduino Tutorial: Display Characters on LCD Module</a> <br />This tutorial will show you how to use and connect your LCD character module with Arduino Uno , Arduino Mega or any other Arduino board. This is about how to display characters on LCD module from Arduino module. Hardwares LCD module (16x2 or 20x4) - http://store.fut-electronics.com/Products/PDF/1602A.pdf Arduino uno or arduino ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/arduino-tutorial-piezo-element-detect-vibration.html" rel="bookmark">Arduino Tutorial: Use a Piezo Element to Detect Vibration</a> <br />Arduino Tutorial: Use a Piezo Element to Detect Vibration. This tutorial shows you how to use a Piezo element to detect vibration, in this case, a knock on a door, table, or other solid surface. A piezo is an electronic device that generates a voltage when it's physically deformed by ...</div><br /></div>]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/avr-gcc-microcontrollers-port-management-part-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple line follower robot with LOGIC CIRCUITS</title>
		<link>http://robotechno.us/simple-line-follower-robot-logic-circuits.html</link>
		<comments>http://robotechno.us/simple-line-follower-robot-logic-circuits.html#comments</comments>
		<pubDate>Wed, 21 Dec 2011 00:53:43 +0000</pubDate>
		<dc:creator>Robot Technology</dc:creator>
				<category><![CDATA[Robotics Tutorial]]></category>
		<category><![CDATA[logic robot circuit]]></category>
		<category><![CDATA[robot motion]]></category>
		<category><![CDATA[robot with LOGIC CIRCUITS]]></category>
		<category><![CDATA[Simple line follower]]></category>
		<category><![CDATA[simple robot project]]></category>

		<guid isPermaLink="false">http://robotechno.us/?p=1339</guid>
		<description><![CDATA[Using logic chips can make the robot&#8217;s behavior more interesting and can implement more complex algorithms. In this robot, the gate circuit is used to make the robot no longer worried about the sharp turns. It will only be using one sensor. Algorithms for this robot motion will be as follows: when the sensor on [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><a href="http://robotechno.us/simple-line-follower-robot-logic-circuits.html/line-follower-with-single-sensor" rel="attachment wp-att-1340"><img class="size-medium wp-image-1340 alignleft" title="Line follower with single sensor" src="http://robotechno.us/wp-content/uploads/2011/12/line-follower-with-single-sensor-165x300.jpg" alt="line follower with single sensor 165x300 Simple line follower robot with LOGIC CIRCUITS" width="165" height="300" /></a><strong>Using logic chips</strong> can make the robot&#8217;s behavior more interesting and can implement more complex algorithms. In this robot, the gate circuit is used to make the robot no longer worried about the sharp turns. It will only be using one sensor.</p>
<p><em>Algorithms for this robot motion will be as follows:</em> when the sensor on a black field, then one of the motor will be switched on and off the other. Thus, the robot will change until the sensor is not able to pass on a white field. Then the motor running, and off &#8211; on. The robot starts rotating in the opposite direction until the sensor back on the black line. The algorithm will repeat again, and robots, slightly swaying from side to side, begin to move along the border of black and white.</p>
<p>A logical element that we add to the circuit of the robot is an element  &#8220;NOT&#8221; gate, or &#8220;inverter&#8221;. The inverter has one input and one output. When the input of inverter fed a logical &#8220;1&#8243; (logical unit &#8211; a high signal), the output we will have a logical &#8220;0&#8243; (logical zero &#8211; low signal), and when the input will be submitted to a logical &#8220;0&#8243;, then output will be present a logical &#8220;1&#8243;.</p>
<p><span id="more-1339"></span>In addition to the NOT gate, there are also elements of OR and AND, providing a logical addition and logical conjunction, respectively. In addition, is often used combined elements of NAND and NOR. More information about the logical elements can be read here.</p>
<p>Schematic of the robot will look like this :<br />
<a href="http://robotechno.us/wp-content/uploads/2011/12/LOGIC-CIRCUITS-robot-scheme.jpg"><img class="aligncenter size-medium wp-image-1344" title="LOGIC CIRCUITS robot scheme" src="http://robotechno.us/wp-content/uploads/2011/12/LOGIC-CIRCUITS-robot-scheme-300x268.jpg" alt="LOGIC CIRCUITS robot scheme 300x268 Simple line follower robot with LOGIC CIRCUITS" width="300" height="268" /></a>Resistor R2 is selected in such a way to give the best sensitivity of the sensor.</p>
<p style="text-align: left;">When connecting the phototransistor used pull-up resistor R2, sincethe TTL chips at the entrance when no signal is present a logic high(logic &#8221;1&#8243;). Resistor, pull-up input to the &#8220;land&#8221;, will provide a low level(logic &#8221;0&#8243;) in the absence of a signal from the phototransistor.</p>
<p>The principle of the scheme is based on inversion of the signal from the phototransistor. When the sensor is illuminated (located on a white field), the phototransistor will be opened and the input motor driver<strong> L293D</strong> INPUT1 a signal is high (logic &#8221;1&#8243;). Motor M1 rotates. In addition, the signal from the phototransistor will be served at the input of &#8221;NO&#8221;, which will convert a logical &#8221;1&#8243; to logical &#8221;0&#8243; and submit it to the input INPUT4. Motor M2 will stand.<br />
<a href="http://robotechno.us/simple-line-follower-robot-logic-circuits.html/condition-1-phototransistor-illuminated" rel="attachment wp-att-1343"><img class="aligncenter size-medium wp-image-1343" title="Condition 1 " src="http://robotechno.us/wp-content/uploads/2011/12/Condition-1-phototransistor-illuminated.-300x267.jpg" alt="Condition 1 phototransistor illuminated. 300x267 Simple line follower robot with LOGIC CIRCUITS" width="300" height="267" /></a><br />
When the robot turns and the sensor is over the white field, the phototransistor will be closed and the input signal INPUT1 be low (logic &#8220;0&#8243;). M1 motor stops. A logical &#8220;0&#8243; is inverted by an element &#8220;NOT&#8221;, and at the entrance INPUT4 appears logical &#8220;1&#8243;. Motor M2 starts to rotate.</p>
<p><a href="http://robotechno.us/simple-line-follower-robot-logic-circuits.html/condition-2-phototransistor-is-not-covered" rel="attachment wp-att-1342"><img class="aligncenter size-medium wp-image-1342" title="Condition 2 " src="http://robotechno.us/wp-content/uploads/2011/12/Condition-2-phototransistor-is-not-covered-300x261.jpg" alt="Condition 2 phototransistor is not covered 300x261 Simple line follower robot with LOGIC CIRCUITS" width="300" height="261" /></a>The change from state 1 and state 2 will give the robot to follow along the border of white and black.<br />
In this scheme can be applied to logic chips or <strong>SN7404N</strong>.<br />
<a href="http://robotechno.us/wp-content/uploads/2011/12/7404-pin-out.jpg"><img class="aligncenter  wp-image-1341" title="7404 pin out" src="http://robotechno.us/wp-content/uploads/2011/12/7404-pin-out.jpg" alt="7404 pin out Simple line follower robot with LOGIC CIRCUITS" width="154" height="209" /></a>Described by the robot can be implemented without the use of pull-up resistor. In this case, the emitter of the phototransistor can be connected to &#8220;earth&#8221; and to use two elements of the &#8220;NOT&#8221; gate.<br />
<a href="http://robotechno.us/wp-content/uploads/2011/12/use-two-elements-of-the-NOT-gate.jpg"><img class="aligncenter size-medium wp-image-1345" title="The use two elements of the NOT gate" src="http://robotechno.us/wp-content/uploads/2011/12/use-two-elements-of-the-NOT-gate-300x210.jpg" alt="use two elements of the NOT gate 300x210 Simple line follower robot with LOGIC CIRCUITS" width="300" height="210" /></a>It should be noted that the gate in addition to its direct purpose, may be a signal amplifier. Therefore, it is a variant of the scheme is often used in creating robots to sports competitions &#8220;Racing on the line.&#8221;</p>
<div id="seo_alrp_related"><div class="seo_alrp_rl_content"><a href="http://robotechno.us/avr-gcc-microcontrollers-port-management-2.html" rel="bookmark">AVR GCC : Microcontrollers Port Management (Part 1)</a> <br />Management of the ports in the AVR GCC. Registers and DDRx PORTx. FSE. Bitwise operations. The function of delay. Unconditional jump in the program. Ports of the microcontroller - this I / O devices, allowing the microcontroller to send or receive data. The default port of the AVR microcontroller has ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/l293d-motor-driver.html" rel="bookmark">L293D Motor Driver</a> <br />To control the robot's motors need a device that would have transformed the control signals of low power in the currents that are sufficient to control the motors. Such a device called the motor driver . There are many various schemes for motor control. They differ in how capacity and ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/voltage-comparator.html" rel="bookmark">Voltage Comparator</a> <br />In electronics, a comparator is a device which compares two voltages or currents and switches its output to indicate which is larger. More generally, the term is also used to refer to a device that compares two items of data. Output voltage will "switch" whenever the input voltage (at the ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/line-follower-sensor.html" rel="bookmark">Line Follower Sensor</a> <br />The circuit diagram for the Line Follow Sensor board is shown below: The board is connected directly to the Light IO board via PL4. This circuit is very simple. +5V is applied via PL4 pin 4 to the circuit, and 0V is connected to pin 1 of PL4. When power ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/arduino-tutorial-piezo-element-detect-vibration.html" rel="bookmark">Arduino Tutorial: Use a Piezo Element to Detect Vibration</a> <br />Arduino Tutorial: Use a Piezo Element to Detect Vibration. This tutorial shows you how to use a Piezo element to detect vibration, in this case, a knock on a door, table, or other solid surface. A piezo is an electronic device that generates a voltage when it's physically deformed by ...</div><br /></div>]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/simple-line-follower-robot-logic-circuits.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Distance Measurement Using Ultrasonic and MSP430 Microcontroller</title>
		<link>http://robotechno.us/distance-measurement-ultrasonic-msp430-microcontroller.html</link>
		<comments>http://robotechno.us/distance-measurement-ultrasonic-msp430-microcontroller.html#comments</comments>
		<pubDate>Tue, 06 Dec 2011 05:53:59 +0000</pubDate>
		<dc:creator>Robot Technology</dc:creator>
				<category><![CDATA[Microcontroller]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Distance Measurement]]></category>
		<category><![CDATA[Distance Measurement with ultrasonic]]></category>
		<category><![CDATA[MSP430 Microcontroller circuit]]></category>
		<category><![CDATA[ultrasonic circuit diagram]]></category>
		<category><![CDATA[ultrasonic distance sensor]]></category>
		<category><![CDATA[ultrasonic sensor cirucit]]></category>

		<guid isPermaLink="false">http://robotechno.us/?p=1303</guid>
		<description><![CDATA[This is the application report from Texas Instruments about distance measurement using ultrasonic and MSP430 microcontroller. The report is provided in PDF file, you may download the application report at the end of this post. This application report describes a distance-measuring system determined by ultrasonic sound using the MSP430F413 ultralow-power microcontroller. The system transmits a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://robotechno.us/distance-measurement-ultrasonic-msp430-microcontroller.html/ultrasonic-distance-sensor-with-the-msp430" rel="attachment wp-att-1304"><img class="aligncenter size-medium wp-image-1304" title="Ultrasonic Distance Sensor With the MSP430" src="http://robotechno.us/wp-content/uploads/2011/12/Ultrasonic-Distance-Sensor-With-the-MSP430-269x300.png" alt="Ultrasonic Distance Sensor With the MSP430 269x300 Distance Measurement Using Ultrasonic and MSP430 Microcontroller" width="269" height="300" /></a></p>
<p>This is the application report from Texas Instruments about distance measurement using ultrasonic and MSP430 microcontroller. The report is provided in PDF file, you may download the application report at the end of this post.</p>
<p>This application report describes a distance-measuring system determined by ultrasonic sound using the MSP430F413 ultralow-power microcontroller. The system transmits a burst of ultrasonic sound waves towards the subject point and after that receives the corresponding echo.<br />
<span id="more-1303"></span><br />
This application is primarily based upon the reflection of sound waves. Sound waves are defined as longitudinal pressure waves in the medium in which they&#8217;re travelling. Subjects whose dimensions are greater than the wavelength of the impinging sound waves reflect them; the reflected waves are known as the echo. In the event the speed of sound in the medium is recognized and the time taken for the sound waves to travel the distance from the source towards the subject point and back to the source is measured, the distance from the source to the subject point will be computed accurately.</p>
<p>The devices applied to transmit and receive the ultrasonic sound waves within this application are 40-kHz ceramic ultrasonic transducers. The MSP430 drives the transmitter transducer using a 12-cycle burst of 40-kHz square-wave signal derived from the crystal oscillator, and therefore the receiver transducer receives the echo. The Timer_A in the MSP430 is configured to count the 40-kHz crystal frequency such that the time measurement resolution is 25 µs, that is more than enough for this application. The measurement time base is extremely stable because it is derived from a quartz-crystal oscillator. The echo received by the receiver transducer is boosted by an operational amplifier and the amplified output is fed towards the Comparator_A input. The Comparator_A senses the presence of the echo signal at its input and triggers a capture of Timer_A count value to capture compare register CCR1.</p>
<p>The capture is accomplished exactly at the immediate the echo arrives at the system. The captured count will be the measure of the time taken for the ultrasonic burst to travel the distance from the system to the subject point and back to the system. The distance in inches from the system towards the subject point is computed by the MSP430 implementing this measured time and displayed on a two-digit static LCD. Instantly right after updating the display screen, the MSP430 goes to LPM3 sleep mode to keep electrical power. The Basic Timer1 is programmed to interrupt the MSP430 every 205 milliseconds. The interrupt signal from the Basic Timer1 wakes up the MSP430 to repeat the measurement cycle and update the display screen.</p>
<p>Download the application report of distance measurement using ultrasonic and MSP430 microcontroller<br />
» <a target="_blank" title="Ultrasonic Distance Measurement With the MSP430" href="http://www.ti.com/lit/an/slaa136a/slaa136a.pdf" rel="external nofollow" target="_blank">Download Link 1</a> (direct download from Texas Instruments)<br />
» <a target="_blank" title="Distance Measurement Using Ultrasonic and MSP430 Microcontroller" href="http://myfilehost.us/dll/b53ejg" rel="external nofollow" target="_blank">Download Link 1</a> (mirror download)</p>
<div id="seo_alrp_related"><div class="seo_alrp_rl_content"><a href="http://robotechno.us/parallax-ping-28015-ultrasonic-distance-sensor-datasheet-and-application-sample.html" rel="bookmark">Parallax Ping 28015 Ultrasonic Distance Sensor Datasheet and Application Sample</a> <br />Download ping parallax ultrasonic distance sensor datasheet, schematic and program code sample: Â» Download Link</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/dc-motor-speed-regulation-with-a-pwm-feed-back-system.html" rel="bookmark">DC Motor Speed Regulation with A PWM Feed Back System</a> <br />This tutorial will helps you how the PWM works. You will learn what is PWM, the usage of PWM also how to program a DC Motor with PWM. Some Robots need to control the motor speed for its to work. Just use PWM system and you will get your motor's ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/processing-frequency-of-color-sensor-tcs230-with-microcontroller-at89s51.html" rel="bookmark">Processing Frequency of Color Sensor TCS230 with Microcontroller AT89S51</a> <br />The TCS230 programmable color light-to-frequency converter combines configurable silicon photodiodes and a current-to-frequency converter on single monolithic CMOS integrated circuit. The output is a square wave (50% duty cycle) with frequency directly proportional to light intensity (irradiance). The full-scale output frequency can be scaled by one of three preset values ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/robotic-voice-generator.html" rel="bookmark">Robotic voice generator</a> <br />Robotic voice generator does not need the variety of complex chips. You can assemble using only ISD2500 ChipCorder® family and few components.The family of chip-coders ISD2500 firm Winbond contains almost everything you need to record and play back voice messages. As chips have mic preamps with AGC, working with the ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/sound-activation-schematic-diagram.html" rel="bookmark">Sound Activation Schematic Diagram</a> <br />Sound activation also knows as tone detector is one of sensing system that usually used for robot start up activation. When some frequency have received by microphone in this circuit, then the robot will start to move. I’ve collected some schematic diagrams of sound activation as follow: Sound Activation schematic ...</div><br /></div>]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/distance-measurement-ultrasonic-msp430-microcontroller.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arduino Tutorial: Use a Piezo Element to Detect Vibration</title>
		<link>http://robotechno.us/arduino-tutorial-piezo-element-detect-vibration.html</link>
		<comments>http://robotechno.us/arduino-tutorial-piezo-element-detect-vibration.html#comments</comments>
		<pubDate>Sat, 26 Nov 2011 09:21:47 +0000</pubDate>
		<dc:creator>Robot Technology</dc:creator>
				<category><![CDATA[Arduino Tutorials]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Microcontroller]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Robotics Tutorial]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[arduino piezo element sensor]]></category>
		<category><![CDATA[Arduino Tutorial]]></category>
		<category><![CDATA[use a piezo element to detect vibration]]></category>
		<category><![CDATA[vibration detector arduino]]></category>

		<guid isPermaLink="false">http://robotechno.us/?p=1293</guid>
		<description><![CDATA[Arduino Tutorial: Use a Piezo Element to Detect Vibration. This tutorial shows you how to use a Piezo element to detect vibration, in this case, a knock on a door, table, or other solid surface. A piezo is an electronic device that generates a voltage when it&#8217;s physically deformed by a vibration, sound wave, or [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://robotechno.us/arduino-tutorial-piezo-element-detect-vibration.html/circuit-connection-piezo-element-to-detect-vibration" rel="attachment wp-att-1295"><img class="aligncenter size-medium wp-image-1295" title="circuit connection - Piezo element to detect vibration" src="http://robotechno.us/wp-content/uploads/2011/11/circuit-connection-Piezo-element-to-detect-vibration-279x300.jpg" alt="circuit connection Piezo element to detect vibration 279x300 Arduino Tutorial: Use a Piezo Element to Detect Vibration" width="279" height="300" /></a></p>
<p>Arduino Tutorial: Use a Piezo Element to Detect Vibration. This tutorial shows you how to use a Piezo element to detect vibration, in this case, a knock on a door, table, or other solid surface.</p>
<p>A piezo is an electronic device that generates a voltage when it&#8217;s physically deformed by a vibration, sound wave, or mechanical strain. Similarly, when you put a voltage across a piezo, it vibrates and creates a tone. Piezos can be used both to play tones and to detect tones.<br />
<span id="more-1293"></span><br />
The sketch reads the piezos output using the <code><strong>analogRead()</strong></code> command, encoding the voltage range from 0 to 5 volts to a numerical range from 0 to 1023 in a process referred to as analog-to-digital conversion, or ADC.</p>
<p>If the sensors output is stronger than a certain threshold, your Arduino will send the string &#8220;Knock!&#8221; to the computer over the serial port.</p>
<p>Open the serial monitor to see this text.</p>
<p><strong>Hardware Required</strong></p>
<ul>
<li>Arduino Board</li>
<li>(1) Piezo electric disc</li>
<li>(1) Megohm resistor</li>
<li>solid surface</li>
</ul>
<p>Piezos are polarized, meaning that voltage passes through them (or out of them) in a specific direction. Connect the black wire (the lower voltage) to ground and the red wire (the higher voltage) to analog pin 0. Additionally, connect a 1-megohm resistor in parallel to the Piezo element to limit the voltage and current produced by the piezo and to protect the analog input.</p>
<p>It is possible to acquire piezo elements without a plastic housing. These will look like a metallic disc, and are easier to use as input sensors. PIezo sensors work best when firmly pressed against, taped, or glued their sensing surface.</p>
<p>Schematic Diagram:</p>
<p><a href="http://robotechno.us/arduino-tutorial-piezo-element-detect-vibration.html/schematic-diagram-piezo-element-to-detect-vibration" rel="attachment wp-att-1294"><img class="aligncenter size-medium wp-image-1294" title="schematic diagram - Piezo element to detect vibration" src="http://robotechno.us/wp-content/uploads/2011/11/schematic-diagram-Piezo-element-to-detect-vibration-292x300.jpg" alt="schematic diagram Piezo element to detect vibration 292x300 Arduino Tutorial: Use a Piezo Element to Detect Vibration" width="292" height="300" /></a></p>
<p>A Piezo to attached to analog pin 0 with a 1-Megohm resistor</p>
<p><strong>Code</strong></p>
<p>In the code below, the incoming piezo data is compared to a threshold value set by the user. Try raising or lowering this value to increase your sensor&#8217;s overall sensitivity.</p>
<blockquote><p>/* Knock Sensor<br />
This sketch reads a piezo element to detect a knocking sound.<br />
It reads an analog pin and compares the result to a set threshold.<br />
If the result is greater than the threshold, it writes<br />
&#8220;knock&#8221; to the serial port, and toggles the LED on pin 13.<br />
The circuit:<br />
* + connection of the piezo attached to analog in 0<br />
* &#8211; connection of the piezo attached to ground<br />
* 1-megohm resistor attached from analog in 0 to ground</p>
<p>http://www.arduino.cc/en/Tutorial/Knock</p>
<p>created 25 Mar 2007<br />
by David Cuartielles<br />
modified 4 Sep 2010<br />
by Tom Igoe<br />
This example code is in the public domain.<br />
*/<br />
// these constants won&#8217;t change:<br />
const int ledPin = 13; // led connected to digital pin 13<br />
const int knockSensor = A0; // the piezo is connected to analog pin 0<br />
const int threshold = 100; // threshold value to decide when the detected sound is a knock<br />
or not<br />
// these variables will change:<br />
int sensorReading = 0; // variable to store the value read from the sensor pin<br />
int ledState = LOW; // variable used to store the last LED status, to toggle the light<br />
void setup() {<br />
pinMode(ledPin, OUTPUT); // declare the ledPin as as OUTPUT<br />
Serial.begin(9600); // use the serial port<br />
}<br />
void loop()<br />
// read the sensor and store it in the variable sensorReading:<br />
sensorReading = analogRead(knockSensor);<br />
// if the sensor reading is greater than the threshold:<br />
if (sensorReading &gt;= threshold) {<br />
// toggle the status of the ledPin:<br />
ledState = !ledState;<br />
// update the LED pin itself:<br />
digitalWrite(ledPin, ledState);<br />
// send the string &#8220;Knock!&#8221; back to the computer, followed by newline<br />
Serial.println(&#8220;Knock!&#8221;);<br />
}<br />
delay(100); // delay to avoid overloading the serial port buffer<br />
}</p></blockquote>
<p>Download the Arduino Tutorial: Use a Piezo Element to Detect Vibration in PDF document:<br />
» <strong><a target="_blank" title="Arduino Tutorial: Use a Piezo Element to Detect Vibration" href="http://myfilehost.us/dll/wqd1sx" target="_blank">Download Link</a></strong></p>
<div id="seo_alrp_related"><div class="seo_alrp_rl_content"><a href="http://robotechno.us/arduino-tutorial-collection-wiring-code.html" rel="bookmark">Arduino Tutorial: Controlling the LED&#8217;s Blinking Rates using Potensiometer</a> <br />This is a tutorial about controlling the LED's blinking rates using potensiometer. A potentiometer is really a simple knob that gives a adjustable resistance, which we are able to read into the Arduino board as an analog value. In this simple tutorial, you will see how the resistance value of ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/voltage-comparator.html" rel="bookmark">Voltage Comparator</a> <br />In electronics, a comparator is a device which compares two voltages or currents and switches its output to indicate which is larger. More generally, the term is also used to refer to a device that compares two items of data. Output voltage will "switch" whenever the input voltage (at the ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/avr-line-following-robot-tutorial.html" rel="bookmark">AVR Line Following Robot Tutorial</a> <br />Block Diagram The robot uses IR sensors to sense the line, an array of 8 IR LEDs&lt; (Tx) and sensors (Rx), facing the ground has been used in this setup. The output of the sensors is an analog signal which depends on the amount of light reflected back, this analog ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/arduino-hardware-part-2.html" rel="bookmark">Arduino Hardware (Part 2)</a> <br />This article is a continuation of Arduino hardware part 1 that talks about Arduino Board, COMMUNICATION CABLE (Serial / USB), Arduino power supply, PC / LAPTOP +-USB Serial Adapter.  In this section we will discuss more  about Arduino Hardware : With what Arduino elements can interact?, Arduino Prototyping, etc. The Arduino ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/arduino-uno-schematic-board-software-tutorial.html" rel="bookmark">Arduino UNO Schematic, Board, Software and Tutorial</a> <br />Here the Arduino UNO Schematic, Board, Software and Tutorial... Arduino is already widely used for robotics applications, so i think you need to learn about Arduino.. :) Arduino UNO Board: Arduino UNO Schematic: &nbsp; Adruino UNO Schematic and PCB Design Download: EAGLE files (rev2): arduino-uno-rev2-reference-design.zip Schematic (rev2): arduino-uno-rev2-schematic.pdf EAGLE files ...</div><br /></div>]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/arduino-tutorial-piezo-element-detect-vibration.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Robot Tutorial: DC Motor Control System</title>
		<link>http://robotechno.us/robot-tutorial-dc-motor-control-system.html</link>
		<comments>http://robotechno.us/robot-tutorial-dc-motor-control-system.html#comments</comments>
		<pubDate>Sun, 16 Oct 2011 22:57:20 +0000</pubDate>
		<dc:creator>Robot Technology</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Robotics Tutorial]]></category>
		<category><![CDATA[dc motor control]]></category>
		<category><![CDATA[PID calculation]]></category>
		<category><![CDATA[PID Closed loop control system]]></category>
		<category><![CDATA[PID control system diagram]]></category>
		<category><![CDATA[PID implementation]]></category>
		<category><![CDATA[PID tuning]]></category>
		<category><![CDATA[robot control system tutorial]]></category>

		<guid isPermaLink="false">http://robotechno.us/?p=1193</guid>
		<description><![CDATA[This is the tutorial of DC motor control system for robot application. The tutorial provided in powerpoint presentation sheet which is converted in PDF file. The tutorial contains information about motor control system especially for PID Closed loop control system: PID control system diagram, PID implementation, PID calculation, PID tuning and more. You will also [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://robotechno.us/robot-tutorial-dc-motor-control-system.html/h-bridge-motor-driver-circuit" rel="attachment wp-att-1194"><img class="aligncenter size-medium wp-image-1194" title="H-bridge motor driver circuit" src="http://robotechno.us/wp-content/uploads/2011/10/H-bridge-motor-driver-circuit-300x195.jpg" alt="H bridge motor driver circuit 300x195 Robot Tutorial: DC Motor Control System" width="300" height="195" /></a><a href="http://robotechno.us/robot-tutorial-dc-motor-control-system.html/h-bridge-motor-driver-circuit" rel="attachment wp-att-1194"><br />
</a></p>
<p>This is the tutorial of DC motor control system for robot application. The tutorial provided in powerpoint presentation sheet which is converted in PDF file. The tutorial contains information about motor control system especially for PID Closed loop control system: PID control system diagram, PID implementation, PID calculation, PID tuning and more.</p>
<p><span id="more-1193"></span>You will also find the sample of simple PWM circuit, H-Bridge motor driver circuit and Optical encoder circuit in the document provided.</p>
<p>This Robot Tutorial of DC Motor Control System can be accessed at <strong><a target="_blank" title="robot tutorial: DC motor control system for robot application" href="http://www.dprg.org/tutorials/2003-10a/motorcontrol.pdf" rel="external nofollow" target="_blank">dprg.org</a></strong> or you can download the presentation file <strong><a target="_blank" title="robot tutorial: DC motor control system" href="http://downloads.computerhowto.us/dll/3n5zyd" rel="external nofollow" target="_blank">here</a></strong></p>
<div id="seo_alrp_related"><div class="seo_alrp_rl_content"><a href="http://robotechno.us/video-controlling-dc-motor-computer.html" rel="bookmark">Video: Controlling a DC Motor from Computer</a> <br />This is a video tutorial of the basic concept on how to control a DC motor from ordinary personal computer. By using a few widely available modular components, you can create a flexible system that can be used to control a DC motor. Start by selecting a DC motor that ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/pic16f877a-tutorial.html" rel="bookmark">PIC16F877A Tutorial</a> <br />This PIC16F877A tutorial document was written Lukas Hoffmann. This tutorial containing the explanation about microcontroller PIC16F877A and the sample code using C/C++ programming language. There are some simple interesting project in this tutorial such as how to make blinking LED, how to display message on computer screen, how to drive ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/line-follower-tutorial-based-atmega16-l298-motor-driver.html" rel="bookmark">Line Follower Tutorial based on ATMega16 + L298 Motor Driver</a> <br />Here the another Line Follower robot tutorial... The diagram is quite simple and easy to build, easy to understand. The robot mechanical design not included, you may create the shape and the mechanical design of your line follower robot by your self. Just use motor gear box which have high ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/2a-dc-motor-controller-l298n.html" rel="bookmark">2A DC Motor Controller with L298N</a> <br />I've once use L298N for my line follower robot. This is cheap and able to control motor which need quite electric current to run. I recommend this driver IC for your robot... :) Download the schematics an tutorial here</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/line-follower-robot-tutorial.html" rel="bookmark">Line Follower Robot Tutorial</a> <br />Line Follower ROBOT Plermjai Inchuay, plermjai@loxinfo.co.th Award winner from VingPeaw Competition 2543, the robot built with 2051, L293D, and four IR sensors. Simple circuit and platform, quick tracking and easy-understand program using C language. I designed my robot, which use two motors control rear wheels and the single front wheel ...</div><br /></div>]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/robot-tutorial-dc-motor-control-system.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a simple BEAM robot tutorial</title>
		<link>http://robotechno.us/create-simple-beam-robot-tutorial.html</link>
		<comments>http://robotechno.us/create-simple-beam-robot-tutorial.html#comments</comments>
		<pubDate>Sun, 28 Aug 2011 08:00:57 +0000</pubDate>
		<dc:creator>Robot Technology</dc:creator>
				<category><![CDATA[Robotics Tutorial]]></category>
		<category><![CDATA[BEAM robot tutorial]]></category>
		<category><![CDATA[beam robots]]></category>
		<category><![CDATA[Create a simple BEAM robot]]></category>
		<category><![CDATA[Create a simple robot]]></category>
		<category><![CDATA[robot scheme]]></category>
		<category><![CDATA[simple BEAM robot]]></category>

		<guid isPermaLink="false">http://robotechno.us/?p=1082</guid>
		<description><![CDATA[As you know, we will Create a simple robot that will go toward the light and stop if there is no light. This BEAM robot is very simple even a someone without knowledge of the BEAM robots can make it. Scheme to make the robot is described in many sites, but none of them are [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://robotechno.us/create-simple-beam-robot-tutorial.html/beam-robot-schematic" rel="attachment wp-att-1097"><img class="aligncenter size-medium wp-image-1097" title="BEAM Robot schematic" src="http://robotechno.us/wp-content/uploads/2011/08/BEAM-Robot-schematic-300x187.jpg" alt="BEAM Robot schematic 300x187 Create a simple BEAM robot tutorial" width="300" height="187" /></a>As you know, we will Create a simple robot that will go toward the light and stop if there is no light. This BEAM robot is very simple even a someone without knowledge of the BEAM robots can make it. Scheme to make the robot is described in many sites, but none of them are not written as an absolutely necessary to connect all the cables, circuits, motors and much more. Because not everyone when viewing the scheme, they will understand. So here will be also shown in the pictures.</p>
<p><span id="more-1082"></span>In this article I do not open anything new, I just took the robot scheme, as described on many sites but all the actions I take pictures.</p>
<p><strong>Step 1</strong></p>
<p>So &#8230; our job is to make BEAM-robot. What do we need?</p>
<ul>
<li>L293D (engine driver)</li>
<li>Resistor 100 ohms not less (I used 180 ohms)</li>
<li>Phototransistor</li>
</ul>
<p>These are the basic details that we need. But we also need a robot chassis, power supply, motor and wheels.</p>
<p>I did not want to reinvent the wheel, and therefore took the body from old toys, two electric motors and 203:1 tracked chassis. And this is the design.<br />
<a href="http://robotechno.us/create-simple-beam-robot-tutorial.html/beam-robot-body" rel="attachment wp-att-1096"><img class="aligncenter size-medium wp-image-1096" title="BEAM robot body" src="http://robotechno.us/wp-content/uploads/2011/08/BEAM-robot-body-300x232.jpg" alt="BEAM robot body 300x232 Create a simple BEAM robot tutorial" width="300" height="232" /></a><br />
But I do not think you have the same toy. Therefore, an alternative would be a case of &#8230; wood. Yes &#8211; made of wood. Do not worry. Of course, you can do and made of plastic, but not everyone has it. But the tree can be found everywhere.<br />
<a href="http://robotechno.us/create-simple-beam-robot-tutorial.html/beam-robot-body-size" rel="attachment wp-att-1095"><img class="aligncenter size-medium wp-image-1095" title="BEAM robot size" src="http://robotechno.us/wp-content/uploads/2011/08/BEAM-robot-body-size-300x176.jpg" alt="BEAM robot body size 300x176 Create a simple BEAM robot tutorial" width="300" height="176" /></a><br />
Housing our BEAM robot will consist of a rectangle with sides of 100 mm by 60 mm (width may be greater if you use large electric motors).</p>
<p><strong>Step 2</strong></p>
<p>Well &#8230; you have made the case and now you can start soldering.</p>
<p>I&#8217;m not going to talk about all sorts of options L293D: this you can read on other sites. I&#8217;ll show you the photos, which you clearly see what and where to connect.</p>
<p>To begin with we take L293D and unbend inputs and outputs.<br />
<a href="http://robotechno.us/create-simple-beam-robot-tutorial.html/l293d-motor-driver-pin" rel="attachment wp-att-1094"><img class="aligncenter size-medium wp-image-1094" title="L293D pin" src="http://robotechno.us/wp-content/uploads/2011/08/L293D-motor-driver-pin-151x300.jpg" alt="L293D motor driver pin 151x300 Create a simple BEAM robot tutorial" width="151" height="300" /></a><br />
<strong>Step 3</strong></p>
<p>The two electric motors solder the four wires.<br />
<a href="http://robotechno.us/create-simple-beam-robot-tutorial.html/electric-motor" rel="attachment wp-att-1093"><img class="aligncenter size-medium wp-image-1093" title="Electric motor" src="http://robotechno.us/wp-content/uploads/2011/08/electric-motor-226x300.jpg" alt="electric motor 226x300 Create a simple BEAM robot tutorial" width="226" height="300" /></a><br />
<strong>Step 4</strong></p>
<p>Take the battery holder and solder two wires to negative.<br />
<a href="http://robotechno.us/create-simple-beam-robot-tutorial.html/battery-holder" rel="attachment wp-att-1092"><img class="aligncenter size-medium wp-image-1092" title="Battery holder" src="http://robotechno.us/wp-content/uploads/2011/08/battery-holder-259x300.jpg" alt="battery holder 259x300 Create a simple BEAM robot tutorial" width="259" height="300" /></a><br />
<strong>Step 5</strong></p>
<p>Now take five wires, and connect them like this.<br />
<a href="http://robotechno.us/create-simple-beam-robot-tutorial.html/connect-wire" rel="attachment wp-att-1091"><img class="aligncenter size-full wp-image-1091" title="Wire connection" src="http://robotechno.us/wp-content/uploads/2011/08/connect-wire.jpg" alt="connect wire Create a simple BEAM robot tutorial" width="279" height="226" /></a><br />
Now we connect to this construction, the resistor and phototransistor. It is very important to solder the resistor on the phototransistor shorter legs, and solder the blue wire to the other one.<br />
<a href="http://robotechno.us/create-simple-beam-robot-tutorial.html/phototransistor-connection" rel="attachment wp-att-1090"><img class="aligncenter size-medium wp-image-1090" title="Phototransistor connection" src="http://robotechno.us/wp-content/uploads/2011/08/phototransistor-connection-300x185.jpg" alt="phototransistor connection 300x185 Create a simple BEAM robot tutorial" width="300" height="185" /></a><br />
<strong>Step 6</strong></p>
<p>Now we&#8217;ll all be connected to the motor driver.<br />
For a start &#8211; four wires to ENABLE1 and Vss, Vs and ENABLE2.<br />
<a href="http://robotechno.us/create-simple-beam-robot-tutorial.html/motor-driver-connection" rel="attachment wp-att-1089"><img class="aligncenter size-medium wp-image-1089" title="Motor driver connection" src="http://robotechno.us/wp-content/uploads/2011/08/motor-driver-connection-300x197.jpg" alt="motor driver connection 300x197 Create a simple BEAM robot tutorial" width="300" height="197" /></a><br />
Now connecting to the phototransistors INPUT 1 and INPUT4.<br />
<a href="http://robotechno.us/create-simple-beam-robot-tutorial.html/motor-driver-connection-1" rel="attachment wp-att-1088"><img class="aligncenter size-medium wp-image-1088" title="Motor driver connection 2" src="http://robotechno.us/wp-content/uploads/2011/08/motor-driver-connection-1-293x300.jpg" alt="motor driver connection 1 293x300 Create a simple BEAM robot tutorial" width="293" height="300" /></a><br />
<strong>Step 7</strong><br />
<a href="http://robotechno.us/create-simple-beam-robot-tutorial.html/connect-electric-motor" rel="attachment wp-att-1087"><img class="aligncenter size-medium wp-image-1087" title="Connect electric motor" src="http://robotechno.us/wp-content/uploads/2011/08/connect-electric-motor-300x228.jpg" alt="connect electric motor 300x228 Create a simple BEAM robot tutorial" width="300" height="228" /></a><br />
And now we join the resulting design with two engines.<br />
In the figure: the upper motor and solder to OUTPUT1 OUTPUT2, and the lower to OUTPUT4 and OUTPUT3.</p>
<p><strong>Step 8</strong></p>
<p>That&#8217;s almost all: you only connect it all with the power supply. I used three AA batteries at 1.5 V.</p>
<p><a href="http://robotechno.us/create-simple-beam-robot-tutorial.html/beam-robot-end" rel="attachment wp-att-1086"><img class="aligncenter size-medium wp-image-1086" title="BEAM robot" src="http://robotechno.us/wp-content/uploads/2011/08/beam-robot-end-300x194.jpg" alt="beam robot end 300x194 Create a simple BEAM robot tutorial" width="300" height="194" /></a><br />
First connect the negative (black wire that is connected to two blue &#8211; GND and GND, GND and GND)<br />
<a href="http://robotechno.us/create-simple-beam-robot-tutorial.html/gnd-ic" rel="attachment wp-att-1085"><img class="aligncenter size-full wp-image-1085" title="ic pin connection" src="http://robotechno.us/wp-content/uploads/2011/08/gnd-ic-.jpg" alt="gnd ic  Create a simple BEAM robot tutorial" width="221" height="231" /></a><br />
Well, the red wire (positive) &#8211; the holder of the batteries by the end of the left resistor.<br />
<a href="http://robotechno.us/create-simple-beam-robot-tutorial.html/beam-robot-switch" rel="attachment wp-att-1084"><img class="aligncenter size-medium wp-image-1084" title="BEAM robot switch" src="http://robotechno.us/wp-content/uploads/2011/08/BEAM-robot-switch-300x181.jpg" alt="BEAM robot switch 300x181 Create a simple BEAM robot tutorial" width="300" height="181" /></a><br />
As you can see, I soldered the red wire not directly to the resistor, but through the switch.</p>
<p>Here we are with you and have a simple BEAM robot that reacts to light rays.</p>
<div id="seo_alrp_related"><div class="seo_alrp_rl_content"><a href="http://robotechno.us/create-robot-paper-clips.html" rel="bookmark">How to create a robot with some paper clips.</a> <br />This robot is very simple and can be built with several components that can be found around your home. Maybe the only component that you buy is 2 pieces of SPDT switch. To make this robot you can start by collecting the components as below: 1. two motor at 1.5 ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/l293d-motor-driver.html" rel="bookmark">L293D Motor Driver</a> <br />To control the robot's motors need a device that would have transformed the control signals of low power in the currents that are sufficient to control the motors. Such a device called the motor driver . There are many various schemes for motor control. They differ in how capacity and ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/avr-gcc-microcontrollers-port-management-part-2.html" rel="bookmark">AVR GCC : Microcontrollers Port Management (Part 2 end)</a> <br />A continuation of the article AVR GCC : Microcontrollers Port Management (Part 1). &gt;&gt;Once the data transfer direction for the port is configured, you can set the port value to be stored in the appropriate register PORTx. PORTx - register the port, where x is the port name. If the output is ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/robot-step-step-robot-tutorial.html" rel="bookmark">Make a Robot : A Step by Step Robot Tutorial</a> <br />This tutorial will show you how to make a robot easily. It's very simple tutorial and of course it will be a low cost robot. You will get the knowledge about basic and simple mechanic design, simple robot schematic diagram, line following sensor, programming and more... This is a very ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/beam-robot-types.html" rel="bookmark">BEAM robot types</a> <br />Here are some examples of the type of BEAM robots : Solaroller - a small robot on wheels that moves through the energy produced by solar batteries. The functioning of the robot consists of two phases: phase accumulation of energy in a capacitor and a phase when the capacitor is rapidly discharged into the ...</div><br /></div>]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/create-simple-beam-robot-tutorial.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Robotic voice generator</title>
		<link>http://robotechno.us/robotic-voice-generator.html</link>
		<comments>http://robotechno.us/robotic-voice-generator.html#comments</comments>
		<pubDate>Tue, 23 Aug 2011 14:54:54 +0000</pubDate>
		<dc:creator>Robot Technology</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Robotics Articles]]></category>
		<category><![CDATA[ISD2500]]></category>
		<category><![CDATA[Robotic voice generator]]></category>
		<category><![CDATA[Robotic voice generator schematic]]></category>
		<category><![CDATA[voice generator for robot]]></category>

		<guid isPermaLink="false">http://robotechno.us/?p=1077</guid>
		<description><![CDATA[Robotic voice generator does not need the variety of complex chips. You can assemble using only ISD2500 ChipCorder® family and few components.The family of chip-coders ISD2500 firm Winbond contains almost everything you need to record and play back voice messages. As chips have mic preamps with AGC, working with the cheapest electret microphones, the output [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://robotechno.us/robotic-voice-generator.html/voice-generator-scheme" rel="attachment wp-att-1078"><img class="aligncenter size-medium wp-image-1078" title="Voice generator scheme" src="http://robotechno.us/wp-content/uploads/2011/08/voice-generator-scheme-238x300.jpg" alt="voice generator scheme 238x300 Robotic voice generator" width="238" height="300" /></a></p>
<p>Robotic voice generator does not need the variety of complex chips. You can assemble using only ISD2500 ChipCorder® family and few components.The family of chip-coders ISD2500 firm Winbond contains almost everything you need to record and play back voice messages. As chips have mic preamps with AGC, working with the cheapest electret microphones, the output amplifier that runs on the speaker, memory, oscillator, ADC and DAC.</p>
<p><span id="more-1077"></span>In a family of four basic models: 2560, 2575, 2590 and 25 120. The number following the numerals 25 denotes a maximum recording time in seconds. The amount of memory chips all the same, and long duration recording is achieved by a lower sampling rate. Ie, the chip with the lowest recording time provides the best sound quality.</p>
<p><strong>Steps to follow when writing</strong></p>
<p>First of all, set switch S3 to the recording mode (low level at pin 27). When you press S2 recording mode, which will end after pressing S2. With the third click again to start recording, etc. So you can continue for as long as the record will be nothing, or until the LED D2, indicating that the memory is full.</p>
<p><strong>Steps to follow when playing</strong></p>
<p>Playback can be started immediately, including the S1 and S3 in the switching mode &#8220;play&#8221;. Now, with every touch of S2, will consistently play the recorded messages. To record a new message over the old, turn S1, S3 switched to &#8220;record&#8221;, and pressing the S2, start recording again.</p>
<p>Some flexibility in the organization of the play mode allows you to connect together fragments of messages. Each piece ends with the flag of EOM (End Of Message &#8211; End of Posts), which is stored in the memory chip. So, instead of storing entire phrases, such as the &#8220;obstacle in front,&#8221; is much more efficient to keep an &#8220;obstacle&#8221;, &#8220;front&#8221;, &#8220;right&#8221;, &#8220;left&#8221;, &#8220;rear&#8221;. Similarly, for the numbers: from individual elements of the &#8220;one&#8221; &#8220;two&#8221;, &#8220;hundred&#8221;, &#8220;point&#8221;, etc. You can collect any number.</p>
<p>The Robotic voice generator scheme, managed by a microcontroller, is shown in the figure. Signals A0, PD, / CE and / EOM connected to a microcontroller that controls the robot.</p>
<p>To play you must first set to &#8220;0&#8243; signal PD. To play the first message, the input / CE must submit a negative pulse. If this level of input A0 &#8220;0&#8243;, the playback will occur at normal speed, and if &#8220;1&#8243; &#8211; a rate 800 times greater &#8211; a sort of &#8220;fast forward&#8221;. If you want after the first report was made, for example, the third, the microcontroller must set the &#8220;1&#8243; to A0 and submit a negative pulse / CE, to &#8220;squander&#8221; the second message with great speed. Then, after waiting for the installation of the flag / EOM at a low level, A0 must be reset to &#8220;0&#8243; and pulse / CE start playing the third message.</p>
<p>Due to the fact that the pulse duration / EOM may be less than 10 ms, it is better to use it to interrupt the processor, but do not check status / EOM interviews.</p>
<div id="seo_alrp_related"><div class="seo_alrp_rl_content"><a href="http://robotechno.us/avr-gcc-microcontrollers-port-management-part-2.html" rel="bookmark">AVR GCC : Microcontrollers Port Management (Part 2 end)</a> <br />A continuation of the article AVR GCC : Microcontrollers Port Management (Part 1). &gt;&gt;Once the data transfer direction for the port is configured, you can set the port value to be stored in the appropriate register PORTx. PORTx - register the port, where x is the port name. If the output is ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/dc-motor-speed-regulation-with-a-pwm-feed-back-system.html" rel="bookmark">DC Motor Speed Regulation with A PWM Feed Back System</a> <br />This tutorial will helps you how the PWM works. You will learn what is PWM, the usage of PWM also how to program a DC Motor with PWM. Some Robots need to control the motor speed for its to work. Just use PWM system and you will get your motor's ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/voltage-comparator.html" rel="bookmark">Voltage Comparator</a> <br />In electronics, a comparator is a device which compares two voltages or currents and switches its output to indicate which is larger. More generally, the term is also used to refer to a device that compares two items of data. Output voltage will "switch" whenever the input voltage (at the ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/motor-driver-chip-l293d-2.html" rel="bookmark">Motor Driver on the chip L293D</a> <br />Designed for small wheeled robots, the driver is ideal for robotic classes Mini-bag, following the lineand the labyrinth of disciplines. The driver is based on the chip L293D. For the driver, you can connect two motors. The driver can operate in two modes: Mode A - always served drove a ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/l293d-motor-driver.html" rel="bookmark">L293D Motor Driver</a> <br />To control the robot's motors need a device that would have transformed the control signals of low power in the currents that are sufficient to control the motors. Such a device called the motor driver . There are many various schemes for motor control. They differ in how capacity and ...</div><br /></div>]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/robotic-voice-generator.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Robot Platform for crawlers</title>
		<link>http://robotechno.us/robot-platform-crawlers.html</link>
		<comments>http://robotechno.us/robot-platform-crawlers.html#comments</comments>
		<pubDate>Thu, 18 Aug 2011 04:35:10 +0000</pubDate>
		<dc:creator>Robot Technology</dc:creator>
				<category><![CDATA[Robotics Articles]]></category>
		<category><![CDATA[Robotics Tutorial]]></category>
		<category><![CDATA[crawler robot]]></category>
		<category><![CDATA[robot case]]></category>
		<category><![CDATA[robot crawler platform]]></category>
		<category><![CDATA[robot housing]]></category>
		<category><![CDATA[robotic platform]]></category>

		<guid isPermaLink="false">http://robotechno.us/?p=1065</guid>
		<description><![CDATA[This time we will try to create a robotic platform for crawlers. Materials that we will use this time is PVC foam &#8211; sheets. This white plastic, sheet-shaped solid with the texture of the matt / doves on both surfaces. This material is very easy to cut, sawn, or drill. To build the platform, we [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://robotechno.us/robot-platform-crawlers.html/crawler-robot-paltform-1" rel="attachment wp-att-1066"><img class="aligncenter size-medium wp-image-1066" title="Crawler robot platform  1" src="http://robotechno.us/wp-content/uploads/2011/08/crawler-robot-paltform-1-300x216.jpg" alt="crawler robot paltform 1 300x216 Robot Platform for crawlers" width="300" height="216" /></a>This time we will try to create a robotic platform for crawlers. Materials that we will use this time is PVC foam &#8211; sheets. This white plastic, sheet-shaped solid with the texture of the matt / doves on both surfaces. This material is very easy to cut, sawn, or drill.<br />
<span id="more-1065"></span>To build the platform, we need to keep track of:</p>
<ul>
<li>ruler</li>
<li>marker</li>
<li>PVC foam</li>
<li>office knife</li>
<li>glue</li>
<li>A set of tracks Timiya</li>
<li>Twin-engine gearbox Timiya</li>
<li>Drill (3 mm) and then what are we going to drill holes</li>
</ul>
<p>All sizes shown in the picture. Plan without a cap, if desired can be done, as in the picture.</p>
<p><a href="http://robotechno.us/robot-platform-crawlers.html/crawler-robot-platform" rel="attachment wp-att-1067"><img class="aligncenter size-medium wp-image-1067" title="Crawler robot  platform size" src="http://robotechno.us/wp-content/uploads/2011/08/Crawler-robot-platform-300x229.jpg" alt="Crawler robot platform 300x229 Robot Platform for crawlers" width="300" height="229" /></a>Another view of Robot Platform for crawlers.</p>
<p><a href="http://robotechno.us/robot-platform-crawlers.html/robot-crawler-with-cap" rel="attachment wp-att-1068"><img class="aligncenter size-full wp-image-1068" title="Robot crawler with cap" src="http://robotechno.us/wp-content/uploads/2011/08/robot-crawler-with-cap.jpg" alt="robot crawler with cap Robot Platform for crawlers" width="300" height="225" /></a><a href="http://robotechno.us/robot-platform-crawlers.html/robot-crawler-platform-view" rel="attachment wp-att-1069"><img class="aligncenter size-medium wp-image-1069" title="Robot crawler platform top view" src="http://robotechno.us/wp-content/uploads/2011/08/robot-crawler-platform-view-300x112.jpg" alt="robot crawler platform view 300x112 Robot Platform for crawlers" width="300" height="112" /></a></p>
<div id="seo_alrp_related"><div class="seo_alrp_rl_content"><a href="http://robotechno.us/latest-robotics-release-by-microsoft.html" rel="bookmark">Latest robotics release by Microsoft</a> <br />Microsoft released the latest version of its robot-building platform for professionals and hobbyists of the Lego Mindstorms AlphaRex level. This robotics news come from cnet.com, said about Microsoft's latest robotics release... here the news: Microsoft released the latest revision of its robotics development software platform at the RoboDevelopment Conference and ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/explanation-arduino.html" rel="bookmark">Few explanation about the Arduino</a> <br />What is Arduino? Arduino is a tool for making computers that can sense and control the physical world through your computer. It is a development platform open-source physical computing, based on a simple microcontroller board and a development environment for creating software (programs) for the board. Arduino can use to ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/create-robot-paper-clips.html" rel="bookmark">How to create a robot with some paper clips.</a> <br />This robot is very simple and can be built with several components that can be found around your home. Maybe the only component that you buy is 2 pieces of SPDT switch. To make this robot you can start by collecting the components as below: 1. two motor at 1.5 ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/build-simple-robotic-arm.html" rel="bookmark">Build a Simple Robotic Arm</a> <br />This is a tutorial document about how to build an easy, cheap and simple robotic arm. The above robotic arm is really a lot of enjoyable to build and apply. It applies a first and 3rd class lever, and includes a fun linkage for the grabber. It can grab, pick ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/robot-operating-system-ros.html" rel="bookmark">Robot Operating System (ROS)</a> <br />ROS is a community effort, with many institutions contributing to its development. Much of the underlying platform is being developed by Willow Garage and Stanford. ROS is a robot operating system originally developed (2007) in the Stanford Artificial Intelligence Laboratory in support of the Stanford AI Robot (STAIR) project but ...</div><br /></div>]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/robot-platform-crawlers.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Motor Driver on the chip L293D</title>
		<link>http://robotechno.us/motor-driver-chip-l293d-2.html</link>
		<comments>http://robotechno.us/motor-driver-chip-l293d-2.html#comments</comments>
		<pubDate>Sun, 07 Aug 2011 08:08:01 +0000</pubDate>
		<dc:creator>Robot Technology</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[L293D]]></category>
		<category><![CDATA[motor]]></category>
		<category><![CDATA[motor controller]]></category>
		<category><![CDATA[motor driver ic]]></category>
		<category><![CDATA[motor driver pcb]]></category>
		<category><![CDATA[robot motor driver]]></category>

		<guid isPermaLink="false">http://robotechno.us/?p=1040</guid>
		<description><![CDATA[Designed for small wheeled robots, the driver is ideal for robotic classes Mini-bag, following the lineand the labyrinth of disciplines. The driver is based on the chip L293D. For the driver, you can connect two motors. The driver can operate in two modes: Mode A &#8211; always served drove a high level and, therefore, engines [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://robotechno.us/motor-driver-chip-l293d-2.html/driver-motors-on-the-chip-l293d" rel="attachment wp-att-1042"><img class="aligncenter size-full wp-image-1042" title="Driver motors on the chip L293D" src="../wp-content/uploads/2011/08/Driver-motors-on-the-chip-L293D.jpeg" alt=" Motor Driver on the chip L293D" width="279" height="245" /></a>Designed for small wheeled robots, the driver is ideal for robotic classes Mini-bag, following the lineand the labyrinth of disciplines. The driver is based on the chip L293D. For the driver, you can connect two motors. The driver can operate in two modes: Mode A &#8211; always served drove a high level and, therefore, engines will be spinning at maximum speed mode with a ringing in the pulse-width modulation (PWM), supplied with the controller, you can change the motor speed.</p>
<p><span id="more-1040"></span>Here is the pcb layout :<a href="http://robotechno.us/motor-driver-chip-l293d-2.html/motor-driver-l293d" rel="attachment wp-att-1041"><img class="aligncenter size-medium wp-image-1041" title="Motor Driver L293D PCB" src="../wp-content/uploads/2011/08/motor-driver-L293D-300x263.jpg" alt="motor driver L293D 300x263 Motor Driver on the chip L293D" width="300" height="263" /></a></p>
<p><strong>Details :</strong></p>
<p><span><span>L293D chip </span></span><br />
<span><span>socket for the chip to 16 feet </span></span><br />
<span><span>capacitor C6 to 1000 uF 25 volt </span></span><br />
<span><span>capacitors C1-C5 0.1 uF </span></span><br />
<span><span>Resistors R1-R6 100 ohm </span></span><br />
<span><span>resistors R7-R12 at 220 ohms </span></span></p>
<div id="seo_alrp_related"><div class="seo_alrp_rl_content"><a href="http://robotechno.us/l293d-motor-driver.html" rel="bookmark">L293D Motor Driver</a> <br />To control the robot's motors need a device that would have transformed the control signals of low power in the currents that are sufficient to control the motors. Such a device called the motor driver . There are many various schemes for motor control. They differ in how capacity and ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/robot-tutorial-dc-motor-control-system.html" rel="bookmark">Robot Tutorial: DC Motor Control System</a> <br />This is the tutorial of DC motor control system for robot application. The tutorial provided in powerpoint presentation sheet which is converted in PDF file. The tutorial contains information about motor control system especially for PID Closed loop control system: PID control system diagram, PID implementation, PID calculation, PID tuning ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/create-simple-beam-robot-tutorial.html" rel="bookmark">Create a simple BEAM robot tutorial</a> <br />As you know, we will Create a simple robot that will go toward the light and stop if there is no light. This BEAM robot is very simple even a someone without knowledge of the BEAM robots can make it. Scheme to make the robot is described in many sites, ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/robotic-voice-generator.html" rel="bookmark">Robotic voice generator</a> <br />Robotic voice generator does not need the variety of complex chips. You can assemble using only ISD2500 ChipCorder® family and few components.The family of chip-coders ISD2500 firm Winbond contains almost everything you need to record and play back voice messages. As chips have mic preamps with AGC, working with the ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/line-follower-tutorial-based-atmega16-l298-motor-driver.html" rel="bookmark">Line Follower Tutorial based on ATMega16 + L298 Motor Driver</a> <br />Here the another Line Follower robot tutorial... The diagram is quite simple and easy to build, easy to understand. The robot mechanical design not included, you may create the shape and the mechanical design of your line follower robot by your self. Just use motor gear box which have high ...</div><br /></div>]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/motor-driver-chip-l293d-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AVR-GCC : CODE COMPLIANCE</title>
		<link>http://robotechno.us/avrgcc-code-compliance.html</link>
		<comments>http://robotechno.us/avrgcc-code-compliance.html#comments</comments>
		<pubDate>Wed, 27 Jul 2011 10:10:26 +0000</pubDate>
		<dc:creator>Robot Technology</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[AVR microcontrollers]]></category>
		<category><![CDATA[AVR-GCC]]></category>
		<category><![CDATA[programming AVR microcontrollers]]></category>
		<category><![CDATA[WinAVR patch]]></category>

		<guid isPermaLink="false">http://robotechno.us/?p=1027</guid>
		<description><![CDATA[On the Internet there are many examples of code for AVR-GCC , written using functions and macros that are no longer supported in newer versions of the compiler. To use these examples and understand them with the essence of the ports of the microcontroller, you need to rewrite code or use special macros. For starters, [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://robotechno.us/avrgcc-code-compliance.html/avr-gcc" rel="attachment wp-att-1028"><img class="size-full wp-image-1028 aligncenter" title="AVR-GCC" src="http://robotechno.us/wp-content/uploads/2011/07/AVR-GCC.jpg" alt="AVR GCC AVR GCC : CODE COMPLIANCE" width="296" height="206" /></a></p>
<p>On the Internet there are many examples of code for AVR-GCC , written using functions and macros that are no longer supported in newer versions of the compiler. To use these examples and understand them with the essence of the ports of the microcontroller, you need to rewrite code or use special macros.</p>
<p><span id="more-1027"></span>For starters, learn programming AVR microcontrollers, this approach can be difficult. As a result, many go to other compilers and never use a cult which has become for many a development environment WinAVR. Although there is a simple way to solve all the problems and return again rejected by the developers of the functions in AVR-GCC. You can use a specially crafted <a target="_blank" href="http://myfilehost.us/dll/mtrion" rel="nofollow" target="_blank">AVR-GCC myROBOT PATCH for WinAVR</a> .</p>
<p>Before we proceed to the description of the patch, let&#8217;s see what kind of function it returns. The latest versions of libraries avr-libc, which is part of the compiler AVR-GCC, uses a WinAVR, more functions are not supported inp , outp , sbi and CBI . Made it to the best interpretation of the source code when it is compiled and determine how to handle the port &#8211; how to register or to memory. Support for these functions is not starting from WinAVR-20050214 version. This includes no support for such a popular and convenient for many of the former bit_is_set and bit_is_clear .</p>
<p>Of course, nobody calls using only the &#8220;old&#8221; functions return the patch is backward-compatible programs on the AVR -GCC. Using the patch, you will not lose the ability to work with the new notation, and only return the use of excluded functions. For example, checking the work of any one found on the Internet example, you can practice by rewriting it with the new syntax.<br />
In conclusion, let us consider some examples of possible replacements.</p>
<table width="100%" border="1" cellspacing="0" cellpadding="5">
<tbody>
<tr bgcolor="#ececf0">
<td align="center"><strong><span><span>&#8220;Old&#8221; notation</span></span></strong></td>
<td align="center"><strong><span><span>possible replacement</span></span></strong></td>
<td align="center"><strong><span><span>an action to perform</span></span></strong></td>
</tr>
<tr>
<td><kbd><span><span>outp (0xff, DDRB);</span></span></kbd></td>
<td><kbd><span><span>DDRB = 0xff;</span></span></kbd></td>
<td><kbd><span><span>all port pins configured as outputs B</span></span></kbd></td>
</tr>
<tr>
<td><kbd><span><span>outp (0xff, PORTB);</span></span></kbd></td>
<td><kbd><span><span>PORTB = 0xff;</span></span></kbd></td>
<td><kbd><span><span>all bits of Port B set to "1"</span></span></kbd></td>
</tr>
<tr>
<td><kbd><span><span>sbi (DDRB, DDB2);</span></span></kbd></td>
<td><kbd><span><span>DDRB | = 1 &lt;&lt;2;</span></span></kbd></td>
<td><kbd><span><span>configure the line 2 port B as output</span></span></kbd></td>
</tr>
<tr>
<td><kbd><span><span>cbi (DDRB, DDB2);</span></span></kbd></td>
<td><kbd><span><span>DDRB &amp; = ~ (1 &lt;&lt;2);</span></span></kbd></td>
<td><kbd><span><span>configure the line 2 port B as input</span></span></kbd></td>
</tr>
<tr>
<td><kbd><span><span>sbi (PORTB, PB2);</span></span></kbd></td>
<td><kbd><span><span>PORTB | = _BV (PB2); </span></span><br />
<span><span>or simply </span></span><br />
<span><span>PORTB | = 1 </span></span><kbd><span><span>&lt;&lt;</span></span></kbd><span><span> 2; </span></span><br />
<span><span>possible so </span></span><br />
<span><span>PORTB | = 1 </span></span><kbd><span><span>&lt;&lt;</span></span></kbd><span><span> PINB2;</span></span></kbd></td>
<td><kbd><span><span>set to "1" on line 2 </span></span><br />
<span><span>port B</span></span></kbd></td>
</tr>
<tr>
<td><kbd><span><span>cbi (PORTB, PB2);</span></span></kbd></td>
<td><kbd><span><span>PORTB &amp; = ~ _BV (PB2); </span></span><br />
<span><span>or simply </span></span><br />
<span><span>PORTB &amp; = ~ (1 &lt;&lt;2), </span></span><br />
<span><span>possibly because </span></span><br />
<span><span>PORTB &amp; = ~ 1 </span></span><kbd><span><span>&lt;&lt;</span></span></kbd><span><span> PINB2;</span></span></kbd></td>
<td><kbd><span><span>set to "0" on Line 2 </span></span><br />
<span><span>port B</span></span></kbd></td>
</tr>
<tr>
<td><kbd><span><span>if (bit_is_set (PIND, 3)) </span></span><br />
<span><span>{ </span></span><br />
<span><span>... </span></span><br />
<span><span>}</span></span></kbd></td>
<td><kbd><span><span>if (PIND &amp; (1 </span></span><kbd><span><span>&lt;&lt;</span></span></kbd><span><span> PIND3)) </span></span><br />
<span><span>{ </span></span><br />
<span><span>... </span></span><br />
<span><span>}</span></span></kbd></td>
<td><kbd><span><span>check "1" on line 3 of port D</span></span></kbd></td>
</tr>
<tr>
<td><kbd><span><span>if (bit_is_clear (PIND, 3)) </span></span><br />
<span><span>{ </span></span><br />
<span><span>... </span></span><br />
<span><span>}</span></span></kbd></td>
<td><kbd><span><span>if (! (PIND &amp; (1 </span></span><kbd><span><span>&lt;&lt;</span></span></kbd><span><span> PIND3))) </span></span><br />
<span><span>{ </span></span><br />
<span><span>... </span></span><br />
<span><span>}</span></span></kbd></td>
<td><kbd><span><span>check the "0" on line 3 of port D</span></span></kbd></td>
</tr>
</tbody>
</table>
<p>Please note that _BV () is preferable because in this case, the compiler performs a bitwise shift and inserts the result in the compiled code. This ensures that no time spent during direct execution of code in the microcontroller.<br />
As you can see, the possibilities of syntax in the AVR-GCC wide enough to consider him one of the most convenient and flexible means of programming microcontrollers Atmel AVR.</p>
<div id="seo_alrp_related"><div class="seo_alrp_rl_content"><a href="http://robotechno.us/avr-gcc-microcontrollers-port-management-2.html" rel="bookmark">AVR GCC : Microcontrollers Port Management (Part 1)</a> <br />Management of the ports in the AVR GCC. Registers and DDRx PORTx. FSE. Bitwise operations. The function of delay. Unconditional jump in the program. Ports of the microcontroller - this I / O devices, allowing the microcontroller to send or receive data. The default port of the AVR microcontroller has ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/avr-gcc-microcontrollers-port-management-part-2.html" rel="bookmark">AVR GCC : Microcontrollers Port Management (Part 2 end)</a> <br />A continuation of the article AVR GCC : Microcontrollers Port Management (Part 1). &gt;&gt;Once the data transfer direction for the port is configured, you can set the port value to be stored in the appropriate register PORTx. PORTx - register the port, where x is the port name. If the output is ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/the-atmel-avr-and-its-development-hardware-up-close.html" rel="bookmark">The Atmel AVR and its Development Hardware Up Close</a> <br />The AVR series consists of a fairly broad range of hybrid-bit-width microcontrollers (nominally 16-bit code word, 8-bit data bus and ALU) sharing a common instruction set and differing primarily in the on-chip peripherals and package options. These devices donÃ¢â‚¬â„¢t show a clear genealogical relationship to any other microcontroller core IÃ¢â‚¬â„¢m ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/book-c-programming-for-avr-microcontrollers.html" rel="bookmark">Book: C Programming for AVR Microcontrollers</a> <br />This can be used as reference book for  AVR microcontroller programming. As we know, AVR family is cheap, easy and the most used microcontroller in Robotics. By the time you complete the text and projects you will: • Have an intermediate understanding of the C programming language. • Have a ...</div><br /><div class="seo_alrp_rl_content"><a href="http://robotechno.us/nanovm-java-wirtual-machine-atmel-avr-atmega8atmega832.html" rel="bookmark">NanoVM: Java Wirtual Machine for Atmel AVR ATmega8/ATmega832</a> <br />Java programming for microcontroller chips, With the NanoVM, the microcontroller can be programmed in the popular Java language using the standard Sun JDK. NanoVM is a open-source implementation of the Java virtual machine. The NanoVM was initially developed to run on the Atmel AVR ATmega8 utilized in the Asuro Robot. ...</div><br /></div>]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/avrgcc-code-compliance.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

