2017년 11월 12일 일요일

Serial Port 에 대한 이해

Serial Port 는 말 그대로 컴퓨터 통신에서 bit 를 1개씩 일렬로 전달하는 것을 말한다. 이는 병렬로 데이터가 전송되는 parallel 과 대비되어 serial한 모든 통신을 나타낸다고 생각할 수 있지만(그런 의미도 포함한다)실제로는 RS232 표준이 구현된 H/W를 의미한다. RS232는 IBM 에서 처음 만들었던 Personal Computer 의 표준이었기 때문에 모든 컴퓨터에는 필수적으로 있었다. 하지만 RS232 는 속도가 느렸기 때문에 USB로 대체가 되어서 지금 나오는 컴퓨터들에는 Serial Port가 없다. 하지만 Serial Port가 워낙 많이 사용되었고 간단하기 때문에 이와 호환할 수 있는 Serial to USB(혹은 USB to Serial) 을 거의 모든 컴퓨터에서 지원(Mother board 에 COM Port 형태)한다. 

참조
Wilkipedia - SerialPort
Wikipedia - RS232
Wikipedia - Personal Computer
Wikipedia - COM Port

HD(High Definition) 은 무엇을 의미 하는가?

원본: Link

요약
HD 는 High Definition 의 약자로 화질(선명도) 가 가장 낮은 1280(가로) x 720(세로) , 픽셀개수, 부터 시작한다. HD 보다 낮은 화질은 576 으로 표현되는(720 x 576) Standard Definition , ex> PAL 이 있다.
보통 화질은 720p, 1080i, 1080p 라고 표현되는데 이때 p는 progressive, i 는 interlaced를 나타낸다. interlaced 는 odd와 even 이 나눠지고 progressive는 순차적이다.

HD - short for High Definition - is everywhere these days, but is it really a big deal and what’s the difference between 720p HD and 1080p Full HD when it comes to television displays and video content?
HD는 - High Definition 의 약자 - 는 어디에서나 볼 수 있습니다. HD는 720p 와 1080p의 Full HD 가 있다고 하는데 TV의 display 나 그 영상의 내용물에 있어서 어떠한 차이가 있는 것일까요?

Games consoles play HD games, all of the public service broadcasters (that’s the BBC, ITV, Channel 4 and Channel 5) have dedicated HD channels and streaming services like Netflix and Amazon Prime Instant Video play thousands of movies in HD on demand. Even pretty much every cheap-as-chips entry-level phone that hits the shelves these days has an HD screen, so you can enjoy high-def video on the move.
게임 콘솔(게임 화면?) 은 HD를 사용하며, 모든 공공 서비스 방송사들은(BBC나 ITV, Channel 4 나 Channel 5 같은) HD 채널을 제공하며 넷플릭스나 아마존  프라임 인스턴트 비디오 에서는 고객 요구에 의해 HD를 제공 합니다. 심지어는 모든 값싼 기본 Chip으로 된 핸드폰도 HD 스크린을 제공 합니다, 그래서 이동하면서도 고 화질을 감상할 수 있습니다.

But what actually is HD, how many different types of HD are there, and what's the difference between 720p HD, 1080p Full HD, Quad HD and 4K Ultra HD? Here's our explainer guide.
그렇다면 도대체 이 HD는 몇가지 종류가 있으며 보통 얘기하는 720p, 1080p Full HD, Quad HD 와 4k Ultra HD는 무엇을 의미하는 것일까요?

What is HD?
So what actually is HD? HD, or High Definition, refers to the detail level of a screen; or to put it another way, the number of pixels that are packed into a display. A pixel is the smallest visible element on a display, the ‘dots’ that combine to make up the overall picture.
그래서 HD는 무엇을 말하는 것인가요? HD 나 High Definition 이라고 불리는 것은 화면 이나 화면 같은 것들에 보이는 pixel 의 개수를 의미 합니다. pixel은 가장 작은 보이는 요소이며 사진을 만들기 위한 하나의 작은 점 이라고 생각하면 됩니다.

