Tuesday, October 29, 2019

"sizeof" function in c language

#include <stdio.h>
#include <stdlib.h>

int main()
{
   int a =0;
   char c="b";
   float d=1.10;
   long e=12345678;
   double f=1234567812345;
   long double g=123456789;
   printf("int==%d\nchar==%d\nfloat====%d",sizeof(a),sizeof(c),sizeof(d));
   printf("\nlong==%d",sizeof(e));
   printf("\ndouble==%d",sizeof(f));
   printf("\nlong double==%d",sizeof(g));
    return 0;
}

output:

int==4
char==1
float====4
long==4
double==8

long double==12

note :i am using code block ide ...so my values are like this ....if your using any other compiler then values will be changed as per the compiler

Monday, October 28, 2019

MM32 INSTALLATION ON KEIL





IC PACKAGES

  • BQFPH - Bumpered Quad Flat Pack with Heat spreader:   This form of quad flat package utilises the pin protectors at the corners, it also has heat spreaders to enable larger levels of power to be dissipated.
  • CQFP - Ceramic Quad Flat Pack:   This is a high quality version of the quad flat pack using ceramic for the package.
  • FQFP - Fine pitched Quad Flat Pack:   A quad flat pack with, as the name indicates, a fine pitch for the pins.
  • HQFP - Heat sinked Quad Flat Pack:   With many integrated circuits, especially those with high pins counts which have a high level of circuitry may dissipate high levels of heat. This heat may need to be removed. To achieve this a number of the pins, often in the centre of opposing sides are replaced with a thicker pin which is soldered to a large pad on the PCB with a large area of copper connected to it. This will remove a significant amount of heat.
  • LQFP - Low profile Quad Flat Pack:   The Low Profile Quad Flat Pack is based upon the metric QFP, MQFP, but it is are thinner with a body thickness or height of 1.4mm. This helps solve problems where component height may be a problem. It has a standard lead-frame footprint - 2.0mm lead footprint. Lead counts for the LQFP range from 32 to 256. Body sizes range from 5 x 5mm to 28 x 28mm. Lead pitches available for LQFP package are 0.3, 0.4, 0.5, & 0.65mm.
  • MQFP - Metric Quad Flat Pack:   A quad flat package where the measurements and in particular the pin spacing is defined in metric dimensions. Standard QFPs normally use Imperial measurements and have pin spacing etc defined in terms of convenient Imperial dimensions.
  • PQFP - Plastic Quad Flat Pack:   A quad flat pack where the package material is plastic. Some QFPs can use ceramic.
  • TQFP - Thin Quad Flat Pack:   The Thin Quad Flat Pack, TQFP is a form of low profile quad flat pack. Having a body thickness of 1.0mm and have a standard lead-frame footprint with 2.0mm lead footprint. The TQFP package material used is plastic.

Wednesday, October 23, 2019

WHILE loop in python

EXAMPLE 1:
while 1:
    print("Hello")

output:
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
Hello
......

EXAMPLE 2:

x=0
while 1:
    print(x)

    x+=1

output:
1
2
3
4
5
.....

Tuesday, October 22, 2019

FOR loop in python

in loops concept For loop plays major role

range is inbuilt function which is having 3 integers values
range(start,stop,step)
start---from where to start the iteration
stop---upto which value(max value) to execute
step---how much increment is looking for each iteration


example 1:

for x in range(1,10):
    print(x)

out put:
1
2
3
4
5
6
7
8
9



example 2:

for x in range(1,10):

    print("*")

output:
*
*
*
*
*
*
*
*
*

nested for loop

for x in range(1,5):
    for y in range (1,5):

          print("*")

output:
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*

example 4:
for x in range(2, 30, 3):
  print(x)

output:
2
5
8
11
14
17
20
23
26
29

example 5:
adj = ["red", "big", "tasty"]
fruits = ["apple", "banana", "cherry"]

for x in adj:
  for y in fruits:

    print(x, y)

output:
red apple
red banana
red cherry
big apple
big banana
big cherry
tasty apple
tasty banana
tasty cherry

example 6:
sentence = ["the", "quick", "brown", "fox", "jumped", "over", "the", "lazy", "dog"]

for i in sentence:
    print(i)
    i=+1

output:
the
quick
brown
fox
jumped
over
the
lazy
dog

python class topic video