Главная » Просмотр файлов » Микроконтроллер Motorola 68HC11

Микроконтроллер Motorola 68HC11 (1086181), страница 19

Файл №1086181 Микроконтроллер Motorola 68HC11 (Микроконтроллер Motorola 68HC11) 19 страницаМикроконтроллер Motorola 68HC11 (1086181) страница 192018-01-12СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 19)

Any other values for SCP[1:0] are not decoded in the prescaler and theresults are unpredictable. Refer to the SCI baud rate generator block diagrams.Table 7-1 Baud Rate Prescaler SelectsPrescaler Selects7Crystal Frequency (MHz)SCP2SCP1SCP0Divide InternalClock By4.04.91528.08.388612.00001625007680012500013107218750000132083325600416674369162500010415625192003125032768468750111348005907960010082144231003916021969320533614808101Do Not Use110Do Not Use111Do Not UseRCKB — SCI Baud Rate Clock Check (Test)SCR[2:0] — SCI Baud Rate SelectsSelects receiver and transmitter bit rate based on output from baud rate prescalerstage. Refer to the SCI baud rate generator block diagrams.Table 7-2 Baud Rate SelectsSCR[2:0]DividePrescalerBy00000101001110010111011112481632641281310721310726553632768163848192409620481024Highest Baud Rate(Prescaler Output from Previous Table)768003276819200768003276819200384001638496001920081924800960040962400480020481200240010246001200512300600256150480048002400120060030015075—The prescaler bits, SCP[2:0], determine the highest baud rate, and the SCR[2:0] bitsselect an additional binary submultiple (÷1, ÷2, ÷4, through ÷128) of this highest baudrate.

The result of these two dividers in series is the 16X receiver baud rate clock. TheSCR[2:0] bits are not affected by reset and can be changed at any time, although theyshould not be changed when any SCI transfer is in progress.Figure 7-3 and Figure 7-4 illustrate the SCI baud rate timing chain. The prescaler select bits determine the highest baud rate. The rate select bits determine additional divide by two stages to arrive at the receiver timing (RT) clock rate.

The baud rate clockis the result of dividing the RT clock by 16.MOTOROLA7-10SERIAL COMMUNICATIONS INTERFACEM68HC11 E SERIESTECHNICAL DATAEXTALXTALINTERNAL BUS CLOCK (PH2)OSCILLATORANDCLOCK GENERATOR(÷4)÷3÷4÷13SCP[1:0]0:0E0:11:01:1ASSCR[2:0]0 :0:0÷20 :0:1÷20 :1:0÷20 :1:17÷16÷21 :0:0÷21 :0:1÷21 :1:0÷21 :1:1SCITRANSMITBAUD RATE(1X)SCIRECEIVEBAUD RATE(16X)SCI BAUD GENERATORFigure 7-3 SCI Baud Rate Generator Block DiagramM68HC11 E SERIESTECHNICAL DATASERIAL COMMUNICATIONS INTERFACEMOTOROLA7-11EXTALXTALINTERNAL BUS CLOCK (PH2)OSCILLATORANDCLOCK GENERATOR(÷4)÷3÷4÷13÷ 39SCP[2:0] *0 :0:0E0 :0:10 :1:00:1:11 :0:0ASSCR[2:0]0 :0:07÷20 :0:1÷20 :1:0÷20 :1:1÷16÷21 :0:0÷21 :0:1÷21 :1:0÷21 :1:1SCITRANSMITBAUD RATE(1X)SCIRECEIVEBAUD RATE(16X)* SCP2 IS PRESENT ONLY ON MC68HC(7)11E20.SCI BAUD GENERATOR /39Figure 7-4 MC68HC(7)11E20 SCI Baud Rate Generator Block Diagram7.7 Status Flags and InterruptsThe SCI transmitter has two status flags.

These status flags can be read by software(polled) to tell when the corresponding condition exists. Alternatively, a local interruptenable bit can be set to enable each of these status conditions to generate interruptrequests when the corresponding condition is present. Status flags are automaticallyset by hardware logic conditions, but must be cleared by software, which provides aninterlock mechanism that enables logic to know when software has noticed the statusindication.

The software clearing sequence for these flags is automatic — functionsthat are normally performed in response to the status flags also satisfy the conditionsof the clearing sequence.MOTOROLA7-12SERIAL COMMUNICATIONS INTERFACEM68HC11 E SERIESTECHNICAL DATATDRE and TC flags are normally set when the transmitter is first enabled (TE set toone).

The TDRE flag indicates there is room in the transmit queue to store anotherdata character in the TDR. The TIE bit is the local interrupt mask for TDRE. When TIEis zero, TDRE must be polled. When TIE and TDRE are one, an interrupt is requested.The TC flag indicates the transmitter has completed the queue. The TCIE bit is the local interrupt mask for TC. When TCIE is zero, TC must be polled when TCIE is oneand TC is one, an interrupt is requested.Writing a zero to TE requests that the transmitter stop when it can.

The transmittercompletes any transmission in progress before actually shutting down. Only an MCUreset can cause the transmitter to stop and shut down immediately. If TE is written tozero when the transmitter is already idle, the pin reverts to its general-purpose I/Ofunction (synchronized to the bit-rate clock).

If anything is being transmitted when TEis written to zero, that character is completed before the pin reverts to general-purposeI/O, but any other characters waiting in the transmit queue are lost. The TC and TDREflags are set at the completion of this last character, even though TE has been disabled.7.7.1 Receiver FlagsThe SCI receiver has five status flags, three of which can generate interrupt requests.The status flags are set by the SCI logic in response to specific conditions in the receiver. These flags can be read (polled) at any time by software. Refer to Figure 7-5,which shows SCI interrupt arbitration.When an overrun takes place, the new character is lost, and the character that was inits way in the parallel RDR is undisturbed. RDRF is set when a character has beenreceived and transferred into the parallel RDR.

The OR flag is set instead of RDRF ifoverrun occurs. A new character is ready to be transferred into RDR before a previouscharacter is read from RDR.The NF and FE flags provide additional information about the character in the RDR,but do not generate interrupt requests.The last receiver status flag and interrupt source come from the IDLE flag. The RxDline is idle if it has constantly been at logic one for a full character time.

The IDLE flagis set only after the RxD line has been busy and becomes idle, which prevents repeated interrupts for the whole time RxD remains idle.M68HC11 E SERIESTECHNICAL DATASERIAL COMMUNICATIONS INTERFACEMOTOROLA7-137BEGINFLAGRDRF = 1?YNOR = 1?Y7YTIE = 1?RE = 1?YTE = 1?YNYTCIE = 1?NIDLE = 1?YNNNTC = 1?YNNTDRE = 1?RIE = 1?YNYNYILIE = 1?NRE = 1?YNNOVALID SCI REQUESTVALID SCI REQUESTINT SOURCE RESFigure 7-5 Interrupt Source Resolution Within SCIMOTOROLA7-14SERIAL COMMUNICATIONS INTERFACEM68HC11 E SERIESTECHNICAL DATASECTION 8 SERIAL PERIPHERAL INTERFACEThe serial peripheral interface (SPI), an independent serial communications subsystem, allows the MCU to communicate synchronously with peripheral devices, suchas transistor-transistor logic (TTL) shift registers, liquid crystal (LCD) display drivers,analog-to-digital converter subsystems, and other microprocessors.

The SPI is alsocapable of inter-processor communication in a multiple master system. The SPI system can be configured as either a master or a slave device. When configured as amaster, data transfer rates can be as high as one-half the E clock rate (1.5 Mbits persecond for a 3-MHz bus frequency). When configured as a slave, data transfers canbe as fast as the E clock rate (3 Mbits per second for a 3-MHz bus frequency).8.1 Functional DescriptionThe central element in the SPI system is the block containing the shift register and theread data buffer. The system is single buffered in the transmit direction and doublebuffered in the receive direction.

This means that new data for transmission cannot bewritten to the shifter until the previous transfer is complete; however, received data istransferred into a parallel read data buffer so the shifter is free to accept a second serial character. As long as the first character is read out of the read data buffer beforethe next serial character is ready to be transferred, no overrun condition occurs. A single MCU register address is used for reading data from the read data buffer and forwriting data to the shifter.The SPI status block represents the SPI status functions (transfer complete, write collision, and mode fault) performed by the serial peripheral status register (SPSR). TheSPI control block represents those functions that control the SPI system through theserial peripheral control register (SPCR).Refer to Figure 8-1, which shows the SPI block diagram.M68HC11 E SERIESTECHNICAL DATASERIAL PERIPHERAL INTERFACEMOTOROLA8-18÷2MSBDIVIDER÷4 ÷16 ÷32LSB8/16-BIT SHIFT REGISTERSMMISOPD2MSMOSIPD3READ DATA BUFFERCLOCKSPI CLOCK (MASTER)SCLOCKLOGICSCKPD4MSPR0SSPD5MSTRSPEDWOMSPR1SELECTPIN CONTROL LOGICINTERNALMCU CLOCK8MSTRSPESPR1SPR0MSTRCPOLCPHASPIESPEDWOMMODFSPIFWCOLSPI CONTROL8SPI STATUS REGISTERSPI CONTROL REGISTER8SPI INTERRUPTREQUEST8INTERNALDATA BUSSPI BLOCK 2SPRFigure 8-1 SPI Block Diagram8.2 SPI Transfer FormatsDuring an SPI transfer, data is simultaneously transmitted and received.

A serial clockline synchronizes shifting and sampling of the information on the two serial data lines.A slave select line allows individual selection of a slave SPI device; slave devices thatare not selected do not interfere with SPI bus activities. On a master SPI device, theselect line can optionally be used to indicate a multiple master bus contention. Referto Figure 8-2.MOTOROLA8-2SERIAL PERIPHERAL INTERFACEM68HC11 E SERIESTECHNICAL DATASCK CYCLE #12345678SCK (CPOL = 0)SCK (CPOL = 1)SAMPLE INPUTMSB(CPHA = 0) DATA OUT654321LSBSAMPLE INPUTMSB(CPHA = 1) DATA OUT654321LSBSS (TO SLAVE)SLAVE CPHA=1 TRANSFER IN PROGRESS3MASTER TRANSFER IN PROGRESS214SLAVE CPHA=0 TRANSFER IN PROGRESS51.

Характеристики

Тип файла
PDF-файл
Размер
962,52 Kb
Тип материала
Высшее учебное заведение

Список файлов учебной работы

Свежие статьи
Популярно сейчас
Как Вы думаете, сколько людей до Вас делали точно такое же задание? 99% студентов выполняют точно такие же задания, как и их предшественники год назад. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6418
Авторов
на СтудИзбе
307
Средний доход
с одного платного файла
Обучение Подробнее