<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="cs">
	<id>http://wiki.sps-pi.cz/index.php?action=history&amp;feed=atom&amp;title=Arduino_-_74HC595_2</id>
	<title>Arduino - 74HC595 2 - Historie editací</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.sps-pi.cz/index.php?action=history&amp;feed=atom&amp;title=Arduino_-_74HC595_2"/>
	<link rel="alternate" type="text/html" href="http://wiki.sps-pi.cz/index.php?title=Arduino_-_74HC595_2&amp;action=history"/>
	<updated>2026-05-16T07:14:20Z</updated>
	<subtitle>Historie editací této stránky</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.sps-pi.cz/index.php?title=Arduino_-_74HC595_2&amp;diff=14913&amp;oldid=prev</id>
		<title>JA: Založena nová stránka: &lt;source lang&quot;C&quot;&gt;  /* Using 2 7-segment displays with the 74HC595 shift registers CC by-sa-nc 3.0 http://tronixstuff.wordpress.com  */ int latchpin = 8; // connect to pin...</title>
		<link rel="alternate" type="text/html" href="http://wiki.sps-pi.cz/index.php?title=Arduino_-_74HC595_2&amp;diff=14913&amp;oldid=prev"/>
		<updated>2012-12-15T18:33:31Z</updated>

		<summary type="html">&lt;p&gt;Založena nová stránka: &amp;lt;source lang&amp;quot;C&amp;quot;&amp;gt;  &lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Using 2 7-segment displays with the 74HC595 shift registers CC by-sa-nc 3.0 http://tronixstuff.wordpress.com: &lt;/span&gt; int latchpin = 8; // connect to pin...&lt;/span&gt;&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;
/*&lt;br /&gt;
Using 2 7-segment displays with the 74HC595 shift registers&lt;br /&gt;
CC by-sa-nc 3.0&lt;br /&gt;
http://tronixstuff.wordpress.com&lt;br /&gt;
 */&lt;br /&gt;
int latchpin = 8; // connect to pin 12 on the &amp;#039;595&lt;br /&gt;
int clockpin = 12; // connect to pin 11 on the &amp;#039;595&lt;br /&gt;
int datapin = 11; // connect to pin 14 on the &amp;#039;595&lt;br /&gt;
float b = 0;&lt;br /&gt;
int c = 0;&lt;br /&gt;
float d = 0;&lt;br /&gt;
int e = 0;&lt;br /&gt;
int speed = 300; // used to control speed of counting&lt;br /&gt;
int segdisp[10] = {&lt;br /&gt;
 3,159,37,13,153,73,65,27,1,9 };&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
 pinMode(latchpin, OUTPUT);&lt;br /&gt;
 pinMode(clockpin, OUTPUT);&lt;br /&gt;
 pinMode(datapin, OUTPUT);&lt;br /&gt;
}&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
 //  Count up&lt;br /&gt;
 for (int z=0; z&amp;lt;100; z++)&lt;br /&gt;
 {&lt;br /&gt;
   digitalWrite(latchpin, LOW);&lt;br /&gt;
   shiftOut(datapin, clockpin, LSBFIRST, 0); // clears the right display&lt;br /&gt;
   shiftOut(datapin, clockpin, LSBFIRST, 0); // clears the left display&lt;br /&gt;
   digitalWrite(latchpin, HIGH);&lt;br /&gt;
   if (z&amp;lt;10)&lt;br /&gt;
   {&lt;br /&gt;
     digitalWrite(latchpin, LOW);&lt;br /&gt;
     shiftOut(datapin, clockpin, LSBFIRST, segdisp[z]); // sends the digit down the serial path&lt;br /&gt;
     shiftOut(datapin, clockpin, LSBFIRST, 255); // sends a blank down the serial path to push the digit to the right&lt;br /&gt;
     digitalWrite(latchpin, HIGH);&lt;br /&gt;
   }&lt;br /&gt;
   else if (z&amp;gt;=10)&lt;br /&gt;
   {&lt;br /&gt;
     d=z%10; // find the remainder of dividing z by 10, this will be the right-hand digit&lt;br /&gt;
     c=int(d); // make it an integer, c is the right hand digit&lt;br /&gt;
     b=z/10; // divide z by 10 - the whole number value will be the left-hand digit&lt;br /&gt;
     e = int(b); // e is the left hand digit&lt;br /&gt;
     digitalWrite(latchpin, LOW); // send the digits down to the shift registers!&lt;br /&gt;
     shiftOut(datapin, clockpin, LSBFIRST, segdisp[c]); &lt;br /&gt;
     shiftOut(datapin, clockpin, LSBFIRST, segdisp[e]); &lt;br /&gt;
     digitalWrite(latchpin, HIGH);&lt;br /&gt;
   }&lt;br /&gt;
   delay(speed);&lt;br /&gt;
 }&lt;br /&gt;
 delay(2000);&lt;br /&gt;
 //  Count down&lt;br /&gt;
 for (int z=99; z&amp;gt;=0; z--)&lt;br /&gt;
 {&lt;br /&gt;
   digitalWrite(latchpin, LOW);&lt;br /&gt;
   shiftOut(datapin, clockpin, LSBFIRST, 0); // clears the right display&lt;br /&gt;
   shiftOut(datapin, clockpin, LSBFIRST, 0); // clears the left display&lt;br /&gt;
   digitalWrite(latchpin, HIGH);&lt;br /&gt;
   if (z&amp;lt;10)&lt;br /&gt;
   {&lt;br /&gt;
     digitalWrite(latchpin, LOW);&lt;br /&gt;
     shiftOut(datapin, clockpin, LSBFIRST, segdisp[z]); // sends the digit down the serial path&lt;br /&gt;
     shiftOut(datapin, clockpin, LSBFIRST, 255); // sends a blank down the serial path to push the digit to the right&lt;br /&gt;
     digitalWrite(latchpin, HIGH);&lt;br /&gt;
   }&lt;br /&gt;
   else if (z&amp;gt;=10)&lt;br /&gt;
   {&lt;br /&gt;
     d=z%10; // find the remainder of dividing z by 10, this will be the right-hand digit&lt;br /&gt;
     c=int(d); // make it an integer, c is the right hand digit&lt;br /&gt;
     b=z/10; // divide z by 10 - the whole number value will be the left-hand digit&lt;br /&gt;
     e = int(b); // e is the left hand digit&lt;br /&gt;
     digitalWrite(latchpin, LOW); // send the digits down to the shift registers!&lt;br /&gt;
     shiftOut(datapin, clockpin, LSBFIRST, segdisp[c]); &lt;br /&gt;
     shiftOut(datapin, clockpin, LSBFIRST, segdisp[e]); &lt;br /&gt;
     digitalWrite(latchpin, HIGH);&lt;br /&gt;
   }&lt;br /&gt;
   delay(speed);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
   delay(2000);&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>JA</name></author>
	</entry>
</feed>