Skip to content

Commit eadb8f5

Browse files
authored
shift out
1 parent 86ca13c commit eadb8f5

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

Language/Functions/Advanced IO/shiftOut.adoc

+19-15
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ categories: [ "Functions" ]
44
subCategories: [ "고급 입출력" ]
55
---
66

7+
8+
9+
10+
711
= shiftOut()
812

913

@@ -13,40 +17,40 @@ subCategories: [ "고급 입출력" ]
1317

1418
[float]
1519
=== 설명
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] 를 제공하는데 그것은 하드웨어 구현을 사용하며, 그것은 빠르지만 특정 핀에서만 돌아간다.
2128
[%hardbreaks]
2229

2330

2431
[float]
2532
=== 문법
2633
`shiftOut(dataPin, clockPin, bitOrder, value)`
2734

28-
2935
[float]
3036
=== 매개변수
31-
`dataPin`: the pin on which to output each bit (int)
37+
`dataPin`: 각 비트에 입력할 핀 (int)
3238

33-
`clockPin`: the pin to toggle once the dataPin has been set to the correct value (int)
39+
`clockPin`: dataPin 이 옳은 값(int) 로 맞추어지면 토글할 핀
3440

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 우선)
3743

38-
`value`: the data to shift out. (byte)
44+
`value`: 옮길 자료. (byte)
3945

4046
[float]
4147
=== 반환
42-
Nothing
48+
없음
4349

4450
--
4551
// OVERVIEW SECTION ENDS
4652

4753

48-
49-
5054
// HOW TO USE SECTION STARTS
5155
[#howtouse]
5256
--
@@ -98,7 +102,7 @@ void loop() {
98102

99103
[float]
100104
=== 주의와 경고
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 로 설정되어야 함.
102106

103107
shiftOut is currently written to output 1 byte (8 bits) so it requires a two step operation to output values larger than 255.
104108
[source,arduino]

0 commit comments

Comments
 (0)