1 Answer

The volatile keyword is a part of C standard, and this warns the compiler that ISR might change the value of a variable so that the compiler will not optimize the code in a way that will make it fall.

Here, need to declare:

static volatile long int iSecondsToday;

With the volatile keyword in the declaration, the compiler will know that the variable is volatile and each reference is read from memory.

If the keyword is not supported, you can still get the similar result by turning off the compiler optimizations.
thumb_up_alt 0 like thumb_down_alt 0 dislike

Related questions

Description : Which of the following is not a keyword? a) eval b) assert c) nonlocal d) pass

Answer : Answer: a Explanation: eval can be used as a variable.

Description : Which of the following is used to make an Abstract class ? (A) Making atleast one member function as pure virtual function (B) Making atleast one member function as virtual function (C) Declaring as Abstract class using virtual keyword (D) Declaring as Abstract class using static keyword

Answer : (A) Making atleast one member function as pure virtual function

Description : Consider the following statements regarding relational database model: (a) NULL values can be used to opt a tuple out of enforcement of a foreign key. (b) Suppose that table T has only one candidate key. If Q is in 3NF, then it is also in BCNF. (c) The difference between the project operator (P) in relational algebra and the SELECT keyword in SQL is that if the resulting table/set has more than one occurrences of the same tuple, then P will return only one of them, while SQL SELECT will return all. One can determine that: (A) (a) and (b) are true. (B) (a) and (c) are true. (C) (b) and (c) are true. (D) (a), (b) and (c) are true.

Answer : (D) (a), (b) and (c) are true.

Description : A keyword can be used as an identifier by using the  A) prefix # B) prefix @ C) prefix $ D) prefix x

Answer : A keyword can be used as an identifier by using the prefix @

Description : Which architecture involves both the volatile and the non-volatile memory? A. Harvard architecture B. Von Neumann architecture C. None of the mentioned D. All of the mentioned

Answer : A. Harvard architecture 

Description : Which of the following phrases is NOT appropriate for a description of benzene? w) characteristic reactivity of an alkene x) volatile liquid y) aromatic hydrocarbon z) resonance hybridization


Description : Random Access Memory (RAM), a form of computer storage, is a ............. memory. (A) Non-volatile (B) Volatile (C) Permanent (D) Secondary

Answer : Answer: B

Description : ................. is subject oriented, integrated, time variant, non-volatile collection of data in support of management decisions. (A) Data mining (B) Web mining (C) Data warehouse (D) Database Management System

Answer : (C) Data warehouse

Description : Which of the following computer memories is non-volatile ? (1) DRAM (2) SRAM (3) ROM (4) RAM

Answer : ROM

Description : RAM is used as a short memory in a computer because it: (1) Is volatile (2) Is programmable (3) Has less capacity (4) Is very expensive

Answer : Is volatile

Description : Spirit in contact with body gives cool sensation because it is : (1) liquid (2) transparent (3) highly volatile (4) a good conductor

Answer : highly volatile

Description : Which of the following type of coal has the lowest proportion of volatile matter ? (1) Lignite (2) Peat (3) Bituminous (4) Anthracite

Answer : Anthracite

Description : Alcohol is more volatile than water because _________ is lower than water. (1) its boiling point (2) its density (3) its viscosity (4) its surface tension

Answer : its boiling point

Description : Pure water is bad conductor of electricity because it is (1) feebly ionized (2) not volatile (3) a very good solvent (4) a non-polar solvent

Answer :  feebly ionized

Description : In a refrigerator what produces the cooling ? (1) The ice which deposits on the freezer (2) The sudden expansion of a compressed gas (3) The evaporation of a volatile liquid (4) None of these

Answer : None of these

Description : Which computer memory is volatile?  (a) RAM (b) ROM (c) EPROM (d) PROM

Answer : Answer is A)RAM.because It store information temporary only.

Description : Is FPGA a volatile device?

Answer : Yes, FPGA is a volatile device.

Description : Normally, the FPGA resources are used less than 70% because:  a. Routing becomes excessively complicated b. Power issues c. Clock frequency d. Simulation time increases

Answer : Normally, the FPGA resources are used less than 70% because: Routing becomes excessively complicated

Description : List and describe three general approaches to improve designer productivity.

Answer : Automation: The task of using a computer program to replace manual design effort. The program replaces manual design effort. Synthesis. Reuse: The ... correctness/completeness of each design step. Hardware/software co-simulation.

Description : Explain placement, routing, and sizing.

Answer : Placement: The task of placing and orienting every transistor somewhere on IC. Routing: The task of running wires between the transistors without inserting other wires or transistors. ... wires and transistor provide better performance but consume more power and require more silicon area.

Description : A single FSM can be converted to two smaller FSM. Justify.

Description :

Answer : Common computation models: Sequential program model Statements, rules for composing statements, semantics for executing them Communicating process model ... Object-oriented model For breaking complex software into simpler, well-defined pieces

Description : Sketch internal design of 4x3 ROM.

Answer : The internal design of 4x3 ROM

Description : Explain the advantages and disadvantages of using memory I/O and standard I/O.

Answer : Memory mapped I/O and standard I/O are the two methods for communicating microprocessor with peripherals. Processor talks to both memory and peripheral using the same bus.Two ways to talk to a peripheral. ... of standard I/O is no loss of memory addresses to the use as I/O addresses.

Description : Explain parallel and wireless protocols.

Answer : Parallel protocols: PCI bus (Peripheral Components Interconnect): PCI stands for Peripheral Components Interconnect. PCI bus is used as a communication line to transmit signals and data ... provide the basis for wireless network products using the Wi-Fi brand.

Description : Explain memory hierarchy.

Answer : Memory hierarchy: Main memory is large, inexpensive, slow memory stores entire program and data. Cache memory is small, expensive, fast memory stores copy of likely accessed parts of large ... In memory hierarchy the smaller memory is faster and larger memory storage is slower.

Description : Explain memory write ability and storage permanence with suitable diagram.

Answer : Write ability and storage permanence of memories: Write ability is the manner and speed at which memory can be written. Storage permanence is the ability of memory to hold stored bits ... Holds bits after power is no longer supplied. High end and middle range of storage permanence.

Description : Describe different RT level computational and sequential components used to design single function processors.

Answer : RT-level combinational components:- To reduce the complexity in digital logic, combinational components are used, which are more powerful than logic gates.  Such combinational ... during a clock edge. An asynchronous inputs value effects the circuit independent of the clock.

Description :

Build using minimum number of CMOS gates.

  1. Three input NAND gate.
  2. Two input NOR gate
  3. Three input NOR gate
  4. Two input AND gate
  5. Two input OR gate

Answer : Three input NAND gate. Two input NOR gate Three input NOR gate Two input AND gate Two input OR gate

Description : Explain the various steps involved in designing a custom single-purpose processor.

Answer : A single purpose processor is a digital circuit designed to execute exactly one program. It is also known as co-processor, accelerator or peripheral. It contains only ... for small quantities. Performance may not match general-purpose processors for same applications.

Description : If Moor's law continues to hold, predict the approximation number of transistor per leading edge IC in the year. 1.2030 2.2050

Answer : If Moor's law continues to hold, predict the approximation number of transistor per leading edge IC in the year.1.20302.2050

Description : Compare the annual growth rate of  1.IC capacity 2.Designer productivity.

Answer : Compare the annual growth rate of 1.IC capacity2.Designer productivity.

Description : Explain Inter-process Communication (IPC) using mailbox/queue.

Answer : Inter-process communication using mailbox: Mailbox is the Interprocess communication mechanism. A process puts a data message for another process in the mailbox. Mailbox is also called as message exchange. ... a message. In mailbox IPC the sender need not to know the name of the receiver.

Description :

Explain arbitration. What is priority arbitrator?

Answer : Arbitration: IF multiple peripherals are connected to microprocessor or DMA controller or any resource and they request services simultaneously so which peripheral will get serviced first this is ... Peripherals make requests to arbiter and arbiter makes requests to the resource.

Description :

Explain FSM and concurrent process with example.

Answer : Finite State Machine (FSM): Finite state machine is a machine which have a transition from state to state. The system have some number of states and at a time the system can ... Y seconds. In sequential execution, the processor executes single task which causes poor processor utilization.

Description : Compose 1k x 8 ROMS into 8k x 8 ROM.

Answer : 1k x 8 ROMS into 8k x 8 ROM:

Description : What is design technology? Explain top down design process.

Answer : Design technology: Design technology is the manner in which we convert our concept desired system into an implementation. The three main design technologies are 1. Compilation/Synthesis ... general purpose processors and A Gate-level Netlist for special-purpose processors.

Description :

Explain data transfer mechanism in I2C protocol. Compare it with CAN and USB protocol based on bit rate and area of applications.

Answer : I2C (Inter-Integrated Circuit): I2C stands for Inter-Integrated Circuit. I2C is a serial protocol. It was developed by Philips Semiconductor. I2C bus have two communication lines. One is serial data ( ... Mbps this is used for lower speed devices. Using USB we can connect upto 127 devices.

Description : What is Mailbox? Write a note on Mailbox.

Answer : Mailbox is used for inter-process communication for sending small messages between tasks or between ISR and task. The Mailbox is used in some Real Time Operating system (RTOS). If the task or ... received by which task or thread is called mailbox client. Mailbox message is a kernel service.

Description : explain how a stepper motor is controlled using driver. give relevant hardware and software details.

Answer : A stepper motor is an electric motor that rotates fix number of degrees whenever we apply a step signal. the stepper motor can rotate 1.8-degree full step or ... driver 2. controlling a stepper motor directly Application of stepper motor: disk driversprintersphotocopyfax machinerobotscamcorder

Description : Explain Keypad controller.

Answer : Keypad Controller: It's a device which interfaces between the computer and keyboard. That is a input device and used for transfer the data to connected device.

Description :

Answer : Liquid Crystal Display:-An LCD is a low-cost, low power device capable of displaying text and images. LCD's are extremely common in embedded systems since such system often does not have video monitors ... toggles the enables bit and acts as a delay so that the command can be processed and executed.

Description :

Answer : UART takes parallel data and transmits serially and UART receives serial data and converts to parallel.A simple UART may possess1.Some configuration registers and2.Two independently operating processors, one ... must write data to the transmit register and/or read data from the received register.

Description :

Answer : Timers:-A timer is a peripheral device that can measure time intervals. Timers can be used to1. General events at the specific time or to determine the duration of two external Keeping a ... the number of times the car wheel rotates in one second, in order to determine cars speed.

Description :

Answer : Most microprocessors have a nonmaskable interrupt, an input pin that causes an interrupt that cannot be disabled. If an interrupt routine shares any data with the task code, then it is necessary ... by setting the priority level. 3. It allows us to enable and disable individual interrupts.

Description :

Answer : Interrupt latency is the amount is the amount of time it takes a system to respond to an interrupt.The 4 factors influencing on embedded system response to an interrupt are:1. The longest period of time ... 2 is one of the reasons that it is generally a good idea to write short interrupt routines.

Description :

Answer : A semaphore is called binary semaphore when its value is 0, it is assumed that it has been taken (or accepted) & when its value is 1, it is assumed that it has been released & no ... that are not themselves reentrant.3. A reentrant function may does not use the hardware in a nonatomic way.

Description : What are counting semaphores and resource semaphore?

Answer : If a task tries to take the semaphore when the integer is equal to zero, then the task will block. These semaphores are called counting semaphore. Some system offer semaphore that can be ... , but they cannot be used to communicate between two tasks. Such semaphores are called resource semaphore.

← Prev Question Next Question →
editAsk a Question