Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
teaching
nswi170
web
Commits
9a7c0645
Commit
9a7c0645
authored
Apr 28, 2021
by
Šmelko Adam Mgr.
Browse files
Lab5 AS
parent
211b40fe
Changes
3
Hide whitespace changes
Inline
Side-by-side
download/smelko/cvicenie5.txt
0 → 100644
View file @
9a7c0645
#include "funshield.h"
constexpr int digit_positions = sizeof(digit_muxpos) / sizeof(digit_muxpos[0]);
void writeGlyphBitmask( byte glyph, byte pos_bitmask) {
digitalWrite( latch_pin, LOW);
shiftOut( data_pin, clock_pin, MSBFIRST, glyph);
shiftOut( data_pin, clock_pin, MSBFIRST, pos_bitmask);
digitalWrite( latch_pin, HIGH);
}
void writeGlyphR(byte glyph, int pos)
{
writeGlyphBitmask(glyph, digit_muxpos[digit_positions - pos - 1]);
}
void writeGlyphL(byte glyph, int pos)
{
writeGlyphBitmask(glyph, digit_muxpos[pos]);
}
void writeDigit(int n, int pos)
{
writeGlyphR(digits[n], pos);
}
void setup() {
pinMode(latch_pin, OUTPUT);
pinMode(data_pin, OUTPUT);
pinMode(clock_pin, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
writeDigit(1, 0);
writeDigit(2, 1);
writeDigit(3, 2);
writeDigit(4, 3);
delay(5); //ODKOMENTUJ A VYSKUSAJ ZNOVA
}
download/smelko/nswi170-lab05-as.pdf
0 → 100644
View file @
9a7c0645
File added
smelko.html
View file @
9a7c0645
...
...
@@ -96,13 +96,16 @@
<tr>
<td>
5.
</td>
<td>
Segmentový displej - multiplex
</td>
<td></td>
<td>
<!--Časový multiplex
<a href="http://ulita.ms.mff.cuni.cz/~zavoral/nswi170/ard-63.mp4">5.3</a>
<a href="http://ulita.ms.mff.cuni.cz/~zavoral/nswi170/ard-64.mp4">5.4</a>
<a href="http://ulita.ms.mff.cuni.cz/~zavoral/nswi170/ard-65.mp4">5.5</a>
<a href="http://ulita.ms.mff.cuni.cz/~zavoral/nswi170/ard-65b.mp4">5.5b</a>
-->
<td>
<a
class=
"file_link"
href=
"download/smelko/nswi170-lab05-as.pdf"
>
<img
src=
"pic/pdf-icon.png"
alt=
"PDF File Icon"
>
<span>
lab05
</span>
</a>
</td>
<td>
<a
href=
"download/smelko/cvicenie5.txt"
>
poznámky k 5. cvičeniu
</a>
</td>
</tr>
<tr>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment