Renesas Asynchronous SH7145F manual

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

Go to page of

A good user manual

The rules should oblige the seller to give the purchaser an operating instrucion of Renesas Asynchronous SH7145F, along with an item. The lack of an instruction or false information given to customer shall constitute grounds to apply for a complaint because of nonconformity of goods with the contract. In accordance with the law, a customer can receive an instruction in non-paper form; lately graphic and electronic forms of the manuals, as well as instructional videos have been majorly used. A necessary precondition for this is the unmistakable, legible character of an instruction.

What is an instruction?

The term originates from the Latin word „instructio”, which means organizing. Therefore, in an instruction of Renesas Asynchronous SH7145F one could find a process description. An instruction's purpose is to teach, to ease the start-up and an item's use or performance of certain activities. An instruction is a compilation of information about an item/a service, it is a clue.

Unfortunately, only a few customers devote their time to read an instruction of Renesas Asynchronous SH7145F. A good user manual introduces us to a number of additional functionalities of the purchased item, and also helps us to avoid the formation of most of the defects.

What should a perfect user manual contain?

First and foremost, an user manual of Renesas Asynchronous SH7145F should contain:
- informations concerning technical data of Renesas Asynchronous SH7145F
- name of the manufacturer and a year of construction of the Renesas Asynchronous SH7145F item
- rules of operation, control and maintenance of the Renesas Asynchronous SH7145F item
- safety signs and mark certificates which confirm compatibility with appropriate standards

Why don't we read the manuals?

Usually it results from the lack of time and certainty about functionalities of purchased items. Unfortunately, networking and start-up of Renesas Asynchronous SH7145F alone are not enough. An instruction contains a number of clues concerning respective functionalities, safety rules, maintenance methods (what means should be used), eventual defects of Renesas Asynchronous SH7145F, and methods of problem resolution. Eventually, when one still can't find the answer to his problems, he will be directed to the Renesas service. Lately animated manuals and instructional videos are quite popular among customers. These kinds of user manuals are effective; they assure that a customer will familiarize himself with the whole material, and won't skip complicated, technical information of Renesas Asynchronous SH7145F.

Why one should read the manuals?

It is mostly in the manuals where we will find the details concerning construction and possibility of the Renesas Asynchronous SH7145F item, and its use of respective accessory, as well as information concerning all the functions and facilities.

After a successful purchase of an item one should find a moment and get to know with every part of an instruction. Currently the manuals are carefully prearranged and translated, so they could be fully understood by its users. The manuals will serve as an informational aid.

Table of contents for the manual

  • Page 1

    APPLICATION NOTE REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 1 of 17 SH7145F Asynchronou s Serial Data Transmission/Re ception Summary The SH7144 se ries is a sin gle-chip m icroprocessor based on t he SH-2 RISC (Reduced In struction Set Com puter) CPU core and inte grating a num ber of peripheral funct ions. This application note describes asynchr[...]

  • Page 2

    SH7145F Asynchronous Serial Da ta Transmission/ Reception REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 2 of 17 1. Specifications As shown in figure 1, asynchronous serial data transmission is performed using channel 1 (ch1) of the SCI module of the SH7145F. In th is task example 3 bytes of se rial data are received by the SH7145, and th e receive da[...]

  • Page 3

    SH7145F Asynchronous Serial Da ta Transmission/ Reception REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 3 of 17 2 Functions Used In this task example the SCI (Serial Communication Interface) is used to perform asynchronous serial data transmission /reception. Figure 2 shows a block diagram of channel 1 (ch1) of the SCI modul e. T he func tio ns of t [...]

  • Page 4

    SH7145F Asynchronous Serial Da ta Transmission/ Reception REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 4 of 17 • On-C hip Pe rip her al Clo ck P φ This is the reference clock for ope ration of on-chip peripheral functions. T he clock signal is generated b y a clock oscil lator. • Receive Shift Register (RSR_1) This register is u sed to receive [...]

  • Page 5

    SH7145F Asynchronous Serial Da ta Transmission/ Reception REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 5 of 17 • Bit Rate Register ( BRR_1 ) This 8 -bit r egiste r is use d to a dj ust the bi t rate . T he SCI ha s indep end ent b aud r ate gene rat ors for the individu al channels, allo wing differen t bit rates to be set for each. See the hardwa[...]

  • Page 6

    SH7145F Asynchronous Serial Da ta Transmission/ Reception REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 6 of 17 3. Operation Figure 3 s hows the operat ion of asy nchron ous mode data t ransmiss ion in the task exam ple. To help explain figure 3, table 3 lists the software and hard ware processing that is perfor med. 0 0 (1) (2) (3) (4) (5) (6) (7) ([...]

  • Page 7

    SH7145F Asynchronous Serial Da ta Transmission/ Reception REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 7 of 17 Table 3 Processing Software Processing Hardware Process ing (1) — RSR_1 receives seri al data and transfers it to RDR_1 (2) — Set RDRF flag in SSR_1 to 1 (3) Read data from RDR_1 (4) Clear RDRF flag in SSR_1 to 0 ( 5 ) W r i t er e c e [...]

  • Page 8

    SH7145F Asynchronous Serial Da ta Transmission/ Reception REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 8 of 17 4. Soft w are (1) Module Descriptions Table 4 lists the mod ules used in the task e xample. Table 4 Module Descriptions Module Label Function Main routine main Calls module s SCI routine init_sci Initial sett ings of SCI 1 Receive routi ne [...]

  • Page 9

    SH7145F Asynchronous Serial Da ta Transmission/ Reception REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 9 of 17 Table 6 On-Chip Register Descrip tions Register Bit Set Value Function MSTCR1 MSTP17 0 Module standby c ontrol register 1 SCI1 s tandby control bit Standby cancelled when MSTP17 = 0 SCR_1 H'70 Serial c ontrol regist er 1 (SCI_1) Transm[...]

  • Page 10

    SH7145F Asynchronous Serial Da ta Transmission/ Reception REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 10 of 17 Register Bit Set Value Function SMR_1 MP 0 Multiprocess or mode (enabled in asynchronous mode onl y) Multiprocess or communication disabl ed when 0 CKS1 CKS2 0 0 Clock s elect 1, 0 When val ue is 00, P φ cl ock sel ected using on-c hip ba[...]

  • Page 11

    SH7145F Asynchronous Serial Da ta Transmission/ Reception REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 11 of 17 5. Flowcharts (1) Main Routine main() init_sci() rcv_sci() rcv_sci() rcv_sci() Initialize SCI module Receive 1st byte of data Receive 2nd byte of data Receive 3rd byte of data[...]

  • Page 12

    SH7145F Asynchronous Serial Da ta Transmission/ Reception REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 12 of 17 (2) SCI1 Initialize Routine No Ye s Cancel SCI1 module standby status Clear to 0 bits TIE, RIE, TE, RE, MPIE, and TEIE in SCR_0 Select on-chip clock as clock source using CKE1 and CKE0 in SCR_0 Using SMR_1, select asynchronous mode, 8 data[...]

  • Page 13

    SH7145F Asynchronous Serial Da ta Transmission/ Reception REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 13 of 17 (3) Data Re ceive Rou tine No Ye s Read receive data from RDR_1 and store it in on-chip RAM Transmit receive data without modification Clear RDRF flag in SSR_1 to 0 Wait until RDR_1 finishes receiving data RTE rcv_sci() (4) Data Transfer R[...]

  • Page 14

    SH7145F Asynchronous Serial Da ta Transmission/ Reception REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 14 of 17 6. Program List ing /**************************************************************/ /* SH7145F Application Note */ /* */ /* Function */ /* :SCI1 */ /* */ /* External input clock : 12.5MHz */ /* Internal CPU clock : 50MHz */ /* Internal pe[...]

  • Page 15

    SH7145F Asynchronous Serial Da ta Transmission/ Reception REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 15 of 17 Function : init_sci Operation : Initialize serial (sci1) Asynchronous receive operation -Data : 8bit -Stop bit : 1bit -Parity bit : No **************************************************************/ void init_sci(void) { unsigned long i; P[...]

  • Page 16

    SH7145F Asynchronous Serial Da ta Transmission/ Reception REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 16 of 17 P_SCI1.SSR_1.BIT.RDRF = 0; /* Clear RDRF */ trans_sci(Rev_data[rev_count]); /* Transmit receive data */ rev_count++ ; /* Increment storage address */ return(rev_count); } /*******************************************************************[...]

  • Page 17

    SH7145F Asynchronous Serial Da ta Transmission/ Reception REJ06B0357-0 100O/Rev.1.0 0 March 2004 Page 17 of 17 1. These materials are intended as a reference to assist our customers in the selection of the Renesas Technology Corp. product best suited to the customer's application; they do not convey any license under any intellectual property [...]