element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Embedded Forum Do you have a question on Embedded electronics and controls? Ask our Expert, Paul Clarke
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 126 replies
  • Subscribers 508 subscribers
  • Views 10650 views
  • Users 0 members are here
  • skills
  • c
  • hvac
  • digital
  • engineer
  • expert
  • microprocessor
  • answer
  • control
  • thermal_management
  • embedded_system
  • embedded
  • thermal
  • electronics
  • paul_clarke
  • assembly
  • solutions
  • rac
  • software
  • develop
  • question
Related

Do you have a question on Embedded electronics and controls? Ask our Expert, Paul Clarke

pjclarke
pjclarke over 15 years ago

This thread has been closed to new questions.

However, we welcome you to Post Your Question about Embedded in the element14 Community Embedded group. You'll find many fellow members and experts who have just the answer you're looking to find! 

 

Thank You, Your Friends at element14 Community

image

Paul Clarke

Paul has 20+ years of working as a digital electronics engineer and has strong software skills in assembly and C for embedded systems. Currently developing embedded electronics for thermal management control solutions for the air movement industry (HVAC & RAC).




  • Sign in to reply
  • Cancel
  • e14 Contributor
    e14 Contributor over 13 years ago

    hello SIR,

     

    i just have basic question regarding the working of crystal oscillators attached with the microcontrollers?

     

    as the microcontrollers works on the square wave clock, which are digital in nature,

    but the crystal oscillator is an analog defvice which produces sine waves,
    so my question is that how these sine wave signals are converted to square wave signals???

     

    and if i use crystal oscillator of 40MHz instead of 12MHz, then what will happen???
    --the execution time of the program will be fast OR

    --the transmission baud rate will be increased??

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 13 years ago

    Hello Paul,

         So my buddies and I are doing a project, we are building a 8051 digital-clock and thermo, we have the code that was offered by Element14. We were looking for an assembler software program. We use Proview32 at school, but would like to work on project from our houses also. Don't have the software large enough for the file. Kiel only carries the 2Kb memory. We need a larger memory holder. Any ideas or suggestions?

     

    Thanks for your time and consideration,

     

     

    George Voight

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett over 13 years ago in reply to e14 Contributor

    You don't say which 8051 you are using so this may not help !

     

    Try http://www.silabs.com/products/mcu/Pages/8-bit-microcontroller-software.aspx#ide

     

    As far as I can see this toolset is based on Keil but free and unrestricted for use on Silabs 8051 chips. The Silabs parts are about as good as 8051 ever gets so using them is a good plan any way.

     

    I do have some questions:

     

    why are you usng 8051

    why are you coding in assembler

    what does your clock thermometer do that's so special you can't fit the code in 2k

    where is the Element14 code you refer to

     

    With answers to these I might be able to be more helpful.

     

    Michael Kellett

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 13 years ago

    hello sir nice to meet u

                                 

     

                                sir  now i start to learn how to serial interfacing in 8051.i write the code for serial communication the program is working but it isnot logic can u please expline me sir. in this program,i remove  the fuctions of lcd(),lcdcmd(),display(),in while loop or before while the program is not display before rf module read rfid serialy. otherwise rfmodule read after rfid.display is working. it is read befoer rfid the functions are write both side befoer while after while.it is displaied.what is the problem it is not logic. pleace explain me sir    

     

    #include<reg51.h>

    #include<stdio.h>

    #include<string.h>

     

    sbit rs=P2^0;

    sbit rw=P2^1;

    sbit en=P2^2;

     

     

    unsigned char tem[9];

    void serialrx();

    void cmp();

     

    void lcdcmd(unsigned char l);

    void lcddata(unsigned char l);

    void display(unsigned char *dr);

    //void delay(unsigned char s);

    void delay(unsigned char l);

    void lcd();

     

    void lcdcmd(unsigned char l)

    {

    P1=l;

    rs=0;

    en=1;

    rw=0;

    en=0;

    }

     

    void lcddata(unsigned char l)

    {

    P1=l;

    rs=1;

    en=1;

    rw=0;

    en=0;

    }

     

    void display(unsigned char *dr)

    {

     

    while(*dr)

    {

      lcddata(*dr++);

    }

    }

    void delay(unsigned char l)

    {

      while(l--);

    }

    void lcd()

    {

     

         lcdcmd(0x0c);

         delay(6);

    lcdcmd(0x38);

    delay(6);

         lcdcmd(0x06);

         delay(6);

     

     

    }

    void main()

    {

            lcd();

        lcdcmd(0x80);

    delay(1000);

        display("WARRIOR TRANS");

    delay(1000);

    lcdcmd(0xc0);

    delay(1000);

        display("MISSION TOOL");

     

     

    while(1)

    {

        lcd();

        lcdcmd(0x80);

    delay(1000);

        display("WARRIOR TRANS");

    delay(1000);

    lcdcmd(0xc0);

    delay(1000);

        display("MISSION TOOL");


    serialrx();

         cmp();

     

     

    }

    }

    void cmp()

    {

    int a;

    char b[9]="16722482";

      a=strcmp(b,tem);

     

     

    if(a==0)

      {

         lcd();

    lcdcmd(0x80);

    display("                           ");

         delay(1000);

    lcdcmd(0x80);

         display("AUTHORISED");

    delay(1000);

    lcdcmd(0xc0);

    display("                           ");

         delay(1000);

    lcdcmd(0xc0);

         display("          TOOL ");

     

     

      }

    else

       {

          lcd();

    lcdcmd(0x80);

    display("                           ");

         delay(1000);

    lcdcmd(0x80);

         display("UNAUTHORISED");

    delay(1000);

    lcdcmd(0xc0);

    display("                           ");

         delay(1000);

    lcdcmd(0xc0);

         display("          TOOL ");

     

    }

     

    }

     

     

     

    void serialrx()

    {

    int i;

        TMOD=0x20;

        TH1=0xfd;

        SCON=0x50;

        TR1=1;

     

    for(i=0;i<8;i++)

    {

     

       while(RI==0);

         tem[i]=SBUF;

            RI=0;

    }

      tem[i]='\0';

    }

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 13 years ago in reply to e14 Contributor

    hi paul sir nice to meet u

     

     

     

     

     

                                sir  now i start to learn how to serial interfacing in 8051.i write the code for serial communication the program is working but it isnot logic can u please expline me sir. in this program,i remove  the fuctions of lcd(),lcdcmd(),display(),in while loop or before while the program is not display before rf module read rfid serialy. otherwise rfmodule read after rfid.display is working. it is read befoer rfid the functions are write both side befoer while after while.it is displaied.what is the problem it is not logic. pleace explain me sir

     

     

     

    #include<reg51.h>

     

    #include<stdio.h>

     

    #include<string.h>

     

     

     

    sbit rs=P2^0;

     

    sbit rw=P2^1;

     

    sbit en=P2^2;

     

     

     

     

     

    unsigned char tem[9];

     

    void serialrx();

     

    void cmp();

     

     

     

    void lcdcmd(unsigned char l);

     

    void lcddata(unsigned char l);

     

    void display(unsigned char *dr);

     

    //void delay(unsigned char s);

     

    void delay(unsigned char l);

     

    void lcd();

     

     

     

    void lcdcmd(unsigned char l)

     

    {

     

    P1=l;

     

    rs=0;

     

    en=1;

     

    rw=0;

     

    en=0;

     

    }

     

     

     

    void lcddata(unsigned char l)

     

    {

     

    P1=l;

     

    rs=1;

     

    en=1;

     

    rw=0;

     

    en=0;

     

    }

     

     

     

    void display(unsigned char *dr)

     

    {

     

     

     

    while(*dr)

     

    {

     

      lcddata(*dr++);

     

    }

     

    }

     

    void delay(unsigned char l)

     

    {

     

      while(l--);

     

    }

     

    void lcd()

     

    {

     

     

     

         lcdcmd(0x0c);

     

         delay(6);

     

    lcdcmd(0x38);

     

    delay(6);

     

         lcdcmd(0x06);

     

         delay(6);

     

     

     

     

     

    }

     

    void main()

     

    {

     

            lcd();

     

        lcdcmd(0x80);

     

    delay(1000);

     

        display("WARRIOR TRANS");

     

    delay(1000);

     

    lcdcmd(0xc0);

     

    delay(1000);

     

        display("MISSION TOOL");

     

     

     

     

     

    while(1)

     

    {

     

        lcd();

     

        lcdcmd(0x80);

     

    delay(1000);

     

        display("WARRIOR TRANS");

     

    delay(1000);

     

    lcdcmd(0xc0);

     

    delay(1000);

     

        display("MISSION TOOL");

     

     

     

    serialrx();

     

          cmp();

     

     

     

     

     

    }

     

    }

     

    void cmp()

     

    {

     

    int a;

     

    char b[9]="16722482";

     

      a=strcmp(b,tem);

     

     

     

     

     

    if(a==0)

     

      {

     

         lcd();

     

    lcdcmd(0x80);

     

    display("                           ");

     

         delay(1000);

     

    lcdcmd(0x80);

     

         display("AUTHORISED");

     

    delay(1000);

     

    lcdcmd(0xc0);

     

    display("                           ");

     

         delay(1000);

     

    lcdcmd(0xc0);

     

         display("          TOOL ");

     

     

     

     

     

      }

     

    else

     

       {

     

          lcd();

     

    lcdcmd(0x80);

     

    display("                           ");

     

         delay(1000);

     

    lcdcmd(0x80);

     

         display("UNAUTHORISED");

     

    delay(1000);

     

    lcdcmd(0xc0);

     

    display("                           ");

     

         delay(1000);

     

    lcdcmd(0xc0);

     

         display("          TOOL ");

     

     

     

    }

     

     

     

    }

     

     

     

     

     

     

     

    void serialrx()

     

    {

     

    int i;

     

        TMOD=0x20;

     

        TH1=0xfd;

     

        SCON=0x50;

     

        TR1=1;

     

     

     

    for(i=0;i<8;i++)

     

    {

     

     

     

       while(RI==0);

     

         tem[i]=SBUF;

     

            RI=0;

     

    }

     

      tem[i]='\0';

     

    }

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 13 years ago in reply to e14 Contributor

    Could you please tell me or send me the details of your project " ELECTRONIC CODE LOCK SECURITY SYSTEM " ? Details like Circuit Diagram and Components used in the circuit. My email ID is razkr321@gmail.com . After understanding the complete project I can understand what changes should be done in programming.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 13 years ago in reply to e14 Contributor

    Hi

    Arbaaz Mandlik

    Could you please tell me or send me the details of your project " ELECTRONIC CODE LOCK SECURITY SYSTEM " ? Details like Circuit Diagram and Components used in the circuit. my email ID is razkr321@gmail.com . After understanding the complete project I can understand what changes should be done in programming.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • kevin@ukbiznet.co.uk
    kevin@ukbiznet.co.uk over 13 years ago

    Hi Michael

     

    Thanks for the reply Iam using a Vellemam USB VM140 but at some point I will need to brake the connection and use embedded I think the ST Cortex is my best option then especially due to its extra processing power

     

    Kevin..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 13 years ago

    HII

    hardwear detail:-

    TMS320C5515(DSP KIT)

    TELIT GL865(GSM/GPRS modem)

    TXS0102(voltage level converter)

     

    softwear problem:-

    code composer studio v5

    window 7 (64 bit)

    code in c language

     

    i want to send AT command to TELIT GL865 from TMS320C5515 (without using PC) ,but i am not getting OK respose from TELIT

    i am useing following code to transmit AT command

    ******************************************************************************

    void UartTxChar(unsigned char ch)  //function to transmit character

    {

              CSL_Status status;

     

              while (((hUart->uartRegs->LSR) & (0x0020)) != 0x0020);

              status = UART_write(hUart, &ch, 1, 0);

              if(status == CSL_SOK)

                                  {

                                    // printf("\n  sent %c",ch);

                                  }

                                  else

                                  {

                                            //printf("\n  Write Failed");

                                  }

              //USBSTK5515_waitusec(1000);

              //while(command != ch );

     

     

    }

    void UartTxString(unsigned char *str) //function to transmit string

    {

     

     

    while(*str != '\0')

     

     

    UartTxChar(*str++);

     

     

    UartTxChar(0X0D);

    UartTxChar(10);

    USBSTK5515_waitusec(25000);//put it to wait for sending

    USBSTK5515_waitusec(2500000);//put to wait for the ok

     

     

    }

     

    *******************************************

     

    and cde to recive ok

    *******************************************

    void uart_rxIsr(void)

    {

     

     

              //printf("rxc");

    //UART_read(hUart,&command,1,0);

              command = CSL_FEXT(hUart->uartRegs->RBR,UART_RBR_DATA);

              //if (command == 's')

              //{

              //          gcount = 1;

     

     

    //                    dsp_call = 0;

              //}

     

     

        Recv[etc] = command;

        for( j = 0; j<=5; j++ )

         printf("%c",Recv[j]);

        etc++;

    }

    *****************************************

    i am not able to find out where is problem and what is it

    plz help me to solve this problem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 13 years ago

    Hii,,

    I recently made a small project for my final project,

    This project involves the transmission of data via the serial port.

    I am using proteus to simulate the system as a whole and based on ATmega16.

    since my laptop does not have a serial port so I

    using Virtual Serial Port Emulator. While I use huperterminal to receive data transmitted by the microcontroller. I just do not have the data sent by the microcontroller.

    Someone please help me, I've thought about it for hours and did not manage to make the data sent ..

     

    This is a screenshot of proteus and code. ..

     

     

     

    image

     

    //Program for ADC to read from channel 0 and show the 8 bit o/p on PORTB

    // send the reading from ADC to Serial Port

     

    #include <mega16.h>

    #include <stdlib.h>

    #include <delay.h>

    #include <io.h>

     

     

    #define ADC_VREF_TYPE 0x40

    #define USART_BAUDRATE 9600

    #define BAUD_PRESCALE (((12000000/ (USART_BAUDRATE*16))) - 1)

    //------------------------------------------------

     

    void ADC_init(void) // Initialization of ADC

    {

    ADMUX=(1<<REFS0);

    ADCSRA=(1<<ADEN)|(1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0);    // faktor pembagi 128

    }

     

    void usart_init()

    {

    UCSRB |= (1 << RXEN) | (1 << TXEN);   // Turn on the transmission and reception circuitry

    UCSRC |= (1 << URSEL) | (1<<USBS) | (1 << UCSZ0) | (1 << UCSZ1);

    // Use 8-bit character sizes

     

    UBRRL = BAUD_PRESCALE;

    // Load lower 8-bits of the baud rate value into the low byte of the UBRR register

    UBRRH = (BAUD_PRESCALE >> 8); // Load upper 8-bits of the baud rate value..

    // into the high byte of the UBRR register

    }

     

    void usart_putch(unsigned char send)

    {

    while ((UCSRA & (1 << UDRE)) == 0); // Do nothing until UDR is ready..

    // for more data to be written to it

    UDR = send; // Send the byte

    }

     

    // Read the AD conversion result

    unsigned int ADC_read(unsigned char adc_input)

    {

    ADMUX=adc_input | (ADC_VREF_TYPE & 0xff);

    // Delay needed for the stabilization of the ADC input voltage

    delay_us(10);

    // Start the AD conversion

    ADCSRA|=0b01000000;

    // Wait for the AD conversion to complete

    while ((ADCSRA & 0x10)==1);

    ADCSRA|=0b00000;

    return ADCW;

    }

     

     

    void main(void)

    {

    unsigned int value;

    DDRB=0xFF;

    DDRD=0x03;

    ADC_init(); // Initialization of ADC

    usart_init();

    // ch=0;

    while(1)

    {

    value=ADC_read(0);

    value=value*500/1024;

    PORTB=value;

    //SEND_reading(value);

    usart_putch(value);

    delay_ms(10);

      }

    }

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
<>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube