Search results

  1. V

    SPI ADC/DAC with 8051

    Hello everyone I have small confusen on SPI ADC/DAC with 8051. I think SPI is serial communication protocol and ADCs (analog-to-digital converters), DACs (digital-to-analog converters) is circuity. when we need to read the data from sensor we have to use ADC chip. we have to set up ADC so we...
  2. V

    Program to check three Switch button's

    Hello I have three button's and two light's and one Fan. I want to make light1 ON if switch 1 is pressed otherwise turn of light 1. turn ON light2 ON if switch 2 is pressed otherwise turn of light 2. turn ON Fan 1 if switch 3 is pressed otherwise turn of Fan 1. #include<89v51rx2.h> sbit...
  3. V

    Print the string of structure

    I want to print the string of structure what's the problem in my code. How to print the string of structure #include<stdio.h> struct profile { char name[10]; int number; }; int main() { struct profile account; account.number = 132; account.name[10] = "Joy"; unsigned...
  4. V

    Array in ascending order

    Hello I am looking help to understand this program. array in ascending order in C programming #include <stdio.h> int main(void) { int a[20], i = 0, j = 0, n, t; printf ("\n Pramot user to Enter Element: "); scanf ("%d", &n); printf ("\n"); for (i = 0; i < n; i++)...
  5. V

    Program to print a string

    I have written two different to print string in c programming #include <stdio.h> int main() { char Book = "Electronics"; printf("Name of Book is %s \n",Book); return 0; } warning: initialization makes integer from pointer without a cast [-Wint-conversion] char Book...
  6. V

    Timer interrupt programming

    Hello I have written program to set timer interrupt on 8051 microconroller. I want to set interuupt for 50 ms Fosc = 11.0592Mhz tick = 12/11.0592M = 1.085069444us = 1.085us Interrupt time = 60 ms 60,000*1.085= 55299 65536-55299= 10237 =ox27FD #include<reg51.h> sbit LED = P1^0; int...
  7. V

    Positive and negative number

    Hello I wrote program in c that can be find positive and negative number. after that I am trying to find out how many positive and negative number's are there in array #include <stdio.h> int main(void) { int i; int PositiveNegative[10] = {5,2,-1,4,8,-6,8,-7,9,1}; for (i = 0; i...
  8. V

    LPC2148 ARM7TMDI based microcontroller

    I want to start work with LPC148 Microcontroller. I have downloaded datasheet and started reading. LPC2148 is 32 bit microcontroller from ARM-7 family. It has 32 to 512KB of internal flash program memory and 32 to 8K of internal Data memory. We can use Keil compiler to develop program. I am...
  9. V

    Function and their types

    I have read it about function and their types in c programming. so after reading I tried to write program for function with no argument and no return type This is my program ( void function_name (void) #include<stdio.h> void delay (void); int main (void) { int number; number = delay()...
  10. V

    Pointer dereferencing

    In the book there is following paragraph which I don't understand what's the exact meaning There is not further explanation So I wrote program #include<stdio.h> int main(void) { int * pointer; /*declaration of integer pointer*/ int a=1, b; /*declaration of integer variable*/...
  11. V

    How to write program

    I am trying to write keypad program, I work with 8051 and keil compiler so I did google search and I found so many links . I have read following three links but still I am confuse because the program has been written differently in all the three links and I don't understand how to write...
  12. V

    What are real example of " While Loop"

    I do not know whether this question should be asked or not but I am confuse. This is reason reason I am asking here. I wanted to know how do we use while Loop in c language I wrote program and read about while loop in my book. I thought I should write my own programs so, I made some examples...
  13. V

    Scanning of numbers and string in c

    I am little bit confuse in the scanning of numbers and string in c programming. I wrote program to scan numbers from user #include<stdio.h> int main (void) { int number; printf("Enter user input :"); scanf ("%d",&number); if(number == 1) { printf("Number is...
  14. V

    Pointer and it's use

    Generally I know pointer is use to store address of variable. I can write basic program for pointer but I am still confuse I don't understand actually what's the real real use of pointer and where we will use pointer in programming. #include <stdio.h> int main(void) { int variable = 10...
  15. V

    What's the best way to learn any programming

    Hello I think it may be stupid question but thought it should be ask here. I know for learning any programming language we have to know about supported IDE. There are many sample code available on internet. Then we started to run some sample program to check results. After that we start to...
  16. V

    confuse on Size of array in c program

    I am confuse on size of array declaration #include<stdio.h> int main (void) { int i, array[4], size; /* print size of array on screen */ printf ("size of array : "); /*get size of array from user */ scanf ("%d", &size); for (i = 0; i < size; i++) { /* print the...
  17. V

    Automatic object tracing system

    I want to design automatic object tracing system. I want to see the location of object on my PC. I think I have to connect GPS to Microcontroller but problem is that how will PC communicate with tracking system. I think I can do it by using internet. I think, system must be connected to the...
  18. V

    Uart communication protocoals

    Hello I know that the use of the Uart Protocol is used to send or receive data from one device to another. For example, if I want to send data from Microcontrlloer to PC. I can send data using uart protocol. Suppose that my name vead is store in 8051 and I want send data "vead" to PC so that I...
  19. V

    SKM53 GPS Datasheet

    Hello I need help to understand datasheet. I am trying to understand logic of SKM53 GPS. I have attached datasheet . I have been reading this datasheet but I don't understand how to find information in datasheet that is require to develop program.
  20. V

    Bitwise AND assignment

    Hello What is meaning of this data &= 0x0F. does it equal data = data & 0x0F ? data &= 0x0F; for(i = 0; i < 4; i++) { data &=~( 0x80 >> i); data |= 0x80>>i; } data = 11101111 data =...
Top