You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Language/Functions/Advanced IO/shiftOut.adoc
+19-15
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,10 @@ categories: [ "Functions" ]
4
4
subCategories: [ "고급 입출력" ]
5
5
---
6
6
7
+
8
+
9
+
10
+
7
11
= shiftOut()
8
12
9
13
@@ -13,40 +17,40 @@ subCategories: [ "고급 입출력" ]
13
17
14
18
[float]
15
19
=== 설명
16
-
Shifts out a byte of data one bit at a time. Starts from either the most (i.e. the leftmost) or least (rightmost) significant bit. Each bit is written in turn to a data pin, after which a clock pin is pulsed (taken high, then low) to indicate that the bit is available.
17
-
18
-
Note- if you're interfacing with a device that's clocked by rising edges, you'll need to make sure that the clock pin is low before the call to `shiftOut()`, e.g. with a call to `digitalWrite(clockPin, LOW)`.
19
-
20
-
This is a software implementation; see also the linkhttps://www.arduino.cc/en/Reference/SPI[SPI library], which provides a hardware implementation that is faster but works only on specific pins.
20
+
한번에 한 비트씩의 바이트를 옮긴다.
21
+
최고(가장 왼쪽) 또는 최저(가장 오른쪽) 비트부터 시작한다.
22
+
각 비트에, 클락 핀은 하이로 풀 되고, 다음 비트는 데이터 라인에서 읽히고, 클락 핀은 로우 된다.
23
+
각 비트는 차례로 데이터 핀에 써지며, 각 클락 핀이 펄스되어(high 되면, low) 비트가 사용가능함을 가리킨다.
24
+
주의 - 올라가는 에지에 의해 클락되는 장치와 인터페이스하면, `shiftOut()` 이 불리기 전에 클락 핀이 로우되는, 예를 들어 `digitalWrite(clockPin, LOW)`, 것을 확인해야 한다.
25
+
26
+
이것은 소프트웨어 구현임;
27
+
아두이노는 link:https://www.arduino.cc/en/Reference/SPI[SPI library] 를 제공하는데 그것은 하드웨어 구현을 사용하며, 그것은 빠르지만 특정 핀에서만 돌아간다.
21
28
[%hardbreaks]
22
29
23
30
24
31
[float]
25
32
=== 문법
26
33
`shiftOut(dataPin, clockPin, bitOrder, value)`
27
34
28
-
29
35
[float]
30
36
=== 매개변수
31
-
`dataPin`: the pin on which to output each bit (int)
37
+
`dataPin`: 각 비트에 입력할 핀 (int)
32
38
33
-
`clockPin`: the pin to toggle once the dataPin has been set to the correct value (int)
39
+
`clockPin`: dataPin 이 옳은 값(int) 로 맞추어지면 토글할 핀
34
40
35
-
`bitOrder`: which order to shift out the bits; either MSBFIRST or LSBFIRST.
36
-
(Most Significant Bit First, or, Least Significant Bit First)
41
+
`bitOrder`: 비트들 안에서 어떤 순서로 옮길지; *MSBFIRST* 또는 *LSBFIRST*.
42
+
(MSB 우선, 또는, LSB 우선)
37
43
38
-
`value`: the data to shift out. (byte)
44
+
`value`: 옮길 자료. (byte)
39
45
40
46
[float]
41
47
=== 반환
42
-
Nothing
48
+
없음
43
49
44
50
--
45
51
// OVERVIEW SECTION ENDS
46
52
47
53
48
-
49
-
50
54
// HOW TO USE SECTION STARTS
51
55
[#howtouse]
52
56
--
@@ -98,7 +102,7 @@ void loop() {
98
102
99
103
[float]
100
104
=== 주의와 경고
101
-
The dataPin and clockPin must already be configured as outputs by a call to link:../../digital-io/pinmode[pinMode()].
105
+
dataPin 과 clockPin 은 link:../../digital-io/pinmode[pinMode()] 을 불러서 이미 output 로 설정되어야 함.
102
106
103
107
shiftOut is currently written to output 1 byte (8 bits) so it requires a two step operation to output values larger than 255.
0 commit comments