Luận văn tốt nghiệp máy nghe nhạc sử dụng chip arm cortex m3 32 bit

95 559 0
Luận văn tốt nghiệp máy nghe nhạc sử dụng chip arm cortex m3 32 bit

Đ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

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINH TRƯỜNG ĐẠI HỌC BÁCH KHOA TP HCM KHOA: ĐIỆN-ĐIỆN TỬ BỘ MÔN: ĐIỆN TỬ -O0O - LUẬN VĂN TỐT NGHIỆP ĐẠI HỌC MÁY NGHE NHẠC SỬ DỤNG CHIP ARM CORTEX-M3 32-BIT GVHD: TS HOÀNG TRANG ThS.PHÙNG THẾ VŨ SVTH: PHẠM VĂN VANG MSSV: 40602934 Tp HCM, Tháng 1/2011 i Lời cảm ơn LUẬN VĂN TỐT NGHIỆP LỜI CẢM ƠN Tôi xin chân thành cảm ơn TS Hoàng Trang nhận lời hướng dẫn xuyên suốt Đố án Luận văn tốt nghiệp Trong thời gian đó, thầy giành nhiều thời gian hướng dẫn bước để hoàn thành tốt công việc bảo cho số kỹ trình bày ý tưởng Tôi chân thành gửi lời cảm ơn đến THS Phùng Thế Vũ tận tình giúp đỡ suốt thời gian làm luận văn Đặc biệt định hướng nghề nghiệp cho tương lai Cuối cùng, xin chân thành cảm ơn quý thầy cô khoa Điện-Điện tử truyền đạt cho kiến thức quý báu suốt năm học trường SVTH: PHẠM VĂN VANG Trang ii LUẬN VĂN TỐT NGHIỆP Tóm tắt luận văn TÓM TẮT LUẬN VĂN Luận văn bao gồm chương.Trình bày kiến thức ARM Cortex-M3 ứng dụng phát triển CHIP ARM STM32F103RC Nội dung luận văn tập trung vào việc phát triển sản phẩm máy nghe nhạc dựa EASY KIT phát triển nhóm ARM Việt Nam.Nội dung chủ yếu quan trọng tập trung vào chương chương Luận văn tách riêng làm phần nằm chương riêng biệt nhằm làm cho người đọc tiện theo dõi kiến thức phần cứng phần mềm cần thiết đề tạo thành máy nghe nhạc đơn giản hệ thống nhúng Chương 1: Giới Thiệu Chung Về Sản Phẩm Nội dung chương gồm phần: Phần 1: Giới thiệu đặc điểm chung sản phẩm, cung cấp cho người đọc nhìn tổng quát sản phẩm thông qua sơ đồ khối Phần 2: Trình bày nguyên lý hoạt động sản phẩm Phần 3: Giới thiệu dòng ARM Cortex-M3, số đặc điểm trội so với dòng ARM khác.Trình bày ngoại vi tích hợp với lõi ARM để phát triển ứng dụng vừa nhỏ.Giới thiệu CHIP STM32F103RC, sản xuất STMicroelectronics, tốc độ CPU, nhớ ngoại vi tích hợp Chương 2: Mô Hình Phần Cứng Nội dung chương giới thiệu module phần cứng cần sử dụng để tạo thành sản phẩm Với ngoại vi tích hợp sẵn bên CHIP SPI, DAC, DMA…đầu tiên trình bày đặc tính bản, sau phần cấu hình phần cứng ngoại vi để tương thích với yêu cầu sản phẩm Với Module bên LCD, mạch khuếch đại công suất trình bày sơ đồ nguyên lý chế độ hoạt động Chương 3: Mô Hình Phần mềm Chương trình bày kiến thức phần mềm để lập trình cho sản phẩm dựa vào phần cứng tích hợp sẵn EASY KIT Nội dung bao gồm phần: SVTH: PHẠM VĂN VANG Trang iii LUẬN VĂN TỐT NGHIỆP Tóm tắt luận văn Phần 1: Giới thiệu format file nhạc WAVE Phần 2: Trình bày công cụ hỗ trợ cho trình lập trình Phần 3: Giới thiệu hai thư viện hỗ trợ giúp tiết kiệm thời gian trình viết chương trình Phần 4: Trình bày giải thuật chương trình, từ chương trình đến chương trình phục vụ ngắt Chương 4: Những Hạn Chế Và Hướng Phát Triển Chương nêu hạn chế hướng phát triển SVTH: PHẠM VĂN VANG Trang iv LUẬN VĂN TỐT NGHIỆP Muc lục MỤC LỤC Đề mục Trang Trang bìa i Lời cảm ơn ii Tóm tắt nội dung luận văn iii Muc lục v Danh sách hình vẽ viii Danh sách bảng biểu x CHƯƠNG GIỚI THIỆU CHUNG VỀ SẢN PHẨM 1.1 Sơ đồ khối 1.2 Nguyên lý hoạt động 1.3 Tổng quan CPU ARM Cortex-M3 STM32F103RC 1.3.1 Giới thiệu dòng ARM Cortex CPU STM32F103RC 1.3.2 STM32 – ARM Cortex M3 CPU STM32F103RC CHƯƠNG MÔ HÌNH PHẦN CỨNG 2.1 Sơ đồ nguyên lý mạch 2.2 KIT phát triển ứng dụng ( EASY KIT) 2.3 Chi tiết modules sử dụng mạch 2.3.1 Khối nguồn 2.3.2 SD Card 2.3.2.1 Cấu trúc lưu trữ file SD Card 2.3.2.2 Giao tiếp với Micro SD Card 12 2.3.3 Giao diện SPI 17 2.3.3.1 Giới thiệu giao diện SPI 17 2.3.3.2 Đặc điểm giao diện SPI 17 2.3.3.3 SPI hoặt động chế độ Master 18 2.3.3.4 Cấu hình giao diện SPI để giao tiếp với Micro SD Card 19 SVTH: PHẠM VĂN VANG Trang v LUẬN VĂN TỐT NGHIỆP Muc lục 2.3.4 Giao diện DAC 20 2.3.4.1 Đặc điểm chuyển đổi DAC: 20 2.3.4.2 Bộ đệm ngõ 22 2.3.4.3 Định dạng liệu cho DAC 23 2.3.4.4 Quá trình chuyển đổi 23 2.3.4.5 Nguồn xung kích 24 2.3.4.6 DMA dành cho DAC 24 2.3.4.7 Cấu hình DAC cho sản phẩm 25 2.3.4.8 Hoặt động DAC 25 2.3.5 DMA ( Direct Memory Access) 26 2.3.5.1Giới thiệu DMA 26 2.3.5.2 Đặc điểm 26 2.3.5.3 Hoạt động vận chuyển liệu DMA 27 2.3.5.4 Bộ phân xử 27 2.3.5.5 Ngắt DMA 27 2.3.5.6 DMA dành cho kênh DAC 28 2.3.5.7 Cấu hình DMA cho sản phẩm 28 2.3.6 Giao diện EXTI (External event/ interrupt controller) 30 2.3.6.1 Đặc điểm 30 2.3.6.2 Định vị nguồn ngắt 31 2.3.7 Khối điều khiển ( nút nhấn) 32 2.3.8 Khối hiển thị LCD 33 2.3.9 Mạch khuếch đại công suất 35 CHƢƠNG MÔ HÌNH PHẦN MỀM 37 3.1 Định dạng file WAVE 37 3.2 Công cụ hỗ trợ lập trình .39 3.2.1 Trình biên dịch Keil uVerion4 .39 SVTH: PHẠM VĂN VANG Trang vi LUẬN VĂN TỐT NGHIỆP Mục lục 3.2.2 Trình soạn thảo Source Insight 40 3.2.3 Chƣơng trình nạp Flash Loader Demonstrator (FLD) 40 3.3 Giới thiệu thƣ viện hỗ trợ lập trình 44 3.3.1 Bộ thƣ viện chuẩn CMSIS .44 3.3.2 Bộ thƣ viện DOSFS .45 CHƢƠNG NHỮNG HẠN CHẾ VÀ HƢỚNG PHÁT TRIỂN 55 4.1 Những hạn chế sản phẩm .55 4.2 Hƣớng phát triển 55 Tài liệu tham khảo .56 Datasheet IC 57 SVTH: PHẠM VĂN VANG Trang vii LUẬN VĂN TỐT NGHIỆP Danh sách hình vẽ Danh sách hình vẽ Chƣơng Hình 1.1: Sơ đồ khối sản phẩm .1 Hình 1.2: Kiến trúc vi xử lý ARM-Cortex M3 Hình 1.3: Kiến trúc chung dòng STM32 Chƣơng Hình 2.1: Sơ đồ nguyên lý mạch .5 Hình 2.2: EASY KIT .6 Hình 2.3: Sơ đồ nguyên lý khối nguồn Hình 2.4 Cấu Trúc Của Ổ Đĩa Hình 2.5: Cấu trúc chung phân vùng Hình 2.6: Giao tiếp SD Card SPI 12 Hình 2.7 Cấu trúc đáp ứng R1 R3 14 Hình 2.8: Đọc khối liệu 15 Hình 2.9: Đọc nhiều khối liệu 16 Hình 2.10: Sơ đồ khối giao diện SPI 18 Hình 2.11: Sơ đồ kết nối Micro SD Card với giao diện SPI2 .19 Hình 2.12: Trạng thái clock tĩnh SPI 20 Hình 2.13: Sơ đồ khối chuyển đổi DAC 21 Hình 2.14: Ngõ không đệm ( có tải không tải ngõ ra) 22 Hình 2.15: Ngõ có đệm ( có tải không tải ngõ ra) 22 Hình 2.16: Thanh ghi liệu tƣơng ứng với trƣờng hợp Single mode 23 Hình 2.18 Quá trình chuyển đổi không cần xung kích .24 Hình 2.19: Sơ đồ khối điều khiển DMA .27 SVTH: PHẠM VĂN VANG Trang viii LUẬN VĂN TỐT NGHIỆP Danh sách hình vẽ Hình 2.20: Bộ điều khiển DMA2 ánh xạ ngoại vi .28 Hình 2.21: Sơ đồ khối EXTI 31 Hình 2.22: Các nguồn ngắt EXTI0 31 Hình 2.23: Các nguồn ngắt EXTI15 .32 Hình 2.24: Sơ đồ khối module điều khiển .32 Hình 2.25: Sơ đồ nguyên lý nút nhấn 33 Hình 2.26: Sơ đồ nguyên lý khố LCD 34 Hình 2.27: Sơ đồ giải thuật mô tả trình tự giao tiếp với LCD .35 Hình 2.28: Sơ đồ nguyên lý mạch khuếch đại công suất .36 Chƣơng Hình 3.1: Định dạng file WAVE 37 Hình 3.2: Minh họa định dạng file WAVE 39 Hình 3.3: Trang cài đặt kết nối 41 Hình 3.4: Trang trạng thái Flash .42 SVTH: PHẠM VĂN VANG Trang ix LUẬN VĂN TỐT NGHIỆP Danh sách bảng biểu Danh sách bảng biểu Bảng 2.1 Mark Boot Recor Bảng 2.2 Thông tin phân vùng Hình 2.5: Cấu trúc chung phân vùng Bảng 2.3: Thông tin chứa Boot sector 10 Bảng 2.4: Giá trị mục nhập FAT 11 Bảng 2.5: Cấu trúc Directory Table .11 Bảng 2.6: Cấu trúc lệnh SD Card 13 Bảng 2.7: Một số lệnh thƣờng gặp SD Card 13 Bảng 2.8: Các chân DAC 22 Bảng 2.9: Nguồn xung kích 24 Bảng 2.10 Các yêu cấu ngắt DMA 28 SVTH: PHẠM VĂN VANG Trang x Datasheet IC LUẬN VĂN TỐT NGHIỆP Typicals and limits appearing in normal type apply for TJ = 25˚C Limits appearing in Boldface type apply over the entire junction temperature range for operation, −40˚C to 125˚C Symbol VREF VOUT VOUT Conditions Min (Note 5) Typ (Note 4) Max (Note 5) Units LM1117I-ADJ IOUT = 10mA, VIN-VOUT = 2V, TJ = 25˚C 10mA IOUT 800mA, 1.4V VIN-VOUT 10V 1.238 1.200 1.250 1.250 1.262 1.290 V V LM1117I-3.3 IOUT = 10mA, VIN = 5V, TJ = 25˚C IOUT 800mA, 4.75V VIN 10V 3.267 3.168 3.300 3.300 3.333 3.432 V V LM1117I-5.0 IOUT = 10mA, VIN = 7V, TJ = 25˚C IOUT 800mA, 6.5V VIN 12V 4.950 4.800 5.000 5.000 5.050 5.200 V V 0.035 0.3 % 10 mV 15 mV 0.2 0.5 % 15 mV mV Parameter Reference Voltage Output Voltage Line Regulation (Note 6) LM1117I-ADJ IOUT = 10mA, 1.5V 13.75V VIN-VOUT LM1117I-3.3 IOUT = 0mA, 4.75V LM1117I-5.0 IOUT = 0mA, 6.5V VOUT Load Regulation (Note 6) LM1117I-5.0 VIN = 6.5V, Dropout Voltage (Note 7) VIN LM1117I-ADJ VIN-VOUT = 3V, 10 LM1117I-3.3 VIN = 4.75V, VIN-V OUT VIN 15V IOUT IOUT 15V 800mA 800mA 20 IOUT = 100mA 1.10 1.30 V IOUT = 500mA 1.15 1.35 V IOUT 800mA 1.20 1.40 V 1200 1500 mA LM1117I-ADJ VIN = 15V 1.7 mA LM1117I-3.3 VIN 15V 15 mA IOUT = 800mA ILIMIT Current Limit VIN-VOUT = 5V, TJ = 25˚C Minimum Load Current (Note 8) Quiescent Current 800 LM1117I-5.0 VIN 15V Thermal Regulation TA = 25˚C, 30ms Pulse Ripple Regulation fRIPPLE =1 20Hz, VIN-VOUT = 3V VRIPPLE = 1VPP Adjust Pin Current Adjust Pin Current Change 10 IOUT 800mA, 1.4V VIN-VOUT 10V Temperature Stability 60 15 mA 0.01 0.1 %/W 75 dB 60 120 µA 0.2 10 µA 0.5 % 0.3 % Long Term Stability TA = 125˚C, 1000Hrs RMS Output Noise (% of VOUT), 10Hz 0.003 % Thermal Resistance Junction-to-Case 3-Lead SOT-223 -Lead TO-252 15.0 10 ˚C/W ˚C/W Thermal Resistance Junction-to-Ambient (No heat sink; No air flow) 3-Lead SOT-223 3-Lead TO-252 (Note 9) 136 92 ˚C/W ˚C/W f 10kHz Note 1: Absolute Maximum Ratings indicate limits beyond which damage to the device may occur Operating Ratings indicate conditions for which the device is intended to be functional, but specific performance is not guaranteed For guaranteed specifications and the test conditions, see the Electrical Characteristics Note 2: The maximum power dissipation is a function of TJ(max) , JA, and TA The maximum allowable power dissipation at any ambient temperature is PD = (TJ(max)–TA)/ JA All numbers apply for packages soldered directly into a PC board SVTH: PHẠM VĂN VANG Datasheet IC LUẬN VĂN TỐT NGHIỆP Note 3: For testing purposes, ESD was applied using human body model, 1.5k in series with 100pF Note 4: Typical Values represent the most likely parametric norm Note 5: All limits are guaranteed by testing or statistical analysis Note 6: Load and line regulation are measured at constant junction room temperature Note 7: The dropout voltage is the input/output differential at which the circuit ceases to regulate against further reduction in input voltage It is measured when the output voltage has dropped 100mV from the nominal value obtained at VIN = VOUT +1.5V Note 8: The minimum output current required to maintain regulation Note 9: Minimum pad size of 0.038in2 Typical Performance Characteristics Dropout Voltage (VIN-V OUT) Short-Circuit Current DS100919-23 DS100919-22 Load Regulation LM1117-ADJ Ripple Rejection DS100919-43 DS100919-6 SVTH: PHẠM VĂN VANG Datasheet IC LUẬN VĂN TỐT NGHIỆP LM1117-ADJ Ripple Rejection vs Current Temperature Stability DS100919-25 DS100919-7 Adjust Pin Current LM1117-2.85 Load Transient Response DS100919-26 DS100919-8 LM1117-5.0 Load Transient Response DS100919-9 SVTH: PHẠM VĂN VANG LM1117-2.85 Line Transient Response DS100919-10 Datasheet IC LUẬN VĂN TỐT NGHIỆP LM1117-5.0 Line Transient Response DS100919-11 APPLICATION NOTE 1.0 External Capacitors/Stability 1.1 Input Bypass Capacitor An input capacitor is recommended A 10µF tantalum on the input is a suitable input bypassing for almost all applications 1.2 Adjust Terminal Bypass Capacitor The adjust terminal can be bypassed to ground with a pass capacitor (CADJ) to improve ripple rejection This pass capacitor prevents ripple from being amplified as output voltage is increased At any ripple frequency, impedance of the CADJ should be less than R1 to prevent ripple from being amplified: 1/(2 *fRIPPLE*CADJ) bybythe the the < R1 The R1 is the resistor between the output and the adjust pin Its value is normally in the range of 100-200 For example, with R1 = 124 and fRIPPLE = 120Hz, the CADJ should be > 11µF 1.3 Output Capacitor The output capacitor is critical in maintaining regulator stability, and must meet the required conditions for both minimum amount of capacitance and ESR (Equivalent Series Resistance) The minimum output capacitance required by the LM1117 is 10µF, if a tantalum capacitor is used Any increase of the output capacitance will merely improve the loop stability and transient response The ESR of the output capacitor should be less than 0.5 In the case of the adjustable regulator, when the CADJ is used, a larger output capacitance (22µf tantalum) is required 2.0 Output Voltage The LM1117 adjustable version develops a 1.25V reference voltage, VREF, between the output and the adjust terminal As shown in Figure 1, this voltage is applied across resistor R1 to generate a constant current I1 The current IADJ from the adjust terminal could introduce error to the output But since it is very small (60µA) compared with the I1 and very constant with line and load changes, the error can be ignored The constant current I1 then flows through the output set resistor R2 and sets the output voltage to the desired level For fixed voltage devices, R1 and R2 are integrated inside the devices DS100919-17 FIGURE Basic Adjustable Regulator 3.0 Load Regulation The LM1117 regulates the voltage that appears between its output and ground pins, or between its output and adjust pins In some cases, line resistances can introduce errors to the voltage across the load To obtain the best load regulation, a few precautions are needed Figure 2, shows a typical application using a fixed output regulator The Rt1 and Rt2 are the line resistances It is obvious that the VLOAD is less than the VOUT by the sum of the voltage drops along the line resistances In this case, the load regulation seen at the RLOAD would be degraded from the data sheet specification To improve this, the load should be tied directly to the output terminal on the positive side and directly tied to the ground terminal on the negative side DS100919-18 FIGURE Typical Application using Fixed Output Regulator SVTH: PHẠM VĂN VANG Datasheet IC LUẬN VĂN TỐT NGHIỆP APPLICATION NOTE When the adjustable regulator is used (Figure 3), the best performance is obtained with the positive side of the resistor R1 tied directly to the output terminal of the regulator rather than near the load This eliminates line drops from appearing effectively in series with the reference and degrading regulation For example, a 5V regulator with 0.05 resistance between the regulator and load will have a load regulation due to line resistance of 0.05 x IL If R1 (=125 ) is connected near the load, the effective line resistance will be 0.05 (1+R2/R1) or in this case, it is times worse In addition, the ground side of the resistor R2 can be returned near the ground of the load to provide remote ground sensing and improve load regulation DS100919-15 FIGURE Regulator with Protection Diode 5.0 Heatsink Requirements DS100919-19 FIGURE Best Load Regulation using Adjustable Output Regulator 4.0 Protection Diodes Under normal operation, the LM1117 regulators not need any protection diode With the adjustable device, the internal resistance between the adjust and output terminals limits the current No diode is needed to divert the current around the regulator even with capacitor on the adjust terminal The adjust pin can take a transient signal of ± 25V with respect to the output voltage without damaging the device When a output capacitor is connected to a regulator and the input is shorted to ground, the output capacitor will discharge into the output of the regulator The discharge current depends on the value of the capacitor, the output voltage of the regulator, and rate of decrease of VIN In the LM1117 regulators, the internal diode between the output and input pins can withstand microsecond surge currents of 10A to 20A With an extremely large output capacitor ( 1000 µF), and with input instantaneously shorted to ground, the regulator could be damaged When an integrated circuit operates with an appreciable current, its junction temperature is elevated It is important to quantify its thermal limits in order to achieve acceptable performance and reliability This limit is determined by summing the individual parts consisting of a series of temperature rises from the semiconductor junction to the operating environment A one-dimensional steady-state model of conduction heat transfer is demonstrated in Figure The heat generated at the device junction flows through the die to the die attach pad, through the lead frame to the surrounding case material, to the printed circuit board, and eventually to the ambient environment Below is a list of variables that may affect the thermal resistance and in turn the need for a heatsink R JC (Component Variables) R CA (Application Variables) Leadframe Size & Material Mounting Pad Size, Material, & Location No of Conduction Pins Placement of Mounting Pad Die Size PCB Size & Material Die Attach Material Traces Length & Width Molding Compound Size and Material Adjacent Heat Sources Volume of Air Ambient Temperatue Shape of Mounting Pad In this case, an external diode is recommended between the output and input pins to protect the regulator, as shown in Figure DS100919-37 FIGURE Cross-sectional view of Integrated Circuit Mounted on a printed circuit board Note that the case temperature is measured at the point where the leads contact with the mounting pad surface SVTH: PHẠM VĂN VANG Datasheet IC LUẬN VĂN TỐT NGHIỆP APPLICATION NOTE The next parameter which must be calculated is the maximum allowable temperature rise, TR(max): (Continued) The LM1117 regulators have internal thermal shutdown to protect the device from over-heating Under all possible operating conditions, the junction temperature of the LM1117 must be within the range of 0˚C to 125˚C A heatsink may be required depending on the maximum power dissipation and maximum ambient temperature of the application To determine if a heatsink is needed, the power dissipated by the regulator, PD , must be calculated: IIN = IL + IG TR(max) = TJ(max)-TA(max) where TJ(max) is the maximum allowable junction temperature (125˚C), and TA(max) is the maximum ambient temperature which will be encountered in the application Using the calculated values for TR(max) and PD, the maximum allowable value for the junction-to-ambient thermal resistance ( JA) can be calculated: JA PD = (VIN-VOUT)I L + VINIG Figure shows the voltages and currents which are present in the circuit = TR(max)/PD If the maximum allowable value for JA is found to be 136˚C/W for SOT-223 package or 79˚C/W for TO-220 package or 92˚C/W for TO-252 package, no heatsink is needed since the package alone will dissipate enough heat to satisfy these requirements If the calculated value for JA falls below these limits, a heatsink is required As a design aid, Table shows the value of the JA of SOT-223 and TO-252 for different heatsink area The copper patterns that we used to measure these JAs are shown at the end of the Application Notes Section Figure and Figure reflects the same test results as what are in the Table Figure and Figure 10 shows the maximum allowable power dissipation vs ambient temperature for the SOT-223 and TO-252 device Figures Figure 11 and Figure 12 shows the maximum allowable power dissipation vs copper area (in2) for the SOT-223 and TO-252 devices Please see AN1028 for power enhancement techniques to be used with SOT-223 and TO-252 packages DS100919-16 FIGURE Power Dissipation Diagram TABLE Layout JA Different Heatsink Area Copper Area Thermal Resistance Top Side (in2)* Bottom Side (in2) 0.0123 136 103 0.066 123 87 0.3 84 60 0.53 75 54 0.76 69 52 66 47 0.2 115 84 0.4 98 70 ( JA,˚C/W) SOT-223 ( JA,˚C/W) 0.6 89 63 10 0.8 82 57 11 79 57 12 0.066 0.066 125 89 13 0.175 0.175 93 72 14 0.284 0.284 83 61 15 0.392 0.392 75 55 16 0.5 0.5 70 53 *Tab of device attached to topside copper SVTH: PHẠM VĂN VANG TO-252 Datasheet IC LUẬN VĂN TỐT NGHIỆP DS100919-36 DS100919-13 FIGURE JA vs 1oz Copper Area for SOT-223 DS100919-34 FIGURE JA vs 2oz Copper Area for TO-252 DS100919-12 FIGURE Maximum Allowable Power Dissipation vs Ambient Temperature for SOT-223 SVTH: FIGURE 10 Maximum Allowable Power Dissipation vs Ambient Temperature for TO-252 PHẠM VĂN VANG DS100919-14 FIGURE 11 Maximum Allowable Power Dissipation vs 1oz Copper Area for SOT-223 DS100919-35 FIGURE 12 Maximum Allowable Power Dissipation vs 2oz Copper Area for TO-252 Datasheet IC LUẬN VĂN TỐT NGHIỆP DS100919-41 FIGURE 13 Top View of the Thermal Test Pattern in Actual Scale SVTH: PHẠM VĂN VANG LUẬN VĂN TỐT NGHIỆP Datasheet IC DS100919-42 FIGURE 14 Bottom View of the Thermal Test Pattern in Actual Scale SVTH: PHẠM VĂN VANG Datasheet IC LUẬN VĂN TỐT NGHIỆP Typical Application Circuits DS100919-31 DS100919-30 Adjusting Output of Fixed Regulators Regulator with Reference DS100919-27 5V Logic Regulator with Electronic Shutdown* DS100919-29 1.25V to 10V Adjustable Regulator with Improved Ripple Rejection B a SVTH: PHẠM VĂN VANG ttery Backed-Up Regulated Supply SVTH: PHẠM VĂN VANG DS100919-32 Datasheet IC LUẬN VĂN TỐT NGHIỆP Typical Application Circuits (Continued) DS100919-33 Low Dropout Negative Supply SVTH: PHẠM VĂN VANG Datasheet IC LUẬN VĂN TỐT NGHIỆP Physical Dimensions inches (millimeters) unless otherwise noted 3-Lead SOT-223 NS Package Number MA04A SVTH: PHẠM VĂN VANG Datasheet IC LUẬN VĂN TỐT NGHIỆP Physical Dimensions inches (millimeters) unless otherwise noted (Continued) 3-Lead TO-220 NS Package Number T03B SVTH: PHẠM VĂN VANG Datasheet IC LUẬN VĂN TỐT NGHIỆP Physical Dimensions inches (millimeters) unless otherwise noted (Continued) 3-Lead TO-252 NS Package Number TD03B SVTH: PHẠM VĂN VANG [...]... Các chip ARM7 và ARM9 có hai tập lệnh ( tập lệnh ARM 32- bit và tập lệnh Thumb 16 -bit) , trong khi đó dòng Cortex được thiết kế hỗ trợ tập lệnh ARM Thumb-2, là sự phối hợp giữa 2 tập lệnh trên để đạt được sự tương nhượng giữa dung lượng code và thời gian xử lý Hình 1.2: Kiến trúc vi xử lý ARM- Cortex M3 1.3.2 STM32 – ARM Cortex M3 và CPU STM32F103RC STM32 SVTH: PHẠM VĂN VANG Trang 3 LUẬN VĂN TỐT NGHIỆP... đọc file nhạc tiếp theo Pre: khi có ngắt ở chân này chương trình phục vụ ngắt sẽ chạy lại file nhạc vừa chạy xong 1.3 Tổng quan về CPU ARM Cortex- M3 STM32F103RC SVTH: PHẠM VĂN VANG Trang 2 LUẬN VĂN TỐT NGHIỆP Chương 1 Giới thiệu chung về sản phẩm 1.3.1 Giới thiệu về dòng ARM Cortex Cortex là bộ xử lý thế hệ mới đưa ra một kiến trúc chuẩn cho nhu cầu đa dạng về công nghệ Không giống như các dòng ARM khác,... Dòng STM32 do ST sản suất, vi điều khiển dựa trên lõi ARM Cortex M3 Dòng STM32 thiết lập các tiêu chuẩn mới về hiệu suất, chi phí cũng như các ứng dụng đòi hỏi tiêu thụ năng lượng thấp và đòi hỏi khắt khe về điều khiển thời gian thực Hình 1.3: Kiến trúc chung của dòng STM32 Các dòng STM32 được ST tích hợp thêm nhiều ngoại vi thích hợp cho các ứng dụng điều khiển đa dụng Thành phần chính của STM32 là... CONTROLLER BUTTON3 Hình 2.1: Sơ đồ nguyên lý mạch SVTH: PHẠM VĂN VANG Trang 5 LUẬN VĂN TỐT NGHIỆP Chương 2 Mô hình phần cứng 2.2 KIT phát triển ứng dụng ( EASY KIT) Hình 2.2: EASY KIT EASY KIT được phát triển bởi nhóm ARM Việt Nam, cung cấp một số Module đủ để phát triển các ứng dụng cho bước đầu làm quen với ARM Cortex- M3 Đặc điểm: CPU ARM Cortex- M3 STM32F103RC như giới thiệu ở phần trước Module giao tiếp... phần chính của STM32 là nhân Cortex M3, dùng I-Bus và D-Bus để kết nối với FLASH cũng như các ngoại vi Ngoài ra thành phần quan trọng khác là DMA Các ngoại vi được chia làm 2 nhóm kết nối đến hai giao diện khác nhau AHBAPB1 và AHB-APB2( có tốc độ tối đa lớn hơn AHB-APB1) CPU STM32F103RC STM32F103RC là dòng “high density” của STM32 với các đặc điểm sau: ARM 32- bit Cortex- M3 Microcontroller, 72MHz, 256kB...LUẬN VĂN TỐT NGHIỆP Chương 1 Giới thiệu chung về sản phẩm CHƢƠNG 1 GIỚI THIỆU CHUNG VỀ SẢN PHẨM 1.1 Sơ đồ khối AMPLIFIER Hình 1.1: Sơ đồ khối sản phẩm Đặc điểm: Trung tâm chính là CPU ARM Cortex M3 STM32F103RC của hãng STMicroeletronics như được giới thiệu ở phần sau Đọc file nhạc từ Micro SD Card Chơi nhạc từ file WAV 8 bit, mono, stereo, tần số lấy mẫu bất kỳ... như các dòng ARM khác, dòng Cortex là một lõi xử lý hoàn thiện đưa ra một chuẩn CPU và kiến trúc hệ thống chung Dòng Cortex gồm 3 nhánh: dòng A dành cho các ứng dụng cao cấp, dòng R dành cho các ứng dụng thời gian thực và dòng M dành cho các ứng dụng điều khiển và chi phí thấp Lõi ARM Cortex M3 là sự cải tiến của ARM7 , từng mang lại thành công vang dội cho công ty ARM Cortex- M3 đưa ra một lõi vi điều... Card Một khung lệnh có độ dài 6 bytes gồm các trường như bên dưới SVTH: PHẠM VĂN VANG Trang 12 LUẬN VĂN TỐT NGHIỆP Chương 2 Mô hình phần cứng Bảng 2.6: Cấu trúc lệnh của SD Card [39 – 8] 0 7 1 47 46 Kích thước 1 1 6 32 Giá trị 0 1 X x x argument CRC7 Mô tả Start bit Transmittion bit [45- 40] [7 – 1] Vị trí bit Command index 1 End bit Một số lệnh thường gặp khi giao tiếp với Micro SD Card Bảng 2.7: Một... DAC_OUTx ≤ VREF+ SVTH: PHẠM VĂN VANG Trang 20 LUẬN VĂN TỐT NGHIỆP Chương 2 Mô hình phần cứng Độ lớn của điện áp ngõ ra: DOR: giá trị của thanh ghi dữ liệu Khi DAC Channelx (x =1 or 2) được kích hoặt chân tương ứng của mỗi kênh( PA4 hay PA5) sẽ được tự động nối đến chân DAC_OUTx của bộ chuyển đổi DAC Hình 2.13: Sơ đồ khối của bộ chuyển đổi DAC SVTH: PHẠM VĂN VANG Trang 21 LUẬN VĂN TỐT NGHIỆP Chương 2 Mô hình... SVTH: PHẠM VĂN VANG Trang 22 LUẬN VĂN TỐT NGHIỆP Chương 2 Mô hình phần cứng 2.3.4.3 Định dạng dữ liệu cho bộ DAC Tùy thuộc vào cấu hình được chọn, dữ liệu phải được ghi vào các thanh ghi như bên dưới: Single mode: 8- bit canh phải: đưa dữ liệu vào thanh ghi DAC_DHR8Rx[7 :0] bits (và dữ liệu được lưu trong thanh ghi DHRx[11:7] bits ) 12- bit canh trái: đưa dữ liệu vào thanh ghi DAC_DHR12Rx[15:4] bits (

Ngày đăng: 24/07/2016, 11:19

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