<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="sk">
	<id>https://senzor.robotika.sk/sensorwiki/index.php?action=history&amp;feed=atom&amp;title=Program_AVR03</id>
	<title>Program AVR03 - História úprav</title>
	<link rel="self" type="application/atom+xml" href="https://senzor.robotika.sk/sensorwiki/index.php?action=history&amp;feed=atom&amp;title=Program_AVR03"/>
	<link rel="alternate" type="text/html" href="https://senzor.robotika.sk/sensorwiki/index.php?title=Program_AVR03&amp;action=history"/>
	<updated>2026-05-19T22:18:44Z</updated>
	<subtitle>História úprav pre túto stránku na wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://senzor.robotika.sk/sensorwiki/index.php?title=Program_AVR03&amp;diff=211&amp;oldid=prev</id>
		<title>Balogh na 21:49, 6. november 2008</title>
		<link rel="alternate" type="text/html" href="https://senzor.robotika.sk/sensorwiki/index.php?title=Program_AVR03&amp;diff=211&amp;oldid=prev"/>
		<updated>2008-11-06T21:49:08Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;sk&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Staršia verzia&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Verzia z 21:49, 6. november 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l110&quot;&gt;Riadok 110:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Riadok 110:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:AVR&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;,CADRS&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:AVR&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]][[Category:CAD_RS&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Balogh</name></author>
	</entry>
	<entry>
		<id>https://senzor.robotika.sk/sensorwiki/index.php?title=Program_AVR03&amp;diff=210&amp;oldid=prev</id>
		<title>Balogh na 21:47, 6. november 2008</title>
		<link rel="alternate" type="text/html" href="https://senzor.robotika.sk/sensorwiki/index.php?title=Program_AVR03&amp;diff=210&amp;oldid=prev"/>
		<updated>2008-11-06T21:47:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;sk&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Staršia verzia&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Verzia z 21:47, 6. november 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l109&quot;&gt;Riadok 109:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Riadok 109:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:AVR,CADRS]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Balogh</name></author>
	</entry>
	<entry>
		<id>https://senzor.robotika.sk/sensorwiki/index.php?title=Program_AVR03&amp;diff=166&amp;oldid=prev</id>
		<title>Balogh: Nová stránka: &lt;source lang=&quot;c&quot;&gt; //***************************************************************************** // File Name	: basiciotest.c //  // Title		: example usage of basic input and output...</title>
		<link rel="alternate" type="text/html" href="https://senzor.robotika.sk/sensorwiki/index.php?title=Program_AVR03&amp;diff=166&amp;oldid=prev"/>
		<updated>2008-11-05T11:03:09Z</updated>

		<summary type="html">&lt;p&gt;Nová stránka: &amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt; //***************************************************************************** // File Name	: basiciotest.c //  // Title		: example usage of basic input and output...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nová stránka&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
//*****************************************************************************&lt;br /&gt;
// File Name	: basiciotest.c&lt;br /&gt;
// &lt;br /&gt;
// Title		: example usage of basic input and output functions on the AVR&lt;br /&gt;
// Revision		: 1.0&lt;br /&gt;
// Notes		:&lt;br /&gt;
// Target MCU	: Atmel AVR series&lt;br /&gt;
// Editor Tabs	: 4&lt;br /&gt;
// &lt;br /&gt;
// Revision History:&lt;br /&gt;
// When			Who			Description of change&lt;br /&gt;
// -----------	-----------	-----------------------&lt;br /&gt;
// 18-Nov-2005	balogh		Created the program&lt;br /&gt;
//*****************************************************************************&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
//----- Include Files ---------------------------------------------------------&lt;br /&gt;
#include &amp;lt;avr/io.h&amp;gt;		      // include I/O definitions (port names, pin names, etc)&lt;br /&gt;
#include &amp;lt;avr/signal.h&amp;gt;	      // include &amp;quot;signal&amp;quot; names (interrupt names)&lt;br /&gt;
#include &amp;lt;avr/interrupt.h&amp;gt;	  // include interrupt support&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;global.h&amp;quot;		      // include our global settings&lt;br /&gt;
&lt;br /&gt;
#define LED1	PINB0	      // .equ 	LED1 	=PINB0&lt;br /&gt;
#define LED2	PINB1	      // .equ 	LED2 	=PINB1&lt;br /&gt;
&lt;br /&gt;
// PINB0 je v atmega16.h je zadefinovany ako cislo  0&lt;br /&gt;
// Takze ma zmysel 	 sbi(PORTB,LED0);&lt;br /&gt;
&lt;br /&gt;
// Naopak, toto nema zmysel, dosadi sa 3.&lt;br /&gt;
// #define SW1 	PINB3	&lt;br /&gt;
// Spravne ma byt:&lt;br /&gt;
#define SW1 	 bit_is_clear(PINB, 3)  // .equ	SW1	=PINB3	&lt;br /&gt;
#define SW2 	 bit_is_clear(PINB, 4)  // .equ	SW2	=PINB4	&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//----- Zaciatok programu ------------------------------------------------------------&lt;br /&gt;
int main(void)&lt;br /&gt;
{&lt;br /&gt;
	// All AVR processors have I/O ports which each contain up to 8&lt;br /&gt;
	// user-controllable pins.  From a hardware perspective, these I/O pins&lt;br /&gt;
	// are each an actual physical pin coming out of the processor chip.&lt;br /&gt;
	// The voltage on the pins can be sensed or controlled via software,&lt;br /&gt;
	// hence their designation as Input/Output pins.&lt;br /&gt;
&lt;br /&gt;
	// While I/O pins are actual wires in the real world, they also exist&lt;br /&gt;
	// inside the processor as special memory locations called registers.&lt;br /&gt;
	// The software-controlled contents of these registers is what&lt;br /&gt;
	// determines the state and operation of I/O pins and I/O ports.&lt;br /&gt;
&lt;br /&gt;
	// Since AVR processors deal naturally with 8 bits at a time, I/O pins&lt;br /&gt;
	// are grouped into sets of 8 to form I/O ports.  Three registers&lt;br /&gt;
	// are assigned to each I/O port to control the function and state of&lt;br /&gt;
	// that port&amp;#039;s pins.  The registers are 8-bits wide, and each bit (#0-7)&lt;br /&gt;
	// determines the operation of the corresponding number pin (pin 0-7).&lt;br /&gt;
	// The three registers are:&lt;br /&gt;
&lt;br /&gt;
	// DDRx  - this register determines the direction (input/output) of the pins on port[x]&lt;br /&gt;
	//			A &amp;#039;0&amp;#039; bit in the DDR makes that port pin act as input&lt;br /&gt;
	//			A &amp;#039;1&amp;#039; bit in the DDR makes that port pin act as output&lt;br /&gt;
&lt;br /&gt;
	// PORTx - this register contains the output state of the pins on port[x]&lt;br /&gt;
	//			A &amp;#039;0&amp;#039; bit makes the port pin output a LOW  (~0V)&lt;br /&gt;
	//			A &amp;#039;1&amp;#039; bit makes the port pin output a HIGH (~5V)&lt;br /&gt;
&lt;br /&gt;
	// PINx  - this register contains the input state of the pins on port[x]&lt;br /&gt;
	//			A &amp;#039;0&amp;#039; bit indicates that the port pin is LOW  (at ~0V)&lt;br /&gt;
	//			A &amp;#039;1&amp;#039; bit indicates that the port pin is HIGH (at ~5V)&lt;br /&gt;
&lt;br /&gt;
	// The x should be replaced with A,B,C,D,E,F, or G depending on the&lt;br /&gt;
	// desired port.  Note that not all AVR processors have the same set&lt;br /&gt;
	// or number of ports.  Consult the datasheet for your specific processor&lt;br /&gt;
	// to find out which ports it has.&lt;br /&gt;
&lt;br /&gt;
	// in the AVR-GCC C language, ports can be accessed using two kinds of&lt;br /&gt;
	// commands:&lt;br /&gt;
	// inb() and outb()		-	in-byte and out-byte&lt;br /&gt;
	// cbi() and sbi()		-	clear-bit and set-bit&lt;br /&gt;
&lt;br /&gt;
	// inb() and outb() should be used when you intend to read or write&lt;br /&gt;
	// several bits of a register at once.  Here are some examples:&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
  unsigned char TMP;	               // .def 	TMP 	=r16&lt;br /&gt;
  // Vystup na port ma obratene poradie: outp(hodnota, port);&lt;br /&gt;
  // Pri pouziti AVRlib je mozne pouzit &amp;quot;logickejsiu&amp;quot; outb:&lt;br /&gt;
  // outb(DDRB, 0x18);	               // set some of port B pins to input&lt;br /&gt;
  // okrem toho v C sa neda pouzit binarna hodnota, len oct, dec a hex&lt;br /&gt;
  outb(DDRB,0x018);          // ldi TMP,0b00011000	;nastav vstupy a vystupy&lt;br /&gt;
							 // out DDRB,TMP&lt;br /&gt;
  outb(PORTB,0x0F0);		 //	ldi TMP,0x0F0		; zhasni LED&lt;br /&gt;
							 //	out PORTB,TMP		; zapis na port&lt;br /&gt;
&lt;br /&gt;
do					         // 	rjmp LOOP		; dokola&lt;br /&gt;
{						&lt;br /&gt;
  if (SW1)					// 	sbis	PINB,SW1	; obskoc ak je stlacene tlacitko&lt;br /&gt;
    {cbi(PORTB,LED1);		// 	rcall LED1_ON&lt;br /&gt;
	 sbi(PORTB,LED2);&lt;br /&gt;
	}&lt;br /&gt;
  if (SW2)					// 	sbis	PINB,SW2	; obskoc ak je stlacene tlacitko&lt;br /&gt;
    {&lt;br /&gt;
     cbi(PORTB,LED2);		// 	rcall LED2_ON&lt;br /&gt;
     sbi(PORTB,LED1);&lt;br /&gt;
	 }&lt;br /&gt;
} while (1);&lt;br /&gt;
	&lt;br /&gt;
	return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Balogh</name></author>
	</entry>
</feed>