MicroprocessorHVT2019 ch01 intro

31 100 0
MicroprocessorHVT2019 ch01 intro

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Tín hiệu thu được sẽ bằng tín hiệu được điều chế cộng với nhiễu đường truyền:: rx_mahoa = a + nhieu; % tin hieu thu = tin hieu phat ma hoa + nhieu rx_chmahoa = a1 + nhieu1; %tin hieu thu = tin hieu phat khong ma hoa + nhieu1 Ở bước này bên thu sẽ khôi phục tín hiệu tương tự thành tín hiệu rời rạc thông qua bộ chuyển đổi AD gọi là bộ giải điều chế. Code: for i= 1:length(rx_mahoa) if rx_mahoa(i)>=0 rx_thu(i)=1; else rx_thu(i)=0; end end Nếu rx_mahoa(i)>=0 thì tín hiệu giải điều chế là bit 1, ngược lại là bit 0. Tương tự khôi phục lại tín hiệu không mã hóa: Code: for l= 1:length(rx_chmahoa) if rx_chmahoa(l)>=0 rx_thu1(l)=1; else rx_thu1(l)=0; end end Nếu rx_chmahoa(i)>=0 thì tín hiệu giải điều chế là bit 1, ngược lại là bit 0. Kết quả: rx_thu1 = 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 0 1 1 0 0 0 So sánh tín hiệu thu không mã hóa với tín hiệu vào ta thấy bit thứ 18 bị lỗi khác với tín hiệu vào . 3.6.Giải mã tín hiệu Quá trình giải mã ngược lại với mã hóa, dãy bit nhận được sẽ được nhóm thành 7 bit, để khôi phục lại 4 bit tin. Để áp dụng được khả năng giải mã sửa lỗi Hamming thì cần phải các định có lỗi xảy ra hay không bằng cách sử dụng ma trận kiểm tra H.Nếu có xuất hiện lỗi bit thì dùng Syndrome mà nó tạo ra để xác định bit lỗi và sữa lỗi. Code: j=1; for l = 1:7:length(rx_thu) s=mod(rx_thu(l:l+6)Ht,2); s1=bin2dec(int2str(s)); e= E(s1+1,:); Y=mod(rx_thu(l:l+6)+e,2); Rx_decode(j:j+3)=Y(4:7); j=j+4; end Kết quả: Rx_decode = 0 1 0 0 1 0 0 0 0 1 1 0 1 0 0 1 1 1 0 1 So sánh kết quả giữa 20 bit tín hiệu được mã hóa trùng với 20 bit tín hiệu vào. Giải mã đã đáp ứng được tín hiệu mong muốn ở đầu thu. Trả lời câu hỏi: Sau khi mã hóa và giải mã với mã Hamming (7,4) mà vẫn còn lỗi là do mã Hamming phát hiện được nhiều lỗi nhưng nó chỉ có thể sửa được 1 lỗi. 3.7.Tính xác suất lỗi bit Tính BER, BER1 lần lượt là vector xác suất lỗi trong trường hợp mã hóa và không mã hóa. Đầu tiên tính số bit lỗi giữa tín hiệu phát và thu trong 2 trường hợp: Code: SNR(k) = 10log10(A(k)22); E(k) = sum(abs(x_dcRx_decode)); %so bit loi giua tin hieu phat va thu E1(k) = sum(abs(x_dcrx_thu1)); BER(k) = E(k)N; %ty le loi bit BER1(k) = E1(k)N ; Công suất tín hiệu trên nhiễu: SNR(k) = 10log10(A(k)22)