HD follows from standard definition (the level of detail in analogue colour TV that most of us grew up with), cramming in even more pixels in order to produce sharper, cleaner images when playing video.
HD는 표준 정의(우리 모두가 자라온 아날로그 TV의)를 따르며 비디오를 재생할 때 더 선명하고 깨끗한 이미지를 만들기 위해 더 많은 픽셀을 사용합니다.

Confusingly there are three different types of ‘HD’ resolution out there, so it’s worth knowing a bit more when shopping around for high definition TV sets and related gear. Just because a TV set or monitor has ‘HD’ slapped on the side, it might not be exactly what you want or need. So let's take a closer look at 720p, 1080i and 1080p here, and what you need to know.
혼란스럽게도 3가지의 서로 다른 'HD' 화질 종류가 있습니디ㅏ, 그래서 이것은 고화질의 TV 및 관련 장비를 쇼핑할 때 좀 더 알아둘 가치가 있습니다. TV나 모니터의 옆면에 'HD' 가 적혀져 있는 것만으로 당신이 필요한 것이 아닐 수가 있습니다. 그래서 720p, 1080i, 1080p 에 대해 더 자세하게 보도록 하겠습니다.

720p, 1080i and 1080p HD - What’s the difference?
720p, 1080i and 1080p are all versions of HD, but they’re all different. It’s important to note that you can’t actually buy a TV set with a 1080i display, for reasons which we’ll go into a bit later. So to begin with, we’ll just look at 720p and 1080p and the differences between those.
720p, 1080i, 1080p는 HD 의 전체 종류 입니다, 이것들은 다 다릅니다. 당신이 1080i 인 TV를 살 수없다는 사실은 중요합니다. 이 내용에 관련해서는 나중에 다룰 것입니다. 우리는 먼저 720p 와 1080p 의 다른점을 먼저 이야기 하겠습니다.

720p vs 1080p
In the analogue TV days, all UK TVs used the PAL (Phase Alternating Line) broadcast system, which used the standard definition of 576i. In other words, video content came in a 720 pixels wide by 576 pixels tall resolution, also known as ‘standard definition’ or SD.
아날로그 TV 사용할 때는, 모든 영국의 TV들은 PAL(Phase Alternating Line) 방송 시스템을 사용 하였습니다, 그리고 이 PAL 은 576i를 사용합니다. 다른말로 하면, 비디오의 내용물은 720 pixel 넓이에 576의 높이로 나왔다는 것이며 이것은 '표준 화질'이나 SD 로 불렸습니다.

A 720p screen is 1280 pixels (wide) x 720 pixels (tall). That's more than twice the detail of standard definition, which makes for reasonably sharp video playback on a standard TV. However, 1080p goes even further, racking up the pixel dimensions to 1920 x 1080 - that's five times more detailed than SD.
720p 화면은 1280 넓이에 720 높이를 가졌습니다. 이것은 Standard Definition의 2배이며, 이로 인해서 확실히 선명한 화면을 Standard TV에 보여줄 수 있었습니다. 하지만 1080p 화면은 더욱 발전해서 pixel 의 면적이 1920 넓이에 1080 의 높이를 가집니다. 이는 Standard Definition의 5배 입니다.

Over on our YouTube channel, we’ve taken a humorous look at the history of broadcast definitions which might help explain the differences between the two a little better - as well as prepare you for the next generation of high definition - but that’s another story.
Youtube를 보면 이 방송되는 화질에 대한 재미있는 역사를 볼 수 있습니다. 지금까지 이야기 했던 두가지 에 대한 이해를 더 쉽게 해주며 다음에 올 화질에 대한 대비도 할 수 있습니다.

An HD TV with a resolution of 720p will only be able to display video at this resolution and no higher. So if you’re planning on playing HD games on your PlayStation 4 (which supports 1080p Full HD) or streaming the highest quality movies from Netflix you might want to avoid getting a 720p TV set.
720p 화질의 HD TV는 같은 화질 까지만 할 수 있으며 더 높은 화질은 보낼 수 없습니다. 그래서 HD게임을 당신의 PlayStation 4 (1080p Full HD 를 지원하는)플레이 하고 싶거나 Netflix에서 보여주는 높은 화질의 영화를 보고 싶다면 720p TV Set을 사용하는 것은 지양했으면 합니다.

That’s not to say that a PlayStation 4 or Netflix won’t work on a 720p set - you just won’t be able to get the absolute best performance.
이 말은 720p set에서 PlayStation 4 나 Netflix가 동작하지 않는다는 이야기가 아니라 - 최상의 성능을 사용하지 못한다는 이야기 입니다.

Most 720p TV sets you’ll see in shops these days tend to be toward the cheaper end of the price spectrum and will be marketed as being ‘HD Ready’. This is because 720p is the absolute minimum required to meet this standard.
요즘 대부분의 상점에서 볼 수 있는 720p TV set들 중 싼 것들은 'HD Ready' 라고 되어 있는데. 이것들이 HD 중 가장 낮은 사양의 720p 를 지원할 수 있기 때문이다.

Most 1080p sets you’ll see will be marketed as being ‘Full HD’ or 'True HD' as it gives you a richer, more well defined viewing experience.
대부분으로 당신이 볼 수 있는 1080p 제품은 'Full HD' 나 'True HD'라고 적혀있을 것이다. 풍부하고 더욱 선명한 시각경험을 제공한다.

Can a 720p TV playback 1080p Full HD video?
Related: Quad HD vs qHD vs 4K Ultra HD: What does it all mean?Each TV set will have what’s called its native resolution. This basically means that a 720p set is better at displaying 720p HD broadcasts.
720p 제품은 1080p 의 동영상을 출력할 수 있을까?
이와 관련해서 Quad HD, qHD, 4K Ultra HD는 무엇을 의미하는지? 각 TV set은 순수한 해상도를 이야기 합니다. 기본적으로 720p 용이 720p 를 출력하는데 최적 입니다.

Every broadcast or format your TV receives will be displayed in its native resolution. So if your 720p set receives a 1080p signal from a broadcast, Blu-ray player or games machine, it will downscale it to fit on the screen. Similarly, any standard definition 576p broadcasts will be upscaled.
당신이 당신의 TV로 수신하는 것은 해당 TV의 해상도 만큼 입니다. 그래서 720p 는 1080p를 Blu-ray나 game machine 에서 받으면 화면에 맞추기 위해서 down scale합니다. 비슷하게 어떤 표준 선명도 576p를 받으면 upscale 합니다.

All HD channels from the BBC, Channel 4, Sky and Virgin Media for example are broadcast in 1080i. A 720p HD TV would then downscale this resolution to fit, while a 1080p TV set would be able to handle it natively. We’ll get on to the difference between 1080i and 1080p in a bit. Promise!
예를 들어 BBC, Channel 4, Virgin Media 의 모든 HD 채널은 1080i 로 송신 됩니다. 720p의 TV는 이것을 downscale 합니다. 반면에 1080p는 그대로 받아들일 수 있습니다. 우리는 이제 1080i 와 1080p 의 차이점을 이야기 해 볼 것입니다.

The real plus of having a 1080p TV set have over a 720p one is when it comes to watching Blu-ray movies. Blu-ray is a native 1080p format, so they look their absolute best on 1080p TVs. If you’ve got a growing Blu-ray collection then the choice is clear - go for a 1080p set.
1080p TV를 가지고있는 것의 진정한 장점은 720p 이상의 블루 레이 영화를 보는 것입니다. Blu-ray는 기본 1080p 형식이므로 1080p TV에서 절대 최선을 다합니다. 블루 레이 컬렉션이 늘어나고 있다면 1080p 세트를 선택해야합니다.

In terms of picture quality on a 24-inch or 26-inch screen the difference is negligible unless you’re sat up close. Only on bigger screens (32-inches and above) can you start to appreciate the benefits of 1080p.
24 인치 또는 26 인치 화면의 화질면에서 볼 때 당신이 가까이 앉아 있지 않으면 그 차이는 무시해도됩니다. 더 큰 화면 (32 인치 이상)에서만 1080p의 이점을 이해할 수 있습니다.

What is 1080i and how is that different to 1080p?
1080i and 1080p broadcasts both display images at the same pixel count as each other - 1920 x 1080. The big difference is in how images are made up on your TV.
1080i 란 무엇이며 1080p와 다른 점은 무엇입니까?
1080i 및 1080p 브로드 캐스트는 서로 같은 픽셀 수 (1920 x 1080)로 이미지를 표시합니다. 큰 차이는 TV에서 이미지를 구성하는 방법입니다.

The lowercase ‘i’ in 1080i stands for interlaced scan. The lowercase ‘p’ in 1080p stands for progressive scan.
1080i의 소문자 'i'는 interlaced(섞여진) scan 을 의미 하며, 소문자 'p'는 progressive(점차적) scan을 의미 합니다.

Interlaced scan renders images in vertical lines, breaking down the picture into individual columns and then displaying every other line at a very high rate - at 1/25th of a second. Odd-numbered lines get painted on the screen first, then even numbered lines. While this is incredibly fast and impossible for the human eye to detect, it can create a ghostly flickering effect on live TV broadcasts, particularly live sporting events.
Interlaced scan은 이미지를 수직으로 만드는데 개별 column으로 만들어서 odd/even으로 나누어 투사를 하는 것이다. 사람이 알아보지 못할 정도로 빨리 한다.

Progressive scan renders images sequentially, all at once. This makes for a much smoother image overall that doesn’t suffer from this ghosting effect. What’s more, flat-panel displays like LCDs, LEDs and plasmas (the most common types of HD TVs) will automatically convert any incoming 1080i signal to 1080p. Good quality TVs (generally the expensive ones from well-known brands) will use clever processing to replace the missing lines, but cheaper TVs won't look as good.
processive scan은 이미지를 순차적으로 만든다. 이렇게 하면 ghost effect 없이 부드럽게 이미지를 만들 수 있다. 게다가 LCD/LED/plasmas(가장 일반적인 HD TV용) 는 자동으로 1080i 를 1080p 로 바꿔줄 것이다. 좋은 품질의 TV(알려진 브랜드의 비싼 것)는 없어진 line을 처리하는데 더욱 똑똑하게 동작할 것이지만 싼 것은 그렇지 않을 것이다.

Interlaced scan was introduced for analogue TV both as a form of data compression (only sending half the signal at any one time) and because old-school CRTs (cathode ray tube) TVs in the past couldn't physically scan screens fast enough for a progressive picture.
Interlaced scan은 아날로그 TV를 사용할 때 데이터 압축의 방법(전체 데이터의 반만 송신하는 것)으로 소개되었다. 왜냐하면 오래된 CRT(cathode ray tube로 된) 들은 progressive 사진을 충분하게 보낼 수 없엇기 때문이다.

참조 내용들
Progressive vs Interlaced
Progressive vs Interlaced Scanning - Everythig You Need to Know
Progressive Vs. Interlaced - What's The Difference?

Terminology
definition: 선명도
progressive: 진보적인, 점진적인
interlaced: 섞여진, 짜여진
render: Rendering (computer graphics), generating an image from a model by means of computer programs Rendering engine, the software that transforms (renders) data into a picture, 여기서는 데이터를 컴퓨터 프로그램을 통해서 사진을 만드는 작업을 이야기 한다.
playback : 재생

2017년 11월 7일 화요일

두 PC 를 Ethernet으로 연결

1. Network 설정
    - 보통 사용하는 C Class의 인터넷 주소 중 (Link)
    - 사설 IP 를 두 PC에 같은 네트워크 상으로 설정하면 된다.(Link)
    - 예를 들어 192.168.NNN.HHH 에서 192.168.1.1 과 192.168.1.2 를 서로 사용하면 같은 네트워크 상이니 연결될 수 있다?
2. 두 PC를 Ethernet 선으로 연결한다
    - (크로스 선으로 해야 한다고 보통 설명하지만 일반 선으로 연결해도 되는 것을 확인)
    - 크로스 선으로 확인 필요.

Windows 제어판

1. netplwiz
    - 표준 사용자 이름 추가/변경

2. WIN + 'x'
    - 다양한 바로가기(장치관리자 포함)

Hardware 용어

bit stuffing
이어진 5개의 1 bit 의 끝에 0을 추가하는 것

differential
두 신호의 차나, 입력 신호와 참조 전압과의 차를 만드는 회로를 말한다.

bitwise
bit 단위로 처리한다.

arbitration
중재

bitwise arbitration
bit 단위로 중재한다고 해석되며(비트단위조정), bit를 받아들이며 판단을 하여 message를 send하지 못하도록 하는것?

CAN 에서는 bitw

2017년 11월 5일 일요일

BackChannel on Video Communication

Video Data
sensor -> serializer -> deserializer -> human eye

so serializer send video data to deseirializer usually
but deseirializer can send data to serializer using GPIO and other thing.
so if serialzie and deserializer support back channel to communicate data

2017년 11월 4일 토요일

CAN Standard Frame Format

Base Frame Format



Start-of-frame
1
Denotes the start of frame transmission

Identifier (green)
11
A (unique) identifier which also represents the message priority

Remote transmission request (RTR) (blue)
1
Must be dominant (0) for data frames and recessive (1) for remote request frames (see Remote Frame, below)

Identifier extension bit (IDE)
1
Must be dominant (0) for base frame format with 11-bit identifiers

Reserved bit (r0)
1
Reserved bit. Must be dominant (0), but accepted as either dominant or recessive.

Data length code (DLC) (yellow)
4
Number of bytes of data (0–8 bytes)[a]

Data field (red)
0–64 (0-8 bytes)
Data to be transmitted (length in bytes dictated by DLC field)

CRC
15
Cyclic redundancy check

CRC delimiter
1
Must be recessive (1)

ACK slot
1
Transmitter sends recessive (1) and any receiver can assert a dominant (0)

ACK delimiter
1
Must be recessive (1)

End-of-frame (EOF)
7
Must be recessive (1)


Terminology
1. dominant, recessive
recessive(1): 열성
dominant(0): 우성
이라고 해석이 된다. low 나 high 가 아니라 recessive 나 dominant 라고 부르는 이유는 network 에서 통신을 할 때 ID 가 더 낮은 ECU 가 먼저 통신을 한다는 것이다. CAN 통신에서는 메시지를 받는 ECU 가 알아서 처리를 하므로 ID 가 낮은걸 먼저 처리할 것인다( 동시에 왔을 때 어떻게 동작하는지 실제 예를 알 고 싶다.)
2. bus network
    - 하나의 버스 선에 각 Node(ECU 등) 를 연결해서 통신하는 network 방식
3. 종단 저항
    - 반사 현상을 막기 위하여 끝에 연결한 저항(통신 라인의 임피던스와 동일하다)
4. CRC
an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data.
Blocks of data entering these systems get a short check value attached, based on the remainder of a polynomial division of their contents.
CRCs are so called because the check (data verification) value is a redundancy (it expands the message without adding information) and the algorithm is based on cyclic codes.
CRC 가 왜 15bit 냘고 하면 CRC-16 알고리즘을 썼기 때문이다. 16bit 짜리로 나누어서 15자리가 남게되면 그 15bit을 뒤에 붙여서 나누면 0이 남는다. CRC 가 동작하는 원리가 그것.
5. arbitration
다중 노드가 동시에 메시지를 CAN 버스로 전송하려는 경우 최우선 순위를 가진 노드 (가장 낮은 중재 ID)가 자동적으로 버스에 액세스됩니다. 최저 우선 순위를 가진 노드는 버스가 사용 가능할 때까지 반드시 대기해야 합니다. 이러한 방식으로 CAN 네트워크를 실행하면 CAN 노드 사이에 결정성있는 통신을 구현할 수 있습니다.
다른 아이디가 동시에 시그널을 보내면 우선순위가 높은 노드가 메시지를 보내고 다른 노드들이 보내지 못하는 것 까지는 이해 하는데 정확히 같은 타이밍이라 메시지를 두개 이상의 노드에서 보내면 우선순위가 가장 낮은것 빼고 나머지의 데이터가 어떻게 되는지 아직 이해하지 못함