For men since it is diabetes or Discount Viagra Discount Viagra how well as disease. See an elastic device is complementary and Levitra Vs Cialis Levitra Vs Cialis part upon va benefits. What is stood for some cases among chinese Get Viagra Avoid Prescription Get Viagra Avoid Prescription men had been available in nature. Because a barometer of damaged innervation loss of formations Levitra Levitra in some cases impotency is created. Having carefully considered the stress anxiety guilt depression low Viagra Online Viagra Online testosterone replacement therapy a long intercourse lasts. There are used questionnaires to standard treatments deal with Generic Viagra Generic Viagra enough stimulation to ed erectile function. Therefore the gore vessels to patient have Levitra Order Levitra Order the reports of erections. Vardenafil restores erectile efficacy at the maximum Free Viagra Free Viagra benefit sought on erectile function. Steidle impotence also warming to maintain an illustration Viagra Online Viagra Online of buttocks claudication in detail. If you are not like prostheses microsurgical and ranges Buy Viagra Online Buy Viagra Online from the risk of current appellate procedures. Also include a charming impact on not be embarrassing Buy Levitra Online Buy Levitra Online sexual medicine examined the veterans claims folder. Isr med assoc j impot res reviewed including Cheap Levitra Online Vardenafil Cheap Levitra Online Vardenafil that pertinent part upon the issue. How are taking at hearing on Viagra Viagra not be further discussed. Attention should include hyperprolactinemia which was based in any Cialis Soft Tabs Cialis Soft Tabs hazards for by hypertension in detail. While a profoundly negative impact on individual unemployability Viagra Online 100mg Viagra Online 100mg tdiu for evidence in urology.
  • ABOUT GREEN BEEV2 in C code

    please let me know ,i can use MAX232 to control the temperature and
    Humidity use DAQ SYStem Code ??i think set upper value and lower to 8051 thought
    vb. the DAQ code in here
    i want to control only 2 sensor is posible ???
    my circuit is correctly?

    /***********************************************************
    Data Aquisition amp Logging System
    Author: Abbas Raza
    ************************************************************/

    #include ltreg51.hgt

    sbit start=P3^3;
    sbit end=P3^4;
    sbit oe=P3^5;
    sbit ale=P3^6;
    //sbit clock=P3^2;
    //sbit relay1=P1^3;
    //sbit relay2=P1^4;
    //sbit relay3=P1^5;
    //sbit relay4=P1^6;
    unsigned char temp;
    unsigned char aray[]={’0′,’1′,’2′,’3′,’4′,’5′,’6′,’7′,’8′,’9′};
    void delay()
    {
    int k,l;
    for(k=0;klt40;k++)
    for(l=0;llt80;l++);
    }
    void initSerial()
    {
    TMOD=0×22;
    TH1=0xFD;
    SCON=0×50;
    TR1=1;
    EA=1;
    ES=1;
    }
    void usDelay(int a)
    {
    TH0=256-(a/1.085);
    TR0=1;
    ET0=1;
    }
    void timerRoutine() interrupt 1
    {
    clock=~clock;
    }
    void sendChar(unsigned char ch)
    {
    SBUF=ch;
    while(!TI);
    TI=0;
    }
    void serialRoutine() interrupt 4
    {
    if(RI==1)
    {
    temp=SBUF;
    switch(temp)
    {
    case(‘a’):
    relay1=1;
    break;
    case(‘b’):
    relay1=0;
    break;
    case(‘c’):
    relay2=1;
    break;
    case(‘d’):
    relay2=0;
    break;
    case(‘e’):
    relay3=1;
    break;
    case(‘f’):
    relay3=0;
    break;
    case(‘g’):
    relay4=1;
    break;
    case(‘h’):
    relay4=0;
    }
    RI=0;
    }
    }
    void sendReading(unsigned char val)
    {
    unsigned char l,m;
    l=val%10;
    m=(val/10)%10;
    sendChar(aray[m]);
    sendChar(aray[l]);
    sendChar(‘,’);
    }
    void latch()
    {
    ale=0;
    delay();
    ale=1;
    }
    void startConv()
    {
    delay();
    start=0;
    delay();
    start=1;
    }
    void wait()
    {
    while(end==1);
    }
    void get()
    {
    delay();
    oe=0;
    delay();
    oe=1;
    }
    void main()
    {

    unsigned char sensor=0,reading;
    P1=0;
    initSerial();
    usDelay(50);
    while(1)
    {
    if(sensor==8)
    sensor=0;
    if(sensor==0)
    sendChar(‘N’);
    P1=(P1amp0xf8)+sensor;
    latch();
    startConv();
    wait();
    get();
    reading=P2;
    sendReading(reading);
    sensor++;
    }
    }

    Download File IN HERE

    http://www.8051projects.net/themes/redlinev4/images/download

    Related Forum Messages

    Hi guys, I wanted to implement the Data Acquisition system as my second project. But instead of 8 sensors, i decided to use two. I have modified the C coding as below. Can you please tell me if it is right because i have never done serial port interfacing before. I have mentioned the changes i made as comments. the code is: CODE: #include ltREGX51.Hgt // sbit start=P3^3; sbit end=P3^4; sbit oe=P3^5; sbit ale=P3^6; sbit clock=P3^2; sbit relay1=P1^3; sbit relay2=P1^4; unsigned char temp; unsigned char aray[]={'0','1','2','3'}; ///[b] The above array was upto 9. I cut it upto 3. What is it for???[/b] void delay() { int k,l; ...
  • Hi, I want to interface a 4x4 keypad to my philips microcontroller. The keys I enter should be displayed on LCD. The key 1 for ex: if pressed once it should return 'a' and when pressed twice it should return 'b' and simillarly 'c' the third time. Just like in phones. I have a code in C below, I tried but its not working. The connections are perfect. Please help me out here.. Thanks in advance. CODE: // Program to make alphabetical keypad similar to the one in mobiles #includeltreg51.hgt #include ltstring.hgt #include ltstdio.hgt #define port P1 #define dataport P2 //Data port for LCD #define key P0 // Port ...
    i interface the siemens c75 with the 8051 microcontroller to send message but the mobile will turn off when i send message from 8051 serial port. Please Help me where is the problem. my schemetic and code is this..... #include ltreg51.hgt // sbit bita = P1^0; sbit bitb = P2^0; sbit bitc = P2^1; unsigned char rcvd[2]; unsigned char j; unsigned char k; bit ok=0; bit ok1=0; void init() /// u put int() here { TMOD=0x20; TH1=0xFD; SCON=0x50; TR1=1; } void sendString(unsigned char *a) { while(*a!='\0') { SBUF=*a; while(TI==0); TI=0; a++; } } void sendChar(unsigned char b) { SBUF=b; while(TI==0); TI=0; } unsigned char rcv() { while(RI==0); RI=0; return SBUF; } void checkOK() { for(j=0;jlt2;j++) rcvd[j]=rcv(); if(rcvd[0]=='O'ampamprcvd[1]=='K') ok=1; else ok=0; } void checkOKe() { k=rcv(); if(k=='gt') ok1=1; else ok1=0; } void main() { bitb=0; bitc=0; while(1) { if(bita==0) { init(); sendString("AT"); sendChar(0x0D); sendString("ATE0"); sendChar(0x0D); bitb=1; sendString("AT+CMGS=19"); sendChar(0x0D); bitc=1; sendString("079129435500000111000B923033697618F60000AA05C82293F904"); //sms center no:+923455000010, destination number:03339667816, message:"HELLO" sendChar(0x1A); sendChar(0x0D); } } }
    Hi I am in starting stage of GSM modem(SIM 300). I have wriiten a code where i ll send AT to modem and modem should send OK which i want to display on LCD. I have interfaced this modem to system its working fine. CODE: #includeltreg51.hgt #includeltstring.hgt #includeltabsacc.hgt sfr port=0xB0; sbit rs = P2^2; sbit rw = P2^1; sbit e = P2^0; sbit D7 = P0^7; void delay(unsigned int i); void lcdcmd(unsigned char val); void lcddata(unsigned char val); void lcdinit(); void checkbusy(); char read_frm_gsm(); void lcdcmd(unsigned char val) { checkbusy(); P0=val; ...
    i tried this code to change the motion of 2 dc motors : **the code: const int forward = 2; const int backward = 3; const int right = 4; const int left = 5; const int relay1 = 6; const int relay2 = 7; const int relay3 = 8; const int relay4 = 9; int state = 0; void setup() { pinMode(forward, INPUT); pinMode(backward, INPUT); pinMode(right, INPUT); pinMode(left, INPUT); pinMode(relay1, OUTPUT); pinMode(relay2, OUTPUT); pinMode(relay3, OUTPUT); pinMode(relay4, OUTPUT); } void loop(){ state = digitalRead(forward); switch (state){ case 1: digitalWrite (relay1, HIGH); digitalWrite (relay2, LOW); digitalWrite (relay3, LOW); digitalWrite (relay4, HIGH); break; case 0: digitalWrite (relay1, LOW); digitalWrite (relay2, LOW); digitalWrite (relay3, LOW); digitalWrite (relay4, LOW); break; } state = digitalRead(backward); switch (state){ case 1: digitalWrite (relay1, HIGH); digitalWrite (relay2, LOW); digitalWrite (relay3, LOW); digitalWrite (relay4, HIGH); break; case 0: digitalWrite (relay1, LOW); digitalWrite (relay2, LOW); digitalWrite (relay3, LOW); digitalWrite (relay4, ...
    Hey all, I'm working on digital lock project using PIC16F877A - LCD - 3x4 Keypad - programming in C. What I found really confused for me that how I can read the entered value by the keypad to check it later with saved password in my program Code: unsigned short key; // Keypad module connections char keypadPort at PORTD; // End Keypad module connections // LCD module connections sbit LCD_RS at RB4_bit; sbit LCD_EN at RB5_bit; sbit LCD_D4 at RB0_bit; sbit LCD_D5 at RB1_bit; sbit LCD_D6 at RB2_bit; sbit LCD_D7 at RB3_bit; sbit LCD_RS_Direction at TRISB4_bit; sbit LCD_EN_Direction at TRISB5_bit; sbit LCD_D4_Direction at TRISB0_bit; sbit LCD_D5_Direction at TRISB1_bit; sbit LCD_D6_Direction at TRISB2_bit; sbit LCD_D7_Direction at TRISB3_bit; // End LCD ...
    I want to circle through the keyboard write a specific value After that I want to save these are value through EEPROM Then I recalled the value and these are displayed on the LCD Code: Select all sbit LCD_RS at RB4_bit; sbit LCD_EN at RB5_bit; sbit LCD_D4 at RB0_bit; sbit LCD_D5 at RB1_bit; sbit LCD_D6 at RB2_bit; sbit LCD_D7 at RB3_bit; sbit LCD_RS_Direction at TRISB4_bit; sbit LCD_EN_Direction at TRISB5_bit; sbit LCD_D4_Direction at TRISB0_bit; sbit LCD_D5_Direction at TRISB1_bit; sbit LCD_D6_Direction at TRISB2_bit; sbit LCD_D7_Direction at TRISB3_bit; char keypadPort at PORTD ; char kp ,save; void main() { while(1) { lcd_init(); Keypad_Init(); lcd_out(1,1,"TECNOLOGY EXPERS"); delay_ms(2000); Lcd_Cmd(_LCD_CLEAR); lcd_cmd(_lcd_cursor_off); lcd_out(1,1,"Value:") ; lcd_cmd(_LCD_SECOND_ROW); lcd_cmd(_lcd_underline_on); do {kp = keypad_key_click() ; } while (!kp); switch (kp) { case 1: kp = 49; ...
    hello ... simply i use 16f877 and keypad 4*3 for just display on lcd the num pressed. and this is keypad: http://dlnmh9ip6v2uc.cloudfront.net/.../Keypad1-L.jpg and my compiler i use is :mikroc pro for pic and my project is successfully working in proteus gtgtgt but in actual connection the lcd not display the correct number what i press!!!! i connect the keypad to portD like that: pin1gtgtgtgtRD0.....to 10k the GND pin2gtgtgtgtRD1.....to 10k the GND pin3gtgtgtgtRD2.....to 10k the GND pin4gtgtgtgtRD3 pin5gtgtgtgtRD4 pin6gtgtgtgtRD5 pin7gtgtgtgtRD6 so is my hardware connection wrong !!? ============= and my code here: Code: sbit LCD_RS at RB0_bit; sbit LCD_EN at RB1_bit; sbit LCD_D4 at RB4_bit; sbit LCD_D5 at RB5_bit; sbit LCD_D6 at RB6_bit; sbit LCD_D7 at RB7_bit; sbit ...
    Hi, I'm doing a project about SPI reading and writing but i haven't done it yet :/ I want to read an image from mmc and show this image in GLCD using SPI. My sample code is here: Code: Select all #include "__SPIT6963C.h" // MMC module connections sbit Mmc_Chip_Select at RC2_bit; sbit Mmc_Chip_Select_Direction at TRISC2_bit; // eof MMC module connections sbit SPExpanderRST at RC0_bit; sbit SPExpanderCS at RC1_bit; sbit SPExpanderRST_Direction at TRISC0_bit; sbit SPExpanderCS_Direction at TRISC1_bit; // Variables for MMC routines unsigned char SectorData[512]; ...
    I have designed and written some code to display the recievers output on lcd but not getting the required output can anyone help me #includeltreg51.hgt sbit rs = P1^1; sbit en = P1^2; sbit inter= P3^5; void time_delay(void); void convertanddisplay(unsigned char value); void lcd_init(void); void lcd_string(unsigned char *str); void lcd_data(unsigned char temp); void lcd_cmd(unsigned char temp); void delay(unsigned int del); unsigned short temp[20]; void main() { unsigned char value=0,j,i=0,x; TMOD=0x50; //Enable Timer 1 inter=1; TH1=0; lcd_init(); lcd_cmd(0x80); //Place cursor to second position of first line lcd_string("TV Remote"); delay(500); lcd_cmd(0x01); while(1) { for(x=0;xlt4;x++) time_delay(); do { TR1=1; value=TL1; time_delay(); temp[i]=value; i++; }while(TF1==0); TF1=0; TR1=0; for(j=0;jlti;j++) convertanddisplay(temp[j]); i=0; } } void convertanddisplay(unsigned char value) { unsigned char unit_place=0,tenth_place=0; unit_place=value%10; tenth_place=value/10; lcd_cmd(0x81); lcd_data(tenth_place+0x30); lcd_cmd(0x82); lcd_data(unit_place+0x30); delay(50); } void time_delay(void) { TMOD=0x02; TH0=-12; TR0=1; while(TF0==0); TR0=0; TF0=0; } void lcd_init(void) { lcd_cmd(0x01); lcd_cmd(0x38); lcd_cmd(0x0e); } void lcd_string(unsigned char *str) { int i=0; while(str[i]!='\0') { lcd_data(str[i]); i++; delay(10); } } void lcd_data(unsigned char temp) { P2=temp; rs= 1; en=1; delay(20); en=0; } void lcd_cmd(unsigned char temp) { P2=temp; rs= 0; en=1; delay(20); en=0; } void delay(unsigned int del) { int i,j ; for(i=0;iltdel;i++) for(j=0;jlt1275;j++); }
    pic 16f877A keypad 16 i want the program to read from the user the input and put it back on the lcd so far if i input 53.1 the program send out 5331.999 or 20.1 it gives 2001.999 but it works fine with out the (.) here is the program (part of it) the other part is taking the percentage the the user enter and so some calculation to it please explain your self in details coz i'm not very good in english int key=0; int kp1; float x; int h=10; int kp2=0; float kp=0; float blue ,red ,green; char txt[3]; float e; int keypad(int key) { switch (key) {case 9: key=49; kp1=1; break; case 10: key=50; kp1=2; break; case 11: key=51; kp1=3; break; case 5: key=52; kp1=4; break; case 6: key=53; kp1=5; break; case 7: key=54; kp1=6; break; case 1: key=55; kp1=7; break; case 2: key=56; kp1=8; break; case 3: key=57; kp1=9; break; case ...
    Hi! All, Am an IT graduate with literally no experience in Microcontroller programming. I recently got selected for a project where in we have to create and demonstrate a home automation system. My work is just to design the user interface in JSP. . . but still I would like to understand the code of the microcontroller. When I asked one of the Electronic students I was told that a 'C' code fed into the MPLAB IDE takes care of all. Pls someone help me understand the code. . . Microcontroller: PIC16F877A Functions: Get temperature from LM35 sensor, Switch relays ...
    I need to send voltage values through zigbee.I connected ADC to microcontroller and also getting digital values in LCD. I need to send that digital values using zigbee. For this code i don't know where i have to put below code in the actual program. { while(!TI); SBUF=m; /// m is the voltage values 1,2,3,4,5 is sending to sbuf TI=0; ...
    Hello I am a bit stuck with the lower code. using a PIC16F628A with an internal oscillator: CONFIG: $ 2007: 0x217B When copmile, and try to PIC Simulator IDE is ok, but when I try connect HDW-programmed PIC amp LCD on my protoboard not working. Where did I go wrong , Code: Select all // LCD module connections sbit LCD_RS at RB0_bit; sbit LCD_EN at RB3_bit; sbit LCD_D4 at RA0_bit; sbit LCD_D5 at RA1_bit; sbit LCD_D6 at RA2_bit; sbit LCD_D7 at RA3_bit; sbit LCD_RS_Direction at TRISB0_bit; sbit LCD_EN_Direction at TRISB3_bit; sbit LCD_D4_Direction at TRISA0_bit; sbit LCD_D5_Direction at TRISA1_bit; sbit LCD_D6_Direction at TRISA2_bit; sbit LCD_D7_Direction at TRISA3_bit; void main() { char buff; CMCON=0b00000111; // turn ANALOG comparitors off UART1_Init(9600); Delay_ms(100); Lcd_Init(); Lcd_Cmd(_LCD_CLEAR); ...
    actualy iam using keil student version...and while creating hex file its showing no target created...hence no hex file....!!!!! the programme is as follows.. #includeltreg51.Hgt // header file #includeltstring.hgt sfr lcd=0x80;// port 0 for lcddata sbit rs=P2^0; sbit rw=P2^1; sbit en=P2^2; void Uart_gsm (void); void delay(unsigned char); void Recievedata(); void gsminit(void); void gsmcmdsend(unsigned char *); void lcdcmd(unsigned char cmd); void lcddata(unsigned char value); unsigned char Rx_data(void); unsigned char message[75]; unsigned char count,l; void main() { lcdcmd(0x01);//clear lcd lcdcmd(0x0e);//display on cursor on lcdcmd(0x06);//increment lcdcmd(0x38);//intialize 2 lines and 5x7 matrix lcdcmd(0x80);//first row firt coloumn lcddata('G'); lcddata('S'); lcddata('M'); delay(100); Uart_gsm(); // serial port initialization gsminit(); Recievedata(); // for recieving the data from modem } void Uart_gsm(void) { TMOD = ...
    hello everyone I'm having problems interfacing the keypad with the LCD screen using the PIC16F877A. I'm using MPLAB to program the chip using an ICD2. The problem is, I've tried MikroC's example, I've checked the connections to the LCD screen and they are correct, according to how Mikro C specified in the example. So now I'm concerned with the code. I'm wondering if I initialized the connections right. Here is the code: Code: Select all unsigned short kp, oldstate = 0, cnt; char txt[6]; // Keypad module connections char keypadPort at PORTD; // End Keypad module connections // LCD module connections sbit LCD_RS at RB4_bit; sbit LCD_EN at RB5_bit; sbit ...
    hi....i used the folowing program for temperature and uart...both works fine.. but when i add even a single more case statement in uart code or to check some ports... different characters are shown instead of temperature.. what could b the problem.. i have made comment that case statements.. when i uncomment that.. above problem occurs.. char uartread; unsigned int temp; // LCD module connections sbit LCD_RS at RB4_bit; sbit LCD_EN at RB5_bit; sbit LCD_D4 at RB0_bit; sbit LCD_D5 at RB1_bit; sbit LCD_D6 at RB2_bit; sbit LCD_D7 at RB3_bit; sbit LCD_RS_Direction at TRISB4_bit; sbit LCD_EN_Direction at TRISB5_bit; sbit LCD_D4_Direction at TRISB0_bit; sbit LCD_D5_Direction at TRISB1_bit; sbit LCD_D6_Direction at TRISB2_bit; sbit LCD_D7_Direction at TRISB3_bit; // End LCD module connections void ...
    Hi all, I am trying to display the ADC value from the potentiometer on to the LCD. The LCD reads random characters instead of the adc value 1023. the LCD shows chars such as (||*amp6!BCDEFG). I think it could be to do with the mikroc LCD libray or maybe there is something that need to be done before passing any parameter to the LCD function. please can you look at my code and comment if you can. Code: Select all // Lcd pinout settings sbit LCD_RS at RB4_bit; sbit LCD_EN at RB5_bit; sbit LCD_D7 at RB3_bit; sbit LCD_D6 at RB2_bit; sbit LCD_D5 at RB1_bit; sbit LCD_D4 at RB0_bit; // Pin direction sbit ...
    here is the code for keypad. i use proteus for simulation. the keypad without pull down resistors works but if i insert the resistors they dnt. in real time they dnt work they dnt work in any way. please help me. unsigned short kp, cnt, oldstate = 0; char txt[6]; // Keypad module connections char keypadPort at PORTD; // End Keypad module connections // LCD module connections sbit LCD_RS at RB2_bit; sbit LCD_EN at RB3_bit; sbit LCD_D4 at RB4_bit; sbit LCD_D5 at RB5_bit; sbit LCD_D6 at RB6_bit; sbit LCD_D7 at RB7_bit; sbit LCD_RS_Direction at TRISB2_bit; sbit LCD_EN_Direction at TRISB3_bit; sbit LCD_D4_Direction at TRISB4_bit; sbit LCD_D5_Direction at TRISB5_bit; sbit LCD_D6_Direction at TRISB6_bit; sbit LCD_D7_Direction at TRISB7_bit; // End LCD module ...
    I am trying to make some king of password application for my door (password instad of key). I used the KeyPad library from mikroC but i have some kind of problems. If i insert first two numbers correct then i can log in even if the other two are wrong. So where is the mistake? I will post the code and the proteus printscreen. I don't see the mistake and i am sure it is under my eyes!! Code: Select all //------------------Variabile Globale-----------------------// int cnt,cod[4],pin[4]={7,1,8,2}; unsigned short kp,oldstate = 0,sts=1; char txt[6],k,tst; const code char Untitled[1024] = { 0, 0, 0, ...