Download as pdf
Download as pdf
You are on page 1of 86
UNIT II EMBEDDED C PROGRAMMING Memory And I/O devices Interfacing - programming Embedded systems in C- Need For RTOS - Multiple Tasks and Processes - Context Switching - Priority Based Scheduling Policies. 2.1. INTRODUCTION Before the C language was introduced, developers used basic programming (assembly-level) to develop embedded applications. These assembly level programming were not portable in nature, which acted as a restriction for the developers, as they were not able to fully engage in the process of the development of embedded applications. With the improvements in the embedded programming language many new programming languages were introduced such as C, BOCOL and Pascal, these relatively newer languages helped in overcoming many problems that were faced by ¢ developers when working with assembly level programming. One of the most noticeable breakthroughs in the development of embedded rogramming was seen with the introduction of the C programming language. There fe many advantages that can be exploited by developers when developing embedded plications such as the embedded ¢ programming provides portability and is easy to ork with due to its simplicity. Embedded C programming is more reliable and scalable when compared to embly level programming. Embedded systems are able to perform various ‘igned tasks with the help of embedded c programming, as the programming ides the processor of the respective embedded systems. Embedded C language is of the most widely used embedded programming languages for programming ficrocontrollers. 2.2. MEMORY INTERFACING The 8051 microcontroller is a popular microcontroller used in various applications, ranging from small embedded systems to larger industrial applications, While the 8051 has a limited amount of internal memory, it is possible to extend the memory capacity by interfacing it with external memory devices. External memory interfacing in 8051 microcontroller involves connecting external memory devices such as RAM and ROM to the microcontroller to provide additional memory space. This allows the microcontroller to execute larger and more complex Programs, store more data, and perform more complex operations. External memory interfacing typically involves connecting the memory devices to the microcontroller through a data bus and an address bus. The data bus is used to transfer data between the microcontroller and the memory device, while the address bus is used to select a specific memory location in the memory device. To interface with external memory, the 8051 microcontroller uses dedicated pins such as ALE (Address Latch Enable), PSEN (Program Store Enable), and RD (Read) and WR (Write) signals. These signals are used to control the flow of data between the microcontroller and the External memory device. For minimal memory applications, the 8051 has internal data and code memory. In such a position. For certain applications, this memory capacity will not be adequate. To expand the memory space of the 8051 microcontroller, we must bind external ROM/EPROM and RAM. We also understand that ROM serves as program memory and RAM serves as data memory. Let’s take a look at how the 8051 accesses these memories. 2.2.1. Why need External Memory Interfacing in 8051 Microcontroller? External memory interfacing is necessary in the 8051 microcontrollers for several reasons: Limited internal memory: % The 8051 microcontroller has a limited amount of internal memory, including 128 bytes of RAM and 4KB of on-chip ROM. This memory may not be sufficient for some applications that require larger program memory or more data storage, ed C Programming (23) er programs: * For applications that require larger programs, such as complex algorithms external memory interfacing can provide the necessary program memory space to store these programs fa storage: multiple functions, Applications that require the storage of large amounts of data, such as data alysis, may require external memory interfacing to store logging or data an; the data. xibility: External memory interfacing provides greater flexibility in the design of embedded systems, allowing for customization and adaptability to meet specific application requirements st-effective: * External memory devices such as RAM and ROM are relatively inexpensive, making it cost-effective to interface them with the microcontroller instead of using more expensive on-chip memory. iv EXTERNAL PROGRAM MEMORY : “+ The program fetches to addresses 0000H through OFFFH are directed to the internal ROM in the 8051 when the EA pin is attached to Vec, and program fetches to addresses 1000H through FFFFH are directed to the external ROM/EPROM. “ When the EA pin is grounded, all addresses fetched by the program (0000H to FFFFH) are led to it. “+ ROM/EPROM that is external to the device. As seen in Fig. 2.1, the PSEN signal is used to trigger output ¢ external ROM/EPROM. “Port 0 is used as a multiplexed address/bus, as seen in Fig2.2. In the initial T-cycle, it provides a lower order 8-bit address, and later it is used as a data bus, The external latch and the ALE signal provided by the 8051 are used to latch the 8-bit address. The PSEN signal is used to activate output an external ROM/EPROM, as seen in Fig.2.1, —+— EA=0 Access }—> 60 kB External 64 kB External ——-or——+ 1000H OFFFH a 4 kB External Sar EA=1 Access 0000H 0000H Fig. 2.1. The 8051 program memory SS P1 Po ROM/EROM 8051 ALE { % As seen in Fig.2.2, port 0 is used as a mult a lower-order 8-bit address in the first T-c bus. The 8-bit address is latched usin signal given by the 8051, ALE Se pe Pano __) ADA > —Q0SERT DD ROATY ci 15 Port2 A8-A15, AGA Fig. 2.3. Timing waveform for external data memory write cycle iplexed address/bus. It supplies ycle and later serves as a data ig the external latch and the ALE ss dded C Programming 0033H | 002B H Serial Port 0023 H Timer 1 External interrupt 1 001BH Timer 0 ma BH External interrupt 0 ae H Reset 0000 H Fig. 2.4. Interrupt / vector locations in the lower part of program memory [, External Interrupt 1 is 0013H, Timer 1 is 001BH, and so on. If an interrupt is to be used, the s the interrupt. If the For External Interrupt 0 is 0003H, Timer 0 is 0OOBH. operation routine for it must be in the same place a: interrupt isn’t used, the service location may be used as general-purpose program memory. ructions to Access External ROM/ Program Memory : his table is explaining the instructions to access ext ory. —— oe eral ROM/program Mnemonic Operation VC A, @ A+DPTR Copy the contents of the external ROM address formed by adding A and the DPTR, to A VC A,@A+PC This operation will do copy This operation contents of the external ROM address formed by adding A and the PC, to A. 3. EXTERNAL MEMORY INTERFACING : “Up to 64 k-bytes of additional data memory can be addressed by the 8051. The external data memory is accessed using the “MOVX” instruction. The 8051’s internal data memory is split into three sections: Lower 128 bytes, Upper 128 bytes, and SFRs. While they are physically distinct bodies, the upper addresses and SFRs share the same block of address space, 80H by FFH. (20] iad Std toms onto The upper address space is only accessible via indirect Addressiy : , ing, and SERs are only accessible via direct addressing, as seen in Higher rc ress n be reached using either direct oF indirect space, on the other hand, addressing Internal Data Mevty External Data Memory FPP -consible by indirect Accessible hy indirect addressing only | addressing Mode \ 64 kB External —— —_———. ——a~no—— Accessible by direct indirect (00001 Fig. 2.5. A map of the 8051 data memory . + Pip.2.6 (a) and (+) show the timing waveform for external data memory read and write eycles, respectively. aS Ri ee A a 15 pie >—<___ AS-IS From DPH SC AtA Fig. 2.6. (a) Timing waveform for External data memory read ied C Programming (237) . INSERT IN o A8-A15 From DPH ‘A8~-A15 from PCH Fig. 2.6. (b) Timing waveform for external data memory instructions to Access External Data Memory : The Table explains the instruction to access external data memory. Mnemonic Operation In this operation, it will copy the contents of the external MOVX A, @Ry GMP __| address in Rp to A. OVX A.@ DPTR_| Copy the contents of the external address in DPTR to A. MOVX @Rp. A __| Copy data from A to the external address in Rp MOVX DPTR, A __| Copy data from A to the external address in DPTR. 2.2.4. IMPORTANT POINTS TO REMEMBER IN ACCESSING EXTERNAL MEMORY: he Case of accessing external memory, All external data moves with external or ROM involve the A register. While accessing external memory, R can ddress 256 bytes and DPTR can address 64 k-bytes MOV X instruction is used to external RAM or 1/O addresses. ' must be noted that while the Program counter(PC) will be used then to access mal ROM, it will be incremented by 1 (to point to the next instruction) before it added to A to form the physical address of external ROM. 2.2.5. MEMORY ADDRESS DECODING: We know that read/write memories consist of an array of registers, in which each "egister has a unique address: The size of the memory is N*M, where N is the Number of registers and M is the word length, in a number of bits, S —————— Example-1 If memory is having 12 address lines and 8 data lines, then Humber of registers/memory locations = 2°N = 2" =4 096 Word length = Mbit = 8-bit. Example-2 If the memory has 8192 memory locations, then it has 13 address lines The Table summarizes the memory capacity and address lines required for memory interfacing, | Memory Capacity Address Line Required |__1 K = 1024 memory locations 10 |__2K=2048 memory locations ul | aK a086 menor) ncaa 12 |__8K= 8192 memory locations 13, |__16K = 16384 memory locations 14 |__32K = 32768 memory locations 15, |__64 K = 65536 memory locations 16 % The memory chip has 11 address lines A10-A0, one chip pick (CS), and two control lines, as seen in the table. To allow the output buffer, press RD, and to enable the input buffer, press WR. The address lines are decoded using the internal decoder. It has a total of 12 address blocks. One chip pick (CS) and one read control signal (A11-A0). EPROM does not need the (WR) signal since it is a read-only memory. Memory and 1/0 modules are used in the microprocessor/microcontroller framework. Since the data, address, and control buses are shared by all devices, the microprocessor can only communicate (read/write) with one device at a time. It is essential to decoding the address from the microprocessor / microcontroller in order to connect with memory or I/O devices. The strategies for decoding addresses are described in the following section. The memory interfacing requires to following components as folloWS- 1. Select the chip, > nhedded C Programming 2. Identify the register, 3, Enable the appropriate buffer, 2.2.6. ADDRESS DECODING TECHNIQUES: Absolute decoding/Full decoding + Linear decoding/Partial decoding Absolute decoding In this technique, all the higher address lines are decoded to select the memory and the memory chip is chosen only for the logic levels defined in these high- address lines and no other logic levels will select the chip. In massive memory ctures, this addressing strategy is commonly used. Memory Map Ais | Ave | As] Atz | An | Aw | As | As | Ar | Ac | As | Av | As | Az | At | Ao | address | o lo Jo Jo |o Jo Jo Jo Jo Jo Jo Jo Jo Jo Jo Jo | oooor | 1}. | a | OFFH near decoding & Individual high-order address lines can be used to pick memory chips in eliminating the need for hardware for decoding logic. compact systems, Linear decoding is the term for this method 2.10 i, The addressing of RAM using the linear encoding technique hee, F Figure 10. Partial decoding is another name for this process, It lowers the cost of encoding and circuitry, but it has the disadvantage a requiring multiple addresses (shadow addresses), : After inversion, A is a line attached to the chip select signal of the EPROM and then to the chip select signal of the RAM. As a result, EPROM is selected when the status of A line is “empty,” and RAM is selected when the status of the A15 line is “one.” Since the other address lines aren’t used to generate chip pick signals, their status isn’t taken into account. Memory Map Memory | Ais | Ave | Ars Ai} An | Aw | As | A} Ar | As | As | Ay ICs As} Ar] Ai | Ao | address Stating }o |x |x |x address of | EPROM End Oo |x |x Address of EPROM 1] | | osFrH See |* |% | | 12 [oil on oil ol ono ote iaan esis address of RAM o Foon End O |x fe fx Address of RAM 1 | 1 | 83FFH IN 8051 MICROCONTROLLER: rise when. interfacing external memory with the issues include: 2.2.7. ISSUES IN EXTERNAL MEMORY INTERFACING. There are several issues that can a 8051 microcontroller. Some common * Timing: The timing of the signals that control th accurate, or it can lead to errors in data t 0 Ere ¢ external memory access must be ransfer or program executi 4 edded C Programming — (2.11) ference: Interference oe from external sources such as electromagnetic interference (EMI) or radio frequency interference (RFI) can cause orn errors or data corruption in the memory access, al integrity: The signal integrity of the address and data lines must be maintained to ensure accurate data transfer between the microcontroller and the memory device. external ress decoding: The external memory devices must be properly decoded so that the correct memory location is accessed, Incorrect address decoding can lead to data corruption or program errors, er supply: ** The external memory devices must be powered properly to ensure stable and reliable memory access. patibility: ‘+ The external memory devices used for interfacing must be compatible with the microcontroller, including their operating voltage, timing requirements, and interface protocol. uit design: ‘+ Proper circuit design is required to ensure that the external memory devices are interfaced correctly with the microcontroller and other components in the system. V/O DEVICE INTERFACING put-Output Device Interface is used as method which helps in transferring of mation between the internal storage devices ie. memory and the external heral device. A peripheral device is that which provide input and output for the puter, it is also called Input-Output devices. or Example: A keyboard and mouse provide Input to the computer are called it devices while a monitor and printer that provide output to the computer are aaa) called output devices. Just like come peripheral devices which are Fig. 2.7. Input-Output Device Interface In micro-computer base system, the only purpose of peripheral devices is just to provide special communication links for the interfacing them with the CPU. To resolve the differences between peripheral devices and CPU, there is a special need for communication links. The major differences are as follows: 1. The nature of peripheral devices is electromagnetic and electro- mechanical. The nature of the CPU is electronic. There is a lot of difference in the mode of operation of both peripheral devices and CPU. 2. There is also a synchronization mechanism because the data transfer rate of peripheral devices are slow than CPU. 3. In peripheral devices, data code and formats are differ from the format in the CPU and memory. 4. The operating mode of peripheral devices are different and each may be controlled so as not to disturb the operation of other peripheral devices connected to CPU. There is a special need of the additional hardware to resolve the differences between CPU and peripheral devices to supervise and synchronize all input and output devices. Functions of Input-Output Interface: 1. It is used to synchronize the operating speed of CPU with respect fo input output devices. bedded C Programming 2.13 2. It selects the input-output device which is ie a i ‘ ci of the input-output device, propriate for the interpretation {tis capable of providing signals like control and timing signals. 4. In this data buffering can be possible through data bus. 5. There are various error detectors, 6, It converts serial data into parallel data and vice-versa. It also convert digital data into analog signal and vice-versa. 3.1. LCD INTERFACING. Nowadays the LCD is finding widespread use by replacing LEDs. This is due to e following reasons. (i) The declining prices of LCD’s. (ii) The ability to display numbers, characters and the graphics. y grap! iii) Incorporation of a refreshing controller into the LCD. (iv) Easy of programming for characters and graphics. D Pin Descriptions , Veg and Veg Voc and Vgs provide + SV and ground respectively. Vez is used for trolling the LCD contrast. - Register Select are two very important registers inside the LCD. The RS pin is used for ir selection. If RS = 0, the instruction command code register is selected, allowing the user to d a command such as clear display, ister is selected, allowing the use cursor at home, etc., di i r to send data to be , the data regi - Read/Write R/W input allows the user it. R/W = 1 when reading; to write information to the LCD or read information R/W =0 when writing. ETI TE Embedded DB; DB. DBs DB, DBs DB, DB; Fig. 2.8, LCD Pins E-Enable The enable pin is used by the LCD to latch information presented to its data pins. When data is supplied to data pins, a high-to-low pulse must be applied to this pin in order for the LCD to latch in the data present at the data pins. This pulse must bea minimum of 4Sons wide. DBg - DB7 i The 8-bit data pins, DBg — DB7 are used to send information to the LCD or read the contents of the LCD’s internal registers. To display letters and numbers, we send ASCII codes for the letters A-Z and numbers 0-9 to these pins while making RS =1. , There are also instruction command codes that can be sent to the LCD to clear the display or force the cursor to the home position or blink the cursor. The instruction command codes are listed below. Code (Hex) | _ Command to LCD Instruction Register Clear Display Screen. Return Home. Decrement Cursor (shift cursor to left). Increment Cursor (shift cursor to right). Shift Display Right. Shift To Display Left. Display OFF, Cursor OFF. i celafufalelrof— fnbedded C Programming 2.15 | Code (Hex) | Command to LCD Instruction Register _ | Display OFF, Cursor ON. __[ Display ON, cursor OFF. Shift Cursor position to left. Shift C c Sar ines and 5 x 7 matri: We also use RS = 0 to check the busy flag bit to see if the LCD is ready to receive formation. The busy flag is DB, and can be read when R/W = 1 and S=0. ending commands and data to LCDs with a time delay To send any of the commands to the LCD, make pin RS =O. For data, make RS = - Then send a high-to-low pulse to the E pin to enable the internal latch of the LCD. alls a time delay before sending next data command P1.0 - P1.7 are connected to LCD data pins DO - D7 ; P2.0 is connected to RS pin of LCD ; P2.1 is connected to R/W pin of LCD P2.2 is connected to E pin of LCD. ORG OH MOV A.#38H sinit. LCD 2 lines, 5 x 7 matrix ACALL COMNWRT ACALL DELAY scall command subroutine sgive LCD some time MOV A.#OEH sdisplay on, cursor on ACALL COMNWRT scall command subroutine ACALL DELAY sgive LCD some time Moy A4,#01 sclear LCD ACALL COMNWRT scall command subroutine ACALL DELAY sgive LCD some time MOV A, #06H sshift cursor right ACALL COMNWRT ;call command subroutine ACALL DELAY sgive LCD some time pte MoV ACALL COMNWRT “ASAE ACALL DELAY MOV AHN" ACALL DATAWRT ACALL DELAY MOV A#O' ACALL DATAWRT SIMP AGAIN MOV. P1,A SETB 2.0 CER es Poi SETB 2.2 ACALL DELAY CLR P22 RET MOV PIA SETB P20 CLR P21 SETB P22 ACALL DELAY CLR P22 RET MOV R3,#50 MOV R4, 4255 DJNZ R4,HERE DJNZ R3 ,HERE2 RET END ycursor at line L.pos, 4 scall command subroutine sgive LCD some time sdisplay letter N seal display subroutine jgive LCD some time jdisplay letter O scall display subroutine jstay here ;send command to LCD scopy reg A to port 1 sRS=O for command sR/W=0 for write :E= 1 for high pulse give LCD some time 3E=0 for H-to-L pulse swrite data to LCD scopy reg A to port 1 sRS=1 for data sR/W=0 for write | for high pulse sgive LCD some time 3E=O for H—to-L pillse 350 or higher for fast CPUs 5R4=255 ;Stay until R4 becomes O © = an xdded C Programming i jing code or Data to the LCD. with checking Busy he above Flag of code showed how to send commands to the LCD without checking the © must put a long delay between issuing data or commands to the LCD. a much bettas Way is to monitor the busy flag before issuing a command to the LCD. This is shown in following program. ever 8057 Uae P1.0-/d0 Veo x¥ Vee |. 10K 1.7407 *el~ 3 por RSRW E Yss P2.0}+—I eae P24 = P2.2| Fig. 2.9. LCD connections Check busy flag before sending data, command to LCD Pi=data pin, P2-0=RS, P2-1=R/W, P2-2=E pins MOV A, #38H ; init. LCD 2 lines, 5 x 7 matrix ACALL COMMAND 3 issue command MOV A, #0EH ; LCD on, cursor on ACALL COMMAND ; issue command MOV A, #01. ; Clear LCD command ACALL COMMAND ; issue command MOV A, #06H ; shift cursor right ACALL COMMAND ; issue command Mov A, #86H ; cursor: line 1, pos. 6 ACALL COMMAND ; command subroutine MOV A, #N’ ; display letter N ACALL DATA_DISPLAY MOV A, #0" ; display letter O ACALL DATA_DISPLAY SJMP HERE ; STAY HERE COMMAND: ACALL READY MOV PIA CLR P2:0 CLR P2-1 SETB P2-2 CLR P2-2 RET DATA_DISPLAY: ACALL READY MOV PISA SETB P2-0 CLR P2-1 SETB P2-2 ACALL DELAY CLR P2-2 RET READY: SETB eli CLR P2-0 SETB P2-1 - read command reg and check busy flag BACK: CLR P2-2 ACALL DELAY SETB P2-2 JB Pl: 7, BACK RET END ; is LCD ready? ; issue command code ; RS = 0 for command ; R/W = 0 to write to LCD ; E=1 for H-to-L pulse ; E=0, latch in ; is LCD ready? ; issue data ; RS =1 for data ; R/W = 0 to write to LCD ; E=1 for H-to-L pulse ; give LCD some time ; E=0, latch in ; make P1 - 7 input port 3 RS = 0 access command reg 3 R/W = 1 read command reg ; E=0 for L-to-H pulse ; give LCD some time 3 E= 1 L-to-H pulse ; Stay until busy flag =0 ° Program communicating with LCD using the busy flag Notice in the above program th: read the command register we mal at the busy flag is D7 of the command register. To ke R/W = | and RS = 0, and a L-to-H pulse for the mbedded C Programming Bu) EE ill provide us the command re (the busy flag) is high, the Li nould be issued to it. Only whe ‘gister. After reading the command register, if CD is busy and no information (command or : n D7 = 0 can we send data or commands to the D. Notice in this method that no time delays are used since we are checking the flag before issuing commands or data to the LCD. Fig. 2.10. LCD Timing for Read (L-to-H for E line) — Data output delay time - Setup time prior to E (going high) for both RS and R/W = 140 ns (minimum) — Hold time after E has come down for both RS and R/W = 10 ns (minimum) Note: Read requires an L-to-H pulse for the E pin. Fig, 2.11. LCD Timing for Write (H-to-L for E line) ‘yyy - Enable pulse width = 450 ns (minimum) ‘pw — Data setup time = 195 ns (minimum) ‘4, Data fold time = 10 ns (minimum) ‘4g~ Setup time prior to E (going high) for both RS and R/W = 140 ns (minimum) 2.20 after E has come down for both RS and R/W = 10 ns ( tay~ Hold time LCD data sheet In the LCD, one can put locations and how they are accessed, RS RW DS? DB6 DBS DB4 DB3. DB2 DBI _ DBO 0 0 1 A A A A A A A Where AAAAAAA = 0000000 to 0100111 for line 1 and AAAAAAA = 1000000 t data at any location. The following shows address at ' ps7 | Boe | DBS | DB4 | DB3 | DB2 | DBI | DBO Line 1 (min) 1 0 0 0 0 0 0 0 | Line 1 (max) 1 0 1 0 0 1 1 1 | Line 2 (min) 1 1 0 0 0 0 0 0 Line 2 (max) 1 1 1 0 0 1 1 1 The upper address range can go as high as 0100111 for the 40-character-wide LCD, while for the 20-character-wide LCD it goes up to 010011 (19 decimal = 10011 binary). Notice that the upper range 0100111 (binary) = 39 decimal, which 4 corresponds to locations 0 to 39 for the LCDs of 40 x 2 size. ‘ Tax2UCD,~ 80°. si" ceri gsamnas4 85 86 through 8F CO C1. C27 C8eeas Ay CSE eR Colthrough CR 20x1LCD 80 81_~—82——83.——sthrough 93 20x 2 LCD 80 81 82 83 through 93 co Cl = C2_—C3_ through D3 }20x4LCD 80 81 82 83 — through93 | co. Cl ¢2 C3 ° through D3 | 94 95 96 97 through A7 D4 DS D6 __—~dD7_ through E7 | 40x2LCD 80 81 82 83 through A7 l ___ co Cl = C2 C3_— through B7, Fig. 2.12. Curse addresses For some LCDs Sending Information to LCD using MOVC instruction The following program shows how to use the MOVC instruction to cen data and commands to an LCD. Embedded C Programming ; Calls a time delay before sending next data/command :P1-0-P1 -7=D0-D7, P2-0=Rs, p2- 1=R/W, P2-2=E pins SEND-DAT: D AGAIN: COMWRT: DATAWRT: ORG MOV CLR MOVC ACALL ACALL IZ INC SJMP MOV CLR MOVC ACALL ACALL INC JZ SJMP SJMP MOV CLR CLR SETB ACALL CLR RET MOV. 0 DPTR, #MYCOM A A, @A + DPTR COMWRT ; call command subroutine DELAY ; give LCD some time SEND_DAT DPTR cl DPTR, #MYDATA A A, @A + DPTR DATAWRT ; call command subroutine DELAY ; give LCD some time DPTR AGAIN DiI AGAIN ; Stay here ; send command to LCD PLA ; SEND COMND to PI P2-0 ; RS = 0 for command p2-1 ; R/W = 0 for write p2-2 ; E=1 for high pulse DELAY ; give LCD some time P2-2 ;E=0 for H-to-L P1,A ; SEND DATA to P1 DELAY: MOV HERE2: MOV MYCOM: DB MYDATA: DB END NF Embedded Systems ana yoy. P2-0 ;RS= 1 for data p2-1 ; R/W = 0 for write p2-2 ; E =I for high pulse DELAY ; give LCD some time P2-2 ; E=0 for H-to-L pulse R3, #250 ; LONG DELAY FOR fast CPUs R4, #255 i R4, HERE ¥ R3, HERE2 300H 38H, OEH, 01,06, 84H, 0 — ; commands and null “HELLO”, 0 ; data and null Example Program sending information to LCD with MOVC instruction Write an 8051 C program to send laters ‘M’, ‘D’ and ‘E’ to the LCD using delays. Solution: # include Sfr Idata = 0x90; Sbit rs = P20; Sbit rw = P21; Sbit en = P2/2; Void main () t ledemd (0x38); MSDelay (250); ledemd (0x0E); //P\ = LCD data pins (Fig) snbedded C Programming i MSDelay (250); Jedemd (0x01); MSDelay (250); Iedemd (0x06); MSDelay (250); ledemd (0x86); MSDelay (250); cddata (‘M’); MSDelay (250); Ieddata (“E’); d Iedemd (unsigned char value) = value; Icddata (unsigned char value) data = value; B=]; W=0: e=1; //line 1, position 6 /Lput the value on the pins // strobe the enable pin // put the value on the pins // strobe the enable pin [223] Fr MSDelay (1); en=0; return; } void MSDelay (unsigned int itime) { unsigned int i, j; for (i=0; i Ifall the rows are grounded have 0 since the key pressed Itis the function of the microcontroller to scan the keyboard continuously to detect and identify the key pressed. Grounding rows and reading the columns and a key is pressed, one of the columns will Provides the path to ground. % To detect a pressed key, the microcontroller grounds all rows by providing 0 to the output latch and then it teads the columns. * If the data read from the columns is D; — Dy = 1111, no key has been pressed and the process continues until a key press is detected. However, if one of the column bits has a zero, this means that a key press has occurred. For example, if D; ~Dy= 1101, this means that a key in the D, column has been ssed. After a key press is detected, the microcontroller will go through the process of identifying the key. Starting with the top row, the microcontroller grounds it by providing a low to row Dy only; then it reads the columns. Ifthe data read is all 1s, no key in that row is activated and the process is moved \o the next row. It grounds the next row, reads the columns, and checks for any zero. This process continues until the row is identified. Example 2.1] From the above figure 2.13, identify the row and column of the pressed key for each of the following. (4) D3~ D0 = 1110 for the row, D3 — D0 = 1011 for the column (6) D3~ DO = 1101 for the row, D3 — D0 = 0111 for the column Solution: From the above 2.13 figure the row and column can be used to identify the key. (2) The row belongs to DO and the column belongs to D2; therefore, key number 2 was pressed. (b) The row belongs to D1 and the column belongs to D3; therefore, key number 7 was pressed. p a. from table Wait for debounce | Read all columns Fig. 2.14, gor pressed key to PQ.1 P1.0-P1.3 connected to rows P2.0-P2,3 connected to columns VER 1 MOV P2, #OFFH MOV PI, #0 MCV A,P2 ANL A, #00001111B CINE A, #00001111B, KI ACALL DELAY MCV A,P2 ANL A, #00001111B CINE SIMP K2 ACALL DELAY MCV A,P2 ANL A, #00001111B bits CINE A,#00001111B, OVERI SIMP K2 MOV PL#11111110B MOV A,P2 ANL A, #00001111B CINE A,#00001111B, ROW_0 MOV PL#11111101B MOV A,P2 ANL A, #00001111B A,#00001111B,OVER ; make P2 an input port 3 ground all rows at once 3 read all col. ensure all keys open. ; masked unused bits 5 check till all keys released ; call 20 ms delay ; See if any key is pressed 3 mask unused bits ; key pressed, await closure ; check if key pressed 5 wait 20 ms debounce time ; check key closure 3 mask unused ; key pressed, find row ; ifnone, keep polling ; ground row 0 read all columns ; mask unused bits 3 key row 0, find the col. ; ground row 1 3 read all columns. 3 mask unused bits FIND: ROW _0: ROW_I: ROW_2: ROW 3: MATCH: CINE A, #000011 11B, ROW_ MOV MOV ANL CJNE ROW_2 MOV PI,#11110111B MOV A,P2 ANL A,#00001111B CINE A,#00001111B,ROW_3 LJMP F2 pL #11111011B A, P2 A, #00001 111B A, #00001111B, MOY DPTR, #KCODE 0 SJMP FIND MOV DPTR,#KCODE 1 SJMP FIND MCV DPTR, #KCODE 2 SJMP FIND MCV DPTR, #KCODE3 RRC 2. A JNC MATCH INC DPTR SJMP_ FIND CLR A MOVC A,@A+DPTR MOV P0,A _LJMP KI ; key row 1, find the ; ground row 2 ; read all columns ; mask unused bits ; key row 2, find the col, ; ground row 3 ; read all columns ; mask unused bits ; key row 3, find the col ; if none, false input, repeat ; set DPTR = start of row 0 ; find col. key belongs to ; set DPTR = start of row 1 ; find col. key belongs to ; set DPTR = start of row 2 ; find col, key belongs to ; set DPTR = start of row 3 ; see if any CY bit is low 3 if zero, get the ASCII code 5 point to next col. address 3 keep searching ; set A = O (match is found) ; get ASCII code from table ; display pressed key _s get ASCII code fom #0 | cnbedded C Programming LOOK-UP TABLE Fi ee ‘OR EACH ASCII ORG 300H KCODE0: DB 0°, 41°, «29, 3s Thaw KCODEL DB 4°, «59,46» aay aire KCODE2: DB ‘8, «9°, «a> «py ;Row2 KCODE3: DB CD» «p> «ps pee 2.4, PROGRAMMING EMBEDDED SYSTEMS IN Basics of Embedded C Program Embedded C is one of the most Popular and most commonly used Programming es in the development of Embedded Systems. So, Embedded C is perhaps ost popular languages among Embedded Programmers for programming edded Systems. There are many popular programming languages like Assembly, “IC, C++, Python ete. that are often used for developing Embedded Systems but ded C remains popular due to its efficiency, less development time and portability 2.4.1. PROGRAMMING EMBEDDED SYSTEMS. As mentioned earlier, Embedded Systems consists of both Hardware and re. If we consider a simple Embedded System, the main Hardware Module is ocessor. The Processor is the heart of the Embedded System and it can be ‘nything like a Microprocessor, Microcontroller, DSP, CPLD (Complex “rogrammable Logic Device) or an FPGA (Field Programmable Gated Array). All these devices have one thing in common: they are programmable i,e., we can ‘Tite a program (which is the software part of the Embedded System) to define how ‘ne device actually works. Embedded Software or Program allow Hardware to monitor external events (Inputs / Sensors) and control external devices (Outputs) accordingly. During this Process, the program for an Embedded System may have to directly manipulate the [2.30] Kmbeclded Systems and tor internal architecture of the Embedded Hardware (usually the processor) such as Timers, Serial Communications Interface, Interrupt Handling, and 1/0 Ports ete, Krom the above statement, it is clear that the Software part of an Embedded System ix equally important as the Hardware part, ‘There is no point in having advanced Hardware Components with poorly written programs (Software). There are many programming languages that are used for Embedded Systems like Assembly (low-level Programming Language), C, Crt, JAVA (high-level programming languages), Visual Basic, JAVA Script (Application level Programming Languages), ete. In the process of making a better embedded system, the programming of the system plays a vital role and hence, the selection of the Programming Language is very important, 2.4.2, FACTORS FOR SELECTING THE PROGRAMMING LANGUAGE The following are few factors that are to be considered while selecting the Programming Language for the development of Embedded Systems. % Size: The memory that the program occupies is very important as Embedded Processors like Microcontrollers have a very limited amount of ROM (Program Memory). % Speed: The programs must be very fast ic., they must run as fast as possible, The hardware should not be slowed down due to a slow running software, * Portability: % &E he same program can be compiled for different processors. of Implementation ¢ of Maintenance Readability Earlier Embedded Systems were developed mainly using Assembly Language. Even though Assembly Language is closest to the actual machine code instructions and produces small size hex files, the lack of portability and high amount of Tesources (time and man power) spent on developing the code, made the Assembly Language difficult to work with, mere are other high-level programming languages that offered the above mentioned features but none were close to C Programming Language: Same ‘He benefits of using Embedded as the main Programming Language _ rs ae, “pedded C Programming “Significantly easy to write code in C * Consumes less time when compared to Assembl: mbly Maintenance of code (modifications and updates) is very simple Make use of li i lake use of library functions to reduce the complexity of the main code “ we can easil; S ae My Port the code to other architecture with very little modifications 2.4.3. INTRODUCTION TO EMBEDDED c PROGRAMMING LANGUAGE Before going in to the details of Embedded C Programming Language and basics of Embedded C Program, we will first talk about the C Programming Language. The C Programming Language, developed by Dennis Ritchie in the late 60’s and y 70’s, is the most popular and widely used programming language. The C Programming Language provided low level memory access using an uncomplicated compiler (a software that converts programs to machine code) and achieved efficient apping to machine instructions. The C Programming Language became so popular that it is used in a wide range of applications ranging from Embedded Systems to Super Computers. Embedded C Programming Language, which is widely used in the development of Embedded Systems, is an extension of C Program Language. The Embedded C rogramming Language uses the same syntax and semantics of the C Programming Language like main function, declaration of datatypes, defining variables, loops, functions, statements, etc. The extension in Embedded C from standard C Programming Language include VO Hardware Addressing, fixed point arithmetic operations, accessing address Spaces, ete. 2.4.4. DIFFERENCE BETWEEN C AND EMBEDDED C “There is actually not much difference between C and Embedded C apart from few extensions and the operating environment. Both C and Embedded C are ISO Standards that have almost same syntax, datatypes, functions, etc. — [232] — ______ ior Embedded C is basically an extension to the Standard C Dag Language with additional features like Addressing I/O, multiple memory addressing and fixed-point arithmetic, ete. + C Programming Language is generally used for developing desktop applications, whereas Embedded C is used in the development of Microcontroller based applications. 2.4.5, BASICS OF EMBEDDED C PROGRAM Now that we have seen a little bit about Embedded Systems and Programming Languages, we will dive in to the basics of Embedded C Program. We will start with two of the basic features of the Embedded C Program: Keywords and Datatypes. 2.4.5.1.Keywords in Embedded C A Keyword is a special word with a special meaning to the compiler (a C Compiler for example, is a software that is used to convert program written in C to Machine Code). For example, if we take the Keil’s Cx51 Compiler (a popular C t Compiler for 8051 based Microcontrollers) the following are some of the keywords: 7 * bit { % sbit ’ oi small + large The following table lists out all the keywords associated with the Cx51 C Compiler. _at_ alien bdata bit code compact Data far idata interrupt large pdata —Priority_ reentrant sbit sfr sfr 16 small —task_ | __ using | __xdataameee | _ pedded C Programming 24.5-2+ Data Types in Embedded c pata Types in C Programming Lan, 3 guage (or ‘ matter) help us declaring variables in the 2a any Pies ree eV. ing ike si : aren are man} t in amming Language like signed int, unsigned int, signed ie fia ah a double, etc. In addition to these t er ee er an i ‘ , in Emi a a aati are the extra data types in Embedded C associated with the Keil’s x51 . bit & sbit & sft & sfrl6 The following table shows some of the data types in Cx51 Compiler along with ranges Data Type en Rasps 1 0 or 1 (bit addressable part of RAM) 16 (2) -32768 to +32767 16 (2) 0 to 65535 8 (1) -128 to +127 8 (1) 0 to 255 32 (4) +1.175494E-38 to +3.402823E+38 | 32@) +1.175494E-38 to +3.402823E+38 look 0 or 1 (bit addressable part of RAM) 8(1) RAM Addresses (80h to FFh) | 16@) 0 to 65535 24.6. BASIC STRUCTURE OF AN EMBEDDED C PROGRAM (TEMPLATE FOR EMBEDDED PROGRAM) The next thing to understand in the Basics of Embedded C Program is the basic or Template of Embedded C Program. This aa help us in understanding n Embedded C Program is written. The following part shows the basic of an Embedded C Program. 2.34) Multiline Comments . « «+ Denoted using /*. Single Line Comments . - «- Denoted using // ssor Directives .. +++ Hinclude<...> or #define Accessible anywhere in the program Declaring Function Preproce: o Global Variables ....- © Function Declarations... - « o Main Function..... Main Function, execution begins here { Local Variables..... Variables confined to main function 2 Function Calls... . Calling other Functions Infinite Loop ..... Like while(1) or for(;;) Statements . } at o Function Definitions . .... Defining the Functions f { i Local Variables . ... Local Variables confined to this Function 4 Statements ..... I Before seeing an example with respect to 8051 Microcontroller, we will first see the different components in the above structure. 2.4.7. DIFFERENT COMPONENTS OF AN EMBEDDED C PROGRAM Comments: “ Comments are readable text that are written to help us (the reader) understand the code easily. They are ignored by the compiler and do not take up any memory in the final code (after compilation). There are two ways we can write comments: one is the single line comments denoted by // and the other is multiline comments denoted by ear ae! added C Programming eprocessor Directive: pr « A Preprocessor Directive j " fective in Embedded C is an indication to the compiler that it must look in to thi: s file J program. for symbols that are not defined in the ‘ . i ¢ In C Programming Language (also in Embedded C), Preprocessor acl are usually represented using # symbol like #include... or “+ In Embedded C Programming, we usually use the preprocessor directive to indicate a header file specific to the microcontroller, which contains all the SFRs and the bits in those SFRs. In case of 8051, Keil Compiler has the file “reg51.h”, which must be written at the beginning of every Embedded C Program. Global Variables: +: Global Variables, as the name suggests, are Global to the program i.e., they can be accessed anywhere in the program. Local Variables: ‘Local Variables, in contrast to Global Variables, are confined to their respective function. Main Function: 4 Every C or Embedded C Program has one main function, from where the execution of the program begins. 24.8. BASIC EMBEDDED C PROGRAM ween C and Embedded C, basic structure OF template of an Embedded C Program he Embedded C Program.Continuing further, we will gram with the help of an example. In this ler to blink LEDs connected to PORTI of ( different components of t plore in to basics of Embedded C Pro mple, we will use an 8051 Microcontro! microcontroller. Sample code: include // Preprocessor Directive id delay (int); // Delay Funetion Declaration (2.36) void main (void) // Main Function { PL = 0x00; /* Making PORT! pins LOW, All the LEDS are OFR, * (PL is PORT, as defined in regS th) */ while (1) // infinite loop. { PL = OXF; // Making PORT! ping HIGH i.e, LEDs are ON, delay (1000); /* Calling Delay function with Function parameter as 1000, * This will cause a delay of 1000mS j.e. 1 second */ | PL = 0x00; // Making PORT! pins LOW ie. LEDs are OFF, delay (1000); | ) | ) void delay (int d) // Delay Function Definition { unsigned int iO; // Local variable, Ac ible only in this function, /* This following step is tesponsible for causing delay of 1000ms. * (or as per the value entered while calling the delay function) */ for (; d>0; d= ~) { for (i = 250; i>0; i; for (i = 248; i>0; j ‘ } } alae Zz jadded C Programming 249. ADVANTAGES OF EMBEDDED C PROGRAMMING LANG: rhe advantages of embedded C prog as UAGE The time consumed by the aval guage: reduced significantly, ‘opment cycle of an embedded program Developers were able to code easily. + Modifications and update: ‘ ; Were made easily, resulting i maintenance cycles. ly, resulting in more successful + Library functions were introduced ‘that eliminated the need to write the same block of code again and again for each program. +: The compatibility of a particular program with various architectures increased as it only required a few modifications. +: The hardware cost used in embedded C programs is very low. + The embedded applications that are designed are highly efficient for industrial usage. “+ The complexity of the code is reduced significantly. 24.10. DISADVANTAGES OF EMBEDDED C PROGRAMMING LANGUAGE »wing are the disadvantages of embedded C programming language. ‘ Itexecutes one task at a time, it does not support multiple task executions. When we make any changes in the program then the appropriate changes are to be made in the hardware as well. “Only hardware systems are supported. ‘ Itcannot be scaled efficiently, there are still some issues faced while doing it % There are also memory rel sues with certain computers. ated restrictions or sometimes it has compatibility is 25, NEED FOR RTOS an be programmed on @ microprocessor by writing a Single piece of code. But for a complex application we cannot be execute me Simple program of code because multiple operations must be performed . widely arying times, so single program can easily become too complex and unwieldy. Simple applications ¢é Oe Ul Embedded Systems ang 1oT (2338) There are two fundamental abstractions that allow us to build complex applications on microprocessor. 1. Process: It defines the state of an executing program 2. Operating System (OS): It provides the mechanism for switching execution between the processes. ‘ These two mechanisms together to build complex SEDucetn with greater flexibility to satisfy timing requirements. Satisfying complex pa oa can introduce complex control into programs. Using processes we can easily obtain the required control within operating system. 2.5.1. OPERATING SYSTEM BASICS. Process Management Time Management File System Management VO System Management Device Driver Interface Underlying Hardware Fig. 2.14 The operating The Operating system acts as a underlying system resources throt Operating Systems manages the system architecture bridge between the user applications / tasks and the tush a set of system functionalities and series, ee il le le system resources and makes them availabl. —— 1C Programming aolications / tasks on a need basi: . f sc applica basis. A normal computing System is a collection rent I/O subsystems, working, and : . . jae ; ing, and storage memory. The primary functions of ting system is 4 Make the system convenient to use «Organize and manage the system resources efficiently & correctly 451, KERNEL ¢ Kemel is the core of the operating system and is responsible for managing the resources and the communication among the Hardware and other system s, Kernel acts as the abstraction layer between system resources and user ations. Kernel contains a set of system Libraries and services. For a general ose OS. the kernel contains different services for handling the following. process Management cess Management deals with managing the processes / tasks. Process ment includes the following. Setting up the memory space for the process ‘+ Loading the process code into the memory space * Allocating system resources ¢* Scheduling and managing the execution of the process. + Setting up and managing the process control Block (PCB) “ Inter process communication and synchronization. “+ Process termination / deletion ete (ii) Primary Memory Management The term primary memory refers to the Volatile Memory (RAM) and Memory Management Unit (MMU) of the kernel is responsible for + Keeping track of which part of the memory area is currently used by which process. * Allocating and De-allocating memory space or a need basic (Dynamic memory allocation) li) File system Management File is a collection of related information. A file could be a program, text files, mage files, word documents, audio / video files, etc. Each of these files differ in the ind of i jon they hold and the way in which the a Be option Is wae seri provided by the OS. The file system service of kernel responsible for + The creation, deletion and alteration of files Creation, deletion and alteration of directories. Saving of files in the secondary storage memory. oo 4 Providing automatic allocation of file space based on the amount of free space available. ‘Providing flexible naming convention of the files. The various file system management operations are OS dependent. For example, the kernel of Microsoft DOS OS supports a specific set of file system management operations and they are not the same as the file system operations supported by UNIX kernel. (iv) 1/0 System Management Kernel is responsible for routing the /O Tequests coming from different user applications to the appropriate I/O devices of the system. In a well structured OS, the direct accessing of I/O devices are not allowed and the access to them are provided through a set of Application Programming Interfaces (APD exposed by the Kemel. The Kernel maintains a list of all the /O devices of the System. This list may be available in advance, at the time of building the kemel. Some kemels, dynamically updates the list of available devices and when a new device is installed. The device manager of the Ker ‘mel is responsible for handling all VO device related operations. The Kerel talks to the V/O device through a set of low- level systems calls, which are implemented in a service called device drivers. The device drivers are specific to a dev: Manager is responsible for ‘ice or a class of devices. The device Loading and unloading of device drivers * Exchanging information and the system specific control signals to and from the device, (v) Secondary Storage Management The secondary Storage management deals w; memory devices ii ith managing the secondary st in case it has to be connected to the system. It is used. as be" lila oe gmbe scroong —i‘(‘i ein a ie pe since the main memory is volatile, In most of the oe. of kernel deals with Se eibaeasey cenge manson «Disk Storage allocation ‘Disk scheduling “Free disk space Management (vi) protection Systems lost of th i M 3 ae operating systems are designed to support multiple users with different eve ° ae permissions. Protection deals with implementing the General purpose ‘Operating system (GPOS) Real Time operating system (RTOS) 2.5.2.1. General purpose operating system The operating systems, which are deployed in general ee systems are referred as General purpose operating systems, ‘The Kernel a such an OS is more generalized and it contains all kinds of services required executing generic applications, These kinds of operating systems are quite non = deterministic in behavior and their services can inject random delays into application software, may cause slow responsiveness of an application at unexpected times, GPOS are usually deployed in computing systems where deterministic behavior is not an important criterion, Personal computer / Desktop system is a example for a system where GPOS are deployed, Windows XP/MS = DOS ete are examples for General purpose operating systems, 2.5.2.2. Real Time operating system (RTOS) Real time implies deterministic timing behavior, it means the OS. services consumes only known and expected amounts of time regardless the number of servic A Real Time operating system or RTOS implements policies and rules concerning time critical allocation of a systen: esources, The RTOS decides which applications should run in which order and how much time needs to be allocated for each application, Example Windows CE QNX Vx works and micro/OS-II ete, 2.5.3, RTOS Real Time operating system is special Purpose operating system designed for embedded system. An RTOS is an OS for response time controlled and event controlled processes. In RTOS Processing must be done within defined time Constraints, otherwise system will fail or cause major problem. ample? Mach Kernel QNX Kernel Minix 3 Kemel applications Microkemel with essential services like memory management process management , timer system, etc. Fig. 2.16. The microkernel model Advantages rokernel based design approach offers the following benefits. Robustness any of the services, which runs as ‘servers’ figured and re-started without the need for re- highly useful for systems, which demands 2 problem is encountered in tion, the same can be recon the entire OS. This approach is ability Configurablility n be changed without the need to n as ‘server” application ca y services which ru stem dynamically configurable. estart the whole system. This makes the sy: 25.2, TYPES OF OPERATING SYSTEMS ending on the type of Kemel an computing systems where the OS is deploy rems are classified into different types. d Kernel services, purpose and type of i ed and the responsiveness to applications, perating. i General purpose Operating system (GPOS) Real Time operating system (RTOS) aa) 2.5.2.1. General purpose operating system The operating systems, which are deployed in general computing systems are referred as General purpose operating systems. The Kernel of such an OS is more generalized and it contains all kinds of services required for executing generic applications. ‘These kinds of operating systems are quite non — deterministic in behavior and their services can inject random delays into application software, may cause slow responsiveness of an application at unexpected times. ‘ GPOS are usually deployed in computing systems where deterministic behavior is not an important criterion. Personal computer / Desktop system is a example for a system where GPOS are deployed. Windows XP/MS - DOS etc are examples for General purpose operating systems. 2.5.2.2. Real Time operating system (RTOS) Real time implies deterministic timing behavior, it means the OS services consumes only known and expected amounts of time regardless the number of services, A Real Time operating system or RTOS implements policies and rules concerning time critical allocation of a system’s resources. The RTOS decides which applications should run in which order and how much time needs to be allocated for each application. Example Windows CE QNX Vx works and micro/OS-II etc, 2.5.3. RTOS Real Time operating system is special Purpose operating system designed for embedded system. An RTOS is an OS for response time controlled and event controlled processes. In RTOS Processing must be done within defined time constraints, otherwise system will fal or cause major problem. C Programming [za] gros can perform multitask and communicate with more than one process at 2 ___ Io obtain these kinds of tasks, RTOS must manage and schedule the CPU yrces in Proper way. why aT0S for Real Time Application gOS is not a required component of all Real Time applications in embedded : An embedded system in a simple Electronic Rice Cooker does not require 70S. But as the complexity of applications expands beyond simple tasks, benefits an RTOS for outweight the associate costs. dded systems are becoming more complex in Hardware side with every jon, and as more features are put into them in each iteration, application running on the embedded system platforms will become increasingly x to be managed as they strive to meet the system response requirements. An will be effective to allow the Real Time applications to be designed and canded more easily while meeting the performance required. RTOS can perform the following functions. Determines which execution entities in the application should control the CPU, n what order and how much time is allowed for each before giving up messages about the status of operation and errors that may have ccurred, the following main responsibilities anagement 2. Scheduling nterrupt servicing +. Inter ~ Process Communication nchronization among processes lemory management Device management ————— Bimbedtect Sywrer wor Table 24. Various RTOS Services Activition Resource manager Device management, Functions Process management, yen, Basie OS Functions 1 Memory management, 1/0 devices subsystems and Network devices, 2, | RTOS Main Punetions Real Time tsk seheduling and Interrupt Latency control and use of Timers and system clocks, * re 3. | Time Management ‘Time allocation & decallocation (0 attain onstealnts, efficiency in given timing ¢ A predictable timing behaviour of the aystem | and a predictable task organization, Priorities allocation and priorities inheritance, icing of the process execution Predictability ‘Time 5) Hard Real Time and soft Real time operations, Hard and sof Real ‘Time operability 2.5.3.1. Types of RTOS ‘There are two types of Real ‘Time ope! (i) Hard Real Time Systems (ii) Soft Real Time Systems rating systems (i) Hard Real Time Systems Hard Real Time means strict adherence to each task schedule, A Hard Real Time es for a task without any slippage. Missing any system must meet the deadlin Time systems, including deadline may produce catastrophic results for Hard Rei and irrecoverable damages to the system/users. permanent data lose Example a traffic control, Nuclear power plant control, Anti lock Brake systems of vehicles etc, (i/) Soft Real Time Systems fer the best lines, but fora soft Real Soft Real Time systems does not guarantee meeting dea acceptable for effort to meet the deadline. Missing deadlines for tas!

You might also like