Search results

  1. V

    SPI ADC/DAC with 8051

    i asked this question because i was confuse with SPI and (ADC /DAC). I tried two times to understand difference between them. I am sorry but your answer is also too confusing for me because you are not telling me what's the wrong I am thinking. you are just telling what's the wrong in...
  2. V

    SPI ADC/DAC with 8051

    I did some searching and studied about ADC/DAC and SPI Microcontrollers usually have general purpose input/output pins. these pins are software configurable to either an input or an output state. When pins are configured to an input state, they are often used to read external signals like...
  3. V

    SPI ADC/DAC with 8051

    I don't know where you got me wrong. What I understand is that ADC is a hardware chip that convert analog signals into digital signals. ADC support SPI communication protocol. communication protocol is program that control ADC chip. whenever we need to read temperature on sensor we need to use...
  4. V

    SPI ADC/DAC with 8051

    SPI is serial communication protocol commonly used to send data between microcontrollers and small peripherals such as sensors. ie. interfacing of temperature sensor to microcontroller. ADC chip will convert temperature value into digital value. We will write program to read the temperature...
  5. 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...
  6. V

    Program to check three Switch button's

    This can be done in another way #include<REGX51.h> sbit Switch1 = P2^1; //set bit P2^1 to Switch 1 sbit Switch2 = P3^0; //set bit P3^0 to Switch 2 sbit Switch3 = P3^7; // set bit P3^7 to Switch 3 sbit LED1 = P1^1; //set bit P1^1 to LED 1 sbit LED2 = P1^4...
  7. V

    Program to check three Switch button's

    I done few changes I checked program on simulator. program is doing what I want to it #include<REGX51.h> sbit Switch1 = P2^1; //set bit P2^1 to Switch 1 sbit Switch2 = P3^0; //set bit P3^0 to Switch 2 sbit Switch3 = P3^7; // set bit P3^7 to Switch 3 sbit LED1 = P1^1...
  8. V

    Program to check three Switch button's

    I am learning programming for microcontroller I wrote program for that situation. I can use LED's instead of Light and Fan. My question is mainly based on coding. Is my code working as I want to do ?
  9. V

    Program to check three Switch button's

    Thanks. think like There is a switch board in your house that has three buttons if you press button 1 the light 1 turn ON,if you press button 2 ,the light 2 turn ON and if your press button 3 Fan turn off. so any of them button press then turn or their respective device otherwise turn of device...
  10. 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...
  11. V

    Print the string of structure

    I am sorry You are correct I don't have good understanding about for statement answer in a #33 is wrong. it should be i = 3, j = 3 Thank you very much for continue to help. I want to learn use of for statement in c as you said in post #28 I made two loop in one program #include <stdio.h>...
  12. V

    Print the string of structure

    How can I ignore you. I am nothing in front of you. You are the expert person I have tried to answer your questions every time But I do not understand where is the mistake
  13. V

    Print the string of structure

    I don't see anything wrong in this This is wrong statement I wrote this to explain false condition. This doesn't happen
  14. V

    Print the string of structure

    I am sure When for loop will exit, the value of i and j will be i = 2 and j = 3
  15. V

    Print the string of structure

    int i, j; j = 10; in first line you are declaring i and j then you are assigning value 10 to variable j for (i=0; i < j; i++) { printf(" number %d \n", i); j = 3; } return 0; } loop start with i = 0 and check the condition i < j so i = 0 and j = 10 so condition is true because the...
  16. V

    Print the string of structure

    Still I didn't understand your question but I am telling you what I understand for loop for ( initialize ; condition; increment/decrements ) { statement; } and while loop initialize while (condition ) { statement; increment/decrements; } #include <stdio.h> int main(void) { int i...
  17. V

    Print the string of structure

    Thanks to both of you for being up to the end. it's okay I will use string.h function @Harald Kapp @Steve Do you think I have a understanding of loop and statement
  18. V

    Print the string of structure

    This is my last effort and I am sure This is what you are asking in post #4 #include <stdio.h> int main() { int i; char name[10] = "Joy"; printf(" \n Print name : %s ", name); for (i = 0; i <10; i++) { printf(" \n Print element of array : %c "...
  19. V

    Print the string of structure

    I know the program but the problem is without #include <string.h> how to do this #include<stdio.h> #include <string.h> struct profile { char name[10]; int number; }; int main() { struct profile account = {0}; account.number = 132; strcpy(account.name, "Joy"); printf("...
  20. V

    Print the string of structure

    I have studied loop, statement , array Where I am doing mistake What I am missing in program please tell me. I will re-read it and come back to this thread
Top