1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Bài giản môn điện tử số

286 169 0

Đ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

Thông tin cơ bản

Định dạng
Số trang 286
Dung lượng 17,38 MB

Nội dung

HỌC VIỆN CÔNG NGHỆ BƯU CHÍNH VIỄN THÔNG BÀI GIẢNG MÔN ĐIỆN TỬ SỐ Giảng viên: ThS Nguyễn Trung Hiếu Điện thoại/E-mail: 0916566268; dientusovn@gmail.com Bộ môn: Kỹ thuật điện tử - Khoa KTDT1 Học kỳ/Năm biên soạn: Học kỳ 2/2010-2011 Tài liệu tham khảo          Bài giảng Điện tử số - Nguyễn Trung Hiếu & Trần Thị Thúy Hà, Học viện CNBCVT Giáo trình Điện tử số - Trần Thị Thúy Hà & Đỗ Mạnh Hà, NXB Thông tin truyền thông 2009 Giáo trình Kỹ thuật số - Trần Văn Minh, NXB Bưu điện 2001 Cơ sở kỹ thuật điện tử số, Đại học Thanh Hoa, Bắc Kinh, NXB Giáo dục 1996 Kỹ thuật số, Nguyễn Thúy Vân, NXB Khoa học kỹ thuật 1994 Lý thuyết mạch logic Kỹ thuật số, Nguyễn Xuân Quỳnh, NXB Bưu điện 1984 Fundamentals of logic design, fourth edition, Charles H Roth, Prentice Hall 1991 Digital engineering design, Richard F.Tinder, Prentice Hall 1991 Digital design principles and practices, John F.Wakerly, Prentice Hall 1990 www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang NỘI DUNG  Chương Chương Chương Chương Chương Chương Chương www.ptit.edu.vn 1: 2: 3: 4: 5: 6: 7: Hệ đếm Đại số Boole phương pháp biểu diễn hàm Cổng logic Mạch logic tổ hợp Mạch logic Mạch phát xung tạo dạng xung Bộ nhớ bán dẫn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang HỆ ĐẾM www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang Nội dung  Biểu diễn số Chuyển đổi hệ đếm Số nhị phân có dấu Dấu phẩy động Một số loại mã nhị phân thông dụng www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang Biểu diễn số (1)  Nguyên tắc chung – Dùng số hữu hạn ký hiệu ghép với theo qui ước vị trí Các ký hiệu thường gọi chữ số Do đó, người ta gọi hệ đếm hệ thống số Số ký hiệu dùng số hệ ký hiệu r – Giá trị biểu diễn chữ khác phân biệt thông qua trọng số hệ Trọng số hệ đếm ri, với i số nguyên dương âm  Tên gọi, số ký hiệu số vài hệ đếm thông dụng Tên hệ đếm Số ký hiệu Cơ số (r) Hệ nhị phân (Binary) Hệ bát phân (Octal) Hệ thập phân (Decimal) Hệ thập lục phân (Hexadecimal) 0, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F 10 16 Chú ý: Cũng gọi hệ đếm theo số chúng VD: Hệ nhị phân= Hệ số 2, Hệ thập phân = Hệ số 10 www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang Biểu diễn số (2)  Biểu diễn số tổng quát: N  a n 1  r n 1   a1  r1  a  r  a 1  r 1   a  m  r  m m   a i  ri n 1  Trong số trường hợp, ta phải thêm số để tránh nhầm lẫn biểu diễn hệ Ví dụ: 3610 , 368 , 3616 www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang Hệ thập phân (1)  Biểu diễn tổng quát: N10  d n 1 10n 1   d1 101  d 100  d 1  101   d  m  10 m m   d i  10i n 1 Trong đó: – – – – N10 : biểu diễn theo hệ 10, d : hệ số nhân (ký hiệu hệ), n : số chữ số phần nguyên, m : số chữ số phần phân số  Giá trị biểu diễn số hệ thập phân tổng tích ký hiệu (có biểu diễn) với trọng số tương ứng  Ví dụ: 1265.34 biểu diễn số hệ thập phân: 1265.34  103   102  101   100  101   102 www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang Hệ thập phân (2)  Ưu điểm hệ thập phân: – Tính truyền thống người Đây hệ mà người dễ nhận biết – Ngoài ra, nhờ có nhiều ký hiệu nên khả biểu diễn hệ lớn, cách biểu diễn gọn, tốn thời gian viết đọc  Nhược điểm: – Do có nhiều ký hiệu nên việc thể thiết bị kỹ thuật khó khăn phức tạp www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang Hệ nhị phân (1)  Biểu diễn tổng quát: N  b n 1  2n 1   b1  21  b0  20  b 1  21   b  m   m m   bi  2i n 1 Trong đó: – – – – N : biểu diễn theo hệ 2, b : hệ số nhân lấy giá trị 1, n : số chữ số phần nguyên, m : số chữ số phần phân số  Hệ nhị phân gọi hệ số hai, gồm hai ký hiệu 1, số hệ 2, trọng số hệ 2n  Ví dụ: 1010.012 biểu diễn số hệ nhị phân 1010.012   23   22  1 21   00   21  1 2 www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang 10 My first RAM We can use these cells to make a x RAM Since there are four words, ADRS is two bits Each word is only one bit, so DATA and OUT are one bit each Word selection is done with a decoder attached to the CS inputs of the RAM cells Only one cell can be read or written at a time VIÊN: ThS NGUYỄN TRUNG HIẾU www.ptit.edu.vn Notice that the GIẢNG outputs BỘ MÔN: KTĐT - KHOA KTĐT1 Trang 272 Connecting outputs together In normal practice, it’s bad to connect outputs together If the outputs have different values, then a conflict arises The “C” in LogicWorks means “conflict.” The standard way to “combine” outputs is to use OR gates or muxes www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang 273 Those funny triangles The triangle represents a three-state buffer Unlike regular logic gates, the output can be one of three different possibilities, as shown in the table EN IN OUT 1 x Disconnected “Disconnected” means no output appears at all, in which case it’s safe to connect OUT to another output signal The disconnected value is also sometimes called high impedance or Hi-Z www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang 274 Connecting three-state buffers together You can connect several three-state buffer outputs together if you can guarantee that only one of them is enabled at any time The easiest way to this is to use a decoder! If the decoder is disabled, then all the three-state buffers will appear to be disconnected, and OUT will also appear disconnected If the decoder is enabled, then exactly one of its outputs will be true, so only one of the tri-state buffers will be connected and produce an output www.ptit.edu.vn The net result GIẢNG is we VIÊN: can ThS saveNGUYỄN some TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang 275 Bigger and better Here is the x RAM once again How can we make a “wider” memory with more bits per word, like maybe a x RAM? Duplicate the stuff in the blue box! www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang 276 A x RAM DATA and OUT are now each four bits long, so you can read and write four-bit words www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang 277 Bigger RAMs from smaller RAMs We can use small RAMs as building blocks for making larger memories, by following the same principles as in the previous examples As an example, suppose we have some 64K x RAMs to start with: –64K = 26 x 210 = 216, so there are 16 address lines –There are data lines 16 www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang 278 Making a larger memory We can put four 64K x chips together to make a 256K x memory For 256K words, we need ?? address lines www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang 279 Making a larger memory We can put four 64K x chips together to make a 256K x memory For 256K words, we need 18 address lines 16 –The two most significant address lines go to the decoder, which selects one of the four 64K x RAM chips –The other 16 address lines are shared by the 64K x chips The 64K x chips also share WR and DATA inputs This assumes the 64K x chips have three-state outputs www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang 280 Analyzing the 256K x RAM There are 256K words of memory, spread out among the 16 four smaller 64K x RAM chips When the two most significant bits of the address are 00, the bottom RAM chip is selected It holds data for the first 64K addresses The next chip up is enabled when the address starts with 01 It holds data for the second 64K addresses The third chip up holds data for the next 64K addresses The final chip contains the data VIÊN: ThS NGUYỄN TRUNG HIẾU www.ptit.edu.vn of the final 64KGIẢNG addresses BỘ MÔN: KTĐT - KHOA KTĐT1 8 Trang 281 Address ranges 16 11 1111 1111 1111 1111 (0x3ffff) to 11 0000 0000 0000 0000 (0x30000) 10 1111 1111 1111 1111 (0x2ffff) to 10 0000 0000 0000 0000 (0x20000) 01 1111 1111 1111 1111 (0x1ffff) to 01 0000 0000 0000 0000 (0x10000) www.ptit.edu.vn 00 1111 1111 1111 1111 (0x0ffff) to 00 0000 0000 0000 0000 (0x00000) GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang 282 Making a wider memory You can also combine smaller chips to make wider memories, with the same number of addresses but more bits per word How we create a 64K x 16 RAM from two 64K x chips? www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang 283 Making a wider memory You can also combine smaller chips to make wider memories, with the same number of addresses but more bits per word Here is a 64K x 16 RAM, created from two 64K x chips –The left chip contains the most significant bits of the data –The right chip contains the lower bits of the data 8 16 www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang 284 Summary A RAM looks like a bunch of registers connected together, allowing users to select a particular address to read or write Much of the hardware in memory chips supports this selection process: –Chip select inputs –Decoders –Tri-state buffers By providing a general interface, it’s easy to connect RAMs together to make “longer” and “wider” memories Next, we’ll look at some other types of memories We now have all the components we need to build our simple processor www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang 285 THẢO LUẬN THANK YOU www.ptit.edu.vn GIẢNG VIÊN: ThS NGUYỄN TRUNG HIẾU BỘ MÔN: KTĐT - KHOA KTĐT1 Trang 286 ... b : hệ số nhân lấy giá trị 1, n : số chữ số phần nguyên, m : số chữ số phần phân số  Hệ nhị phân gọi hệ số hai, gồm hai ký hiệu 1, số hệ 2, trọng số hệ 2n  Ví dụ: 1010.012 biểu diễn số hệ nhị...   Bài giảng Điện tử số - Nguyễn Trung Hiếu & Trần Thị Thúy Hà, Học viện CNBCVT Giáo trình Điện tử số - Trần Thị Thúy Hà & Đỗ Mạnh Hà, NXB Thông tin truyền thông 2009 Giáo trình Kỹ thuật số -... O : hệ số nhân (ký hiệu hệ), – n : số chữ số phần nguyên, – m : số chữ số phần phân số  Hệ gồm ký hiệu : 0, 1, 2, 3, 4, 5, Cơ số hệ Việc lựa chọn số xuất phát từ chỗ = 23 Do đó, chữ số bát phân

Ngày đăng: 27/08/2017, 14:21

TỪ KHÓA LIÊN QUAN

w