Microprocessor (for Embedded Systems) 01-Introduction Huỳnh Việt Thắng Faculty of Electronic & Telecommunication Engineering Danang University of Science and Technology thanghv@dut.udn.vn Contents • Introduction • • • • • • • • • • Number systems and data formats (review) Microprocessor architecture Introduction to STM32 MCU GPIO Interrupts Timers Universal Asynchronous Serial Communications Analog-to-Digital conversion (ADC) Digital-to-Analog conversion (DAC) Applications Hệ thống nhúng • Wikipedia (vi.wikipedia.org): Hệ thống nhúng thuật ngữ để hệ thống có khả tự trị nhúng vào môi trường hay hệ thống mẹ Đó hệ thống tích hợp phần cứng phần mềm phục vụ tốn chun dụng nhiều lĩnh vực cơng nghiệp, tự động hoá điều khiển, quan trắc truyền tin Đặc điểm hệ thống nhúng hoạt động ổn định có tính tự động hố cao • Hệ thống nhúng thường thiết kế để thực chức chuyên biệt Khác với máy tính đa chức năng, chẳng hạn máy tính cá nhân, hệ thống nhúng thực một vài chức định, thường kèm với yêu cầu cụ thể bao gồm số thiết bị máy móc phần cứng chun dụng mà ta khơng tìm thấy máy tính đa nói chung • Vì hệ thống xây dựng cho số nhiệm vụ định nên nhà thiết kế tối ưu hóa nhằm giảm thiểu kích thước chi phí sản xuất Embedded System • Wikipedia (en.wikipedia.org): An embedded system is a programmed controlled and operating system 'RTOS' with a dedicated function within a larger mechanical or electrical system, often with real-time computing constraints It is embedded as part of a complete device often including hardware and mechanical parts • Embedded systems control many devices in common use today Ninety-eight percent (98%) of all microprocessors are manufactured to serve as embedded system component Embedded System • An embedded system can be broadly defined as a device that contains tightly coupled hardware and software components to perform a single function, forms part of a larger system, is not intended to be independently programmable by the user, and is expected to work with minimal or no human interaction • Two additional characteristics are very common in embedded systems: reactive operation and heavily constrained • Source: Reference [1] Other definition for Embedded System • A combination of hardware and software which together form a component of a larger machine • An example of an embedded system is a microprocessor that controls an automobile engine • An embedded system is designed to run on its own without human intervention, and may be required to respond to events in real time • Source: www.computeruser.com/resources/dictionary Embedded System vs Computer Systems Applications Areas Application Areas • TV • stereo • remote control • phone / mobile phone • refrigerator • microwave • washing machine • electric tooth brush • oven / rice or bread cooker • watch • alarm clock • electronic musical instruments • electronic toys (stuffed animals,handheld toys, pinballs, etc.) • medical home equipment (e.g blood pressure, thermometer) •… • [PDAs?? More like standard computer system] Control Applications; Consumer Products Application Areas • Medical Systems – pace maker, patient monitoring systems, injection systems, intensive care units, … • Office Equipment – printer, copier, fax, … • Tools – multimeter, oscilloscope, line tester, GPS, … • Banking – ATMs, statement printers, … • Transportation – (Planes/Trains/[Automobiles] and Boats) • Radar, Traffic lights, Signalling systems, … 10 Early forms of Embedded Systems • Apollo Guidance Computer • Source: https://en.wikipedia.org/wiki/Apollo_Guidan ce_Computer Birth and Evolution of Modern Embedded Systems • Sep 1971: TMS1000 by Texas Instrument • Nov 1971: i4004 by Intel • 1970 (?): Central Air Data Computer by Garrett AiResearch • Source: https://en.wikipedia.org/wiki/Microprocessor 4-bit CPU ROM 1K, RAM 256 bits 1st microcomputer on a chip (uC) 4-bit CPU, 740KHz addressable to 4K ROM (+ 4001 ROM, 4002 RAM, 4003 I/O) Birth and Evolution of Modern Embedded Systems • By the end of the 1970s, the design arena was dominated by 8-bit CPUs and the market for microprocessors-based embedded applications had grown to hundreds of millions of dollars • • • • Texas Instruments Intel (8080, 80x86/Pentium series) Motorola 6800 (“six-eight hundred”) Zilog Z-80 What is a Microprocessor? • A microprocessor (P) is a computer processor that incorporates the functions of a Central Processing Unit (CPU) on a single integrated circuit (IC) or at most a few integrated circuits • The microprocessor is – – – – – – – a multipurpose, clock driven, register based, digital integrated circuit that accepts binary data as input, processes it according to instructions stored in its memory, and provides results as output Microprocessor Manufacturers • • • • • • • • • • Intel Advanced Micro Devices (AMD) Texas Instruments Freescale (formerly Motorola) MIPS Technologies ARM Limited (Arm Holdings owned by SoftBank Group) STMicroelectronics Microchip Technology Inc Atmel etc Statistics Contemporary Embedded Systems • Microprocessor apps have grown in complexity; requiring applications to be broken into several interacting embedded systems • Each of these features are typically supported by individual embedded systems integrated in the application Structure of an Embedded System Hardware Components Figure 1.8 Software Components • OS / app routines • RTOS • System Tasks • System Kernel • Services The Life Cycle of Embedded Systems Design Constraints • Functionality: The system ability to perform the function it was designed for • Cost: The amount of resources needed to conceive, design, produce, maintain, and discard an embedded system • Performance: The system ability to perform its function on time • Size: Physical space taken by a system solution • Power and Energy: Energy required by a system to perform its function • Time to Market: The time it takes from system conception to deployment • Maintainability: System ability to be kept functional for the longest of its mature life MPU vs MCU? • Microprocessor Unit (MPU) = CPU with large computational and processing performance, suitable for PCs, servers, mainframes • Microcontroller Unit (MCU) = less complex CPU + Memory + I/O within a single chip, suitable for control-oriented applications (embedded systems) Summary Questions What is an Embedded System? What makes it different from a general purpose computer? List five attributes of embedded systems What are the fundamental components of an embedded system? Briefly describe how each is structured Which design can be credited as the first microcontroller design? Why is this design considered a milestone in embedded systems design? Think about the functionality of one simple embedded system enabled device you regularly interact with (for example, a video game console, cellular phone, digital camera, or similar) and try to come up with the following system-level items: a) b) c) Functional hardware components needed Software tasks performed by the device Identifiable services that could be requested by each task and the hardware resource it uses ...Contents • Introduction • • • • • • • • • • Number systems and data formats (review) Microprocessor architecture Introduction to STM32 MCU GPIO Interrupts Timers

Ngày đăng: 27/03/2019, 21:49

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan