EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home

umar farrok

  • Profile
  • Topics Started
  • Replies Created
  • Engagements

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 39 total)
1 2 3 →
  • Author
    Posts
  • September 30, 2013 at 12:36 pm in reply to: 1 ms delay calculation #10498
    umar farrok
    Participant

    max=val; (variable with 8 bit data type)

    for two digit , three digit use the i value for example,

     

    three digit

     

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

    {

    temp=max/10;

    max=max%10;

    }

    September 30, 2013 at 12:33 pm in reply to: 8051 timer #10497
    umar farrok
    Participant

    first you have to be clear you create a delay by using hardware or software delay by using timer circuit or using timer calculation in the code depends upon that you have to choose your pin as gate is 0 or gate is 1

    September 30, 2013 at 12:30 pm in reply to: Electronic Voting Machine is not working #10496
    umar farrok
    Participant

    there may be a voltage lag or corresponding voltages not reached to the pins check that when pressing switch logic high is passing in that corresponding  line

    September 30, 2013 at 12:27 pm in reply to: KEIL C code warnings solution? #10495
    umar farrok
    Participant

    check the macros in your code 

    August 1, 2013 at 6:45 am in reply to: Interfacing AT24c64 with 89c52 #10254
    umar farrok
    Participant

    jeni try this 

     

     

    CODE:
    ;***************************************
    ;Ports Used for I2C Communication
    ;***************************************
            sda equ P0.0
            scl equ P0.1

    ;***************************************
    ;Initializing I2C Bus Communication
    ;***************************************
    i2cinit:
            setb sda
            setb scl
            ret

    ;****************************************
    ;ReStart Condition for I2C Communication
    ;****************************************
    rstart:
            clr scl
            setb sda
            setb scl
            clr sda
            ret

    ;****************************************
    ;Start Condition for I2C Communication
    ;****************************************
    startc:
            setb scl
            clr sda
            clr scl
            ret

    ;*****************************************
    ;Stop Condition For I2C Bus
    ;*****************************************
    stop:
            clr scl
            clr sda
            setb scl
            setb sda
            ret

    ;*****************************************
    ;Sending Data to slave on I2C bus
    ;*****************************************
    send:
            mov r7,#08
    back:
            clr scl
            rlc a
            mov sda,c
            setb scl
            djnz r7,back
            clr scl
            setb sda
            ret

    ;*****************************************
    ;ACK and NAK for I2C Bus
    ;*****************************************
    ack:
            clr sda
            setb scl
            clr scl
            setb sda
            ret

    nak:
            setb sda
            setb scl
            clr scl
            setb scl
            ret

    ;*****************************************
    ;Receiving Data from slave on I2C bus
    ;*****************************************
    recv:
            mov r7,#08
    back2:
            clr scl
            setb scl
            mov c,sda
            rlc a
            djnz r7,back2
            clr scl
            setb sda
            ret
     




    ? Assembly Implementation:
     

    CODE:
    #define SDA P0_0
    #define SCL P0_1

    void I2CInit(){
            SDA = 1;
            SCL = 1;
    }

    void I2CStart(){
            SCL = 1;
            SDA = 0;
            SCL = 0;
    }

    void I2CRestart(){
            SCL = 0;
            SDA = 1;
            SCL = 1;
            SDA = 0;
    }

    void I2CStop(){
            SCL = 0;
            SDA = 0;
            SCL = 1;
            SDA = 1;
    }

    void I2CAck(){
            SDA = 0;
            SCL = 1;
            SCL = 0;
            SDA = 1;
    }

    void I2CNak(){
            SDA = 1;
            SCL = 1;
            SCL = 0;
    }

    void I2CSend(unsigned char Data){
             unsigned char i;
             for(i=0;i<8;i++){
                    SCL = 0;
                    if((Data&0x80)==0)
                            SDA = 0;
                    else
                            SDA = 1;
                    SCL = 1;
                    Data<<=1;
             }
             SCL = 0;
             SDA = 1;
    }

    unsigned char I2CRead(){
            unsigned char i, Data=0;
            for(i=0;i<8;i++){
                    SCL = 0;
                    SCL = 1;
                    if(SDA)
                            Data |=1;
                    Data<<=1;
            }
            SCL = 0;
            SDA = 1;
            return Data;
    }
     

    August 1, 2013 at 6:39 am in reply to: Interfacing AT24c64 with 89c52 #10253
    umar farrok
    Participant

    use this link you will get some idea 

     

    http://www.8051projects.net/i2c-twi-tutorial/8051-i2c-implementation.php

    July 26, 2013 at 12:13 pm in reply to: celsuis and fahrenheit digital thermometer #10220
    umar farrok
    Participant

    the reason is to convert your analog value of your temp values using adc reference pin of adc is the main consideration . exmple for 1c what is the voltage value you have to know. from that you do some simple calc and set that voltage level in your adc ref pin

    you will get correct values 

    July 26, 2013 at 12:10 pm in reply to: Interfacing AT24c64 with 89c52 #10219
    umar farrok
    Participant

    in assembly i am not very well in that i am doing program using embedded c if you are familiar with that mean i send sample code to access smartcard i2c with controller jeni

    July 26, 2013 at 12:08 pm in reply to: regarding stepper motor #10218
    umar farrok
    Participant

    rpm, power rating, degree 

    July 26, 2013 at 12:06 pm in reply to: Logic or c code for maintaining the temperature #10217
    umar farrok
    Participant

    if you are using lm 35 or lm 34 as temperature sensor that range should be -55 to 150 c for lm35 . you simply get the analog values of temp sensor and passed to adc single or multi channel and from that digital values you add that with 0x30 or 48 with your original temp value to get correct value  as well as resolution, reference calc is also one of the important parameter . 

    July 26, 2013 at 12:02 pm in reply to: DB 9 connection #10216
    umar farrok
    Participant

    if  communication is between pc to pc, controller to db-9 ,pin 2,3 and 5 enough . txr to rxr , rxr to txr gnd to gnd 

    July 26, 2013 at 11:59 am in reply to: Home Automation #10215
    umar farrok
    Participant

    interface gsm is quite simple now in today technology either by rs232 cable  with  or usb cable .

    July 26, 2013 at 11:52 am in reply to: RF Modules #10214
    umar farrok
    Participant

    add your data with (data+0x30) or(data +48) in order to get your correct value. 

    July 26, 2013 at 11:49 am in reply to: can’t use uint64_t #10213
    umar farrok
    Participant

    saranda it depends upon the compiler you have usen may be ide wont support more than 2bytes , 4bytes like that first you check your ide as well as the os for the system you are using . where you use 64 bit?  for which processor you are using this , if you provide some details it may helps to go on further.

    March 28, 2013 at 6:52 am in reply to: Regarding help for developing a microcontroller projects #9385
    umar farrok
    Participant

    hi daya first of all you know the each and every details about the controller you have get the pdf details about the controller details like ram , rom, external memeory size , data bit address bit, sfr’s everything  then try small program with your controller like port led blinking likewise first of all try this willl let you know after you complete this task ok va have a nice day to you :)

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 39 total)
1 2 3 →

RSS Recent Posts

  • isolating S-params in of PCB board without connectors April 11, 2026
  • Assistance locating a 'trail' camera gadget, please ? April 10, 2026
  • Raise your hand if your car had one of these: April 10, 2026
  • Some opamp advice please April 10, 2026
  • Voltage comparator circuit verification April 10, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise