Assignment 1 C-Prog: Centre For Development of Advanced Computing Hyderabad
Assignment 1 C-Prog: Centre For Development of Advanced Computing Hyderabad
Assignment 1 C-Prog: Centre For Development of Advanced Computing Hyderabad
Hyderabad
Assignment 1
C-Prog
1) Write a c program to display size of data types like
a) Signed / unsigned int b) signed/unsigned char c) float d) double e) signed/unsigned
short f) long int g) long long int
2) Difference between #include <stdio.h> #include “stdio.h”
3) Output of following program
main()
{
Enum{i=2,j,k,l};
printf(“%d\n”,k);
}
4) What is typecasting ?
5) Follow c compilation steps to find out type of error
a) #include <stdio.h>
extern int i;
main()
{
printf(“%d\n”,i);
}
b) main()
{
typedef int i;
printf(“%d\n”,i);
}
c) main()
{
int a=2,b=0;
printf(“%d\n”,(a/b));
}
Centre for Development of Advanced Computing
Hyderabad
Assignment 2
C-Prog
Q1. Write a program which has 3 functions named ADD, SUB and MUL which will do
addition, subtraction and multiplication respectively. Use command line to call the functions.
Q2. Write a function to print the ascii equivalent of all characters in a string.
Q3. Write a program to display binary equivalent of a given decimal number.
Q4. Write a program to display decimal equivalent of a given binary number.
Q5. Write a program to display hex equivalent of a given binary number.
Q6. Write a program to display decimal equivalent of a given hex number.
Q7. Write a program to display binary equivalent of a given hex number.
Q8. Write a program in which define 'a' as an unsigned integer whose value is 0xa2c3
(hexadecimal). Write the corresponding bit pattern for this value. Then evaluate each of the
following bitwise expressions, first showing the resulting bit pattern and then the equivalent
hexadecimal value. Utilise the original value of 'a' in each expression. Assume that 'a' is
stored in a 16 bit word.
a) ~a
b) a ^ 0x3f06
c) a | 0x3f06
d) a >> 3
e) a << 5
f) a ^ ~a
g) a ^~a
h) a | ~a
i) (a & ~0x3f06) << 8)
j) a & ~(0x3f06 >> 8)
Q9. Write a C program with a function tolower, which converts upper case letters to lower
case. Use conditional expression.
Q10. Develop a C program to calculate simple interest using the formula I=PTR/100. Display
Interest with two digit precision Pafter decimal point using rate of Interest as macro.
Centre for Development of Advanced Computing
Hyderabad
Assignment 3
ARM
Q1. Explain the Architecture of ARM cortex M3.
Q2. Differentiate between RISC and CISC Architectures
Q3. Give detailed introduction of ARM Register Bank
Q4. Explain ARM Processor Modes.
Q5. Give a brief Introduction of LPC 1343 and its features.
Q6. Explain about ARM7 and ARM9 families. Explain major differences in their architecture
especially about their pipeline structures.
Q7. Compare the following in tabular form.
(a) ARM Vs Thumb VS Jazelle ISA
(b) Memory Mapped I/O Vs I/O Mapped I/O.
Assignment 4
LPC1343
Q1. Give a brief overview of LPC1343.
Q2. States the functions of LPC1343.
Q3. Explains the architecture of LPC1343.
Q4. Explain about ARM Processor Instruction Set Architecture.
Q5. What is Coprocessor?
Q6. What is pipeline in ARM?
Q7. What is interrupt pipelining?
Centre for Development of Advanced Computing
Hyderabad
Assignment 5
INTERRUPT
Q1. Questions based on Interrupt Programming and exception handler using different
Handler.
Q2. Difference between exception and interrupt.
Q3: What is Interrupt latency?
Q4: State the difference between polling and interrupt.
Assignment 6
LCD and GPIO
Q1. What is GPIO,? Explain in context with lpc1343.
Q2. Write a program in Embedded C.
A. For toggling led at port 0.7 using AND and OR operations.
B. For toggling led at port 2.2, 2.4,2. 6 using XOR operations.
C. Repeat above programs by making user defined functions and Macros for LEDON()
LEDOFF() and LedInit().
Q3. WAP to print different patterns and character on LCD using LPC 1343 development board.
Q4. WAP by creating lcd.h header file and call the functions in main file.
Centre for Development of Advanced Computing
Hyderabad
Assignment 7
Q1. State the difference between Memory Mapped IO vs Port Mapped IO.
Q4. WAP to configure GPIOs and Interface LEDs and toggle them using delays.
Assignment 8
Timers
Q1. Configuring 16bit timer to generate 2 sec of delay and toggle the led at Port 0.7.
Q2. Configuring 32bit timer to generate 5 sec of delay and toggle the led at Port 2.7.
Assignment 9
Systic Timers
Q4. WAP to generate a precise delay of 2 sec using System Tic timers to toggle LED at Port
2.0.
Q5. WAP to generate a precise delay of 3 sec using System Tic timers to generate an interrupt.
Assignment 10
Watch Dog Timers
Q5. Configure the WDT of LPC1343 to reset the system as soon as we give an external
interrupt.
Centre for Development of Advanced Computing
Hyderabad
Assignment 11
ADC
Q4. Write a Program to convert the analog value 2.5 volt and display it on LCD.
Q5 Write a Program for Temperature Sensor LM35 and display the room temp on the LCD
Assignment 12
UART
Q2. Define bit rate and baud rate. How they are related?
Assignment 13
SPI
Assignment 14
I2C
Q5. List range of devices that I2C can address with (7 to 11 address bits)?