1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

8051 temperature control codes needed !

Discussion in '8051/8951' started by The Light, Aug 24, 2007.

  1. The Light

    The Light New Member

    Joined:
    Aug 24, 2007
    Messages:
    7
    Likes:
    0
    hello every1

    Im trying to construct a fan which works based on sensing the surrounding temperature.
    I need assembly.L codes for the 8051 to make it able to control the temperature-sensor system connected to 8051 pins.

    note:
    - no external memory used
    - the temperature-sensor system circuit is based on (LM35 transistor , and LM358 amplifier)
    - this is the first time i use 8051 and the assemly.L

    if more details needed , i will put the whole project circuit

    thx for helping :)
     
  2. simrantogether

    simrantogether New Member

    Joined:
    May 22, 2006
    Messages:
    433
    Likes:
    4
    Location:
    Bangalore
    well...

    Well.. good try...

    whatever you are demanding.. you'll be getting at ...

    www.freewebs.com/maheshwankhede

    these are the best interfacing tutorials you can ever get.. on 8051... along with circuit diagram and assembly & c code...

    regards,

    simrn..:)
     
  3. simrantogether

    simrantogether New Member

    Joined:
    May 22, 2006
    Messages:
    433
    Likes:
    4
    Location:
    Bangalore
    one more thing.. the tutorials that you shall be seeing in above website... you can change LM 358 by op amp 741...

    second thing is that.. LM 35 is temperature sensor ( transistor like) .. and not just a transistor..


    the design of opamp is shown on page http://www.freewebs.com/maheshwankhede/sensors.html

    regards..

    simran:)
     
    Last edited: Aug 25, 2007
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. The Light

    The Light New Member

    Joined:
    Aug 24, 2007
    Messages:
    7
    Likes:
    0

    thx Simran for the help

    but the problem is i dont know how to program, this is the first time i use assembly language and i dnt have alot of time to MASTER programming.
    i know the basics only, and everytime i search for the explanation i find the basics only, i need some advices on how to begin programing, what i have to program, and what r the steps, etc..

    so i need a real help here

    thx
     
  6. The Light

    The Light New Member

    Joined:
    Aug 24, 2007
    Messages:
    7
    Likes:
    0
    1/ no
    2/ yes
    3/ 4 dayz ago ( i actualy know the theory, but when i come to practical programming i dont know what to do, how to think , what codes to use)

    thx
     
  7. simrantogether

    simrantogether New Member

    Joined:
    May 22, 2006
    Messages:
    433
    Likes:
    4
    Location:
    Bangalore

    ok...

    listen and understand the following steps:

    1. get a chip from the market called 89s51 from the company called ATMEL... remember to buy 89s51 not 89c51... if possible...

    2. make a programmer in your home using solder iron..and other equipments from website marked with '*'


    '*' http://www.mytutorialcafe.com/Microc...9S %20USB.htm

    www.8052.com/users/AT89S52InSystemProg/

    '*' http://www.ikalogic.com/isp.php

    the second programmer is also very very good but you are new in the field of controllers...

    3. download raisonance assembler from 8052.com ... given on left hand side...

    till now do this...

    regards

    simran...
     
  8. The Light

    The Light New Member

    Joined:
    Aug 24, 2007
    Messages:
    7
    Likes:
    0
    realy thanks for helping , but at the moment i cant begin doing the ISP.
    my program should be ready within 1 week.
    i realy want to know how to think about making a whole program by my self , and how to think what code to use. but i dont know, i think it need alot of time to learn this
     
  9. simrantogether

    simrantogether New Member

    Joined:
    May 22, 2006
    Messages:
    433
    Likes:
    4
    Location:
    Bangalore
    no problem

    yes,

    atleast one month is required to understand the internal architecture and interfacings...

    but dont worry... i'll give you the circuit diag..

    you buy the components and a solder iron...

    wait for next reply...

    regards,

    simran...:)
     
  10. philba

    philba New Member

    Joined:
    Mar 12, 2006
    Messages:
    1,886
    Likes:
    8
    Location:
    Seattle
    I hope you give simran credit on your assignment when you turn it in.
     
  11. simrantogether

    simrantogether New Member

    Joined:
    May 22, 2006
    Messages:
    433
    Likes:
    4
    Location:
    Bangalore
    well..

    Thanks...:)
     
  12. simrantogether

    simrantogether New Member

    Joined:
    May 22, 2006
    Messages:
    433
    Likes:
    4
    Location:
    Bangalore
    responding of help...

    oh.. you just need the program rather than circuit diagram...

    Well, program should be compatible with ckt. diag..

    1. i am sending you the attachment of block diagram... all you have to do is interface one thing with other with the fhelp of these tutorials...

    2. codes are also given in this....

    -----------------------------------------
    Basic circuit:

    http://www.freewebs.com/maheshwankhede/basic.html

    for adc.. just follow ADC 0804

    http://www.freewebs.com/maheshwankhede/adcdac.html

    for LM 35 temperature sensor..

    http://www.freewebs.com/maheshwankhede/sensors.html

    for LCD display...


    http://www.freewebs.com/maheshwankhede/lcd.html

    YOU CAN CHOOSE ANY COMPONENT YOU LIKE...:)

    REMEMBER: DO NOT HASTE... IF YOU CANT MAKE FULL THING MAKE PART OF THAT THAT IS CORE...

    REGARDS,

    SIMRAN..
     

    Attached Files:

  13. The Light

    The Light New Member

    Joined:
    Aug 24, 2007
    Messages:
    7
    Likes:
    0
    EVERYBODY!!!

    i need these codes urgently , the oject submition after few dayz !

    this is the schemac :
    http://www2.0zz0.com/2007/09/04/19/18506509.jpg


    plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz help meeeeee !! :(:(:(:(:(:(:(:(:(:(:(:(:(
     
  14. The Light

    The Light New Member

    Joined:
    Aug 24, 2007
    Messages:
    7
    Likes:
    0
    thats what i'v done untill now :

    PWM code :

    Org 0H

    sjmp start

    org 0BH

    TIMER_0_INTERRUPT:

    JB F0, HIGH_DONE ; If F0 is set then we just finished the high section of the
    LOW_DONE: ; cycle so Jump to HIGH_DONE
    SETB F0 ; Make F0=1 to indicate start of high section
    SETB P1.0 ; Turn off LED
    MOV TH0, R7 ; Load high byte of timer with R7 (pulse width control value)
    CLR TF0 ; Clear the Timer 0 interrupt flag
    RETI ; Return from Interrupt to where the program came from
    HIGH_DONE:
    CLR F0 ; Make F0=0 to indicate start of low section
    CLR P1.0 ; Turn on LED
    MOV A, #0FFH ; Move FFH (255) to A
    CLR C ; Clear C (the carry bit) so it does not affect the subtraction
    SUBB A, R7 ;Subtract R7 from A. A = 255 - R7.
    MOV TH0, A ; so the value loaded into TH0 + R7 = 255
    CLR TF0 ; Clear the Timer 0 interrupt flag
    RETI ; Return from Interrupt to where the program came from

    start:

    MOV TMOD, #00H
    SETB TR0 ; turn on timer 0
    SETB EA ; Enable Interrupts
    SETB ET0 ; Enable Timer 0 Interrupt
    MOV R7, #160 ; set pulse width control to dim
    LOOP:
    SJMP LOOP ; go to LOOP
    END
    ------------------------------------------------------------------

    7-segment :

    Mov dptr,#decodedtable ;load the decoded values
    mov temp, a ;where temp is a temp variable
    anl a, #0F0H ;we just need the higher nibble
    swap a
    movc a,@a+dptr ; load the decoded value for
    ; the number to display

    mov 7segport, a ;7segport is the port where 7segments
    ;are connected
    acall delay ;you need some delay here.. about 10ms
    ;or more.. you can adjust it when u run
    ;then enable the common pin here
    setb common1 ;for first 7-seg

    ;now we send the lower nibble
    mov a, temp ;restore the number form temp
    anl a, #0FH ;mask the higher nibble to extract
    ;lower nibble only
    movc a, @a+dptr ;load the decoded value for
    ;lower nibble
    mov 7segport , a ;send the decoded value
    setb common2 ;enable the common pin for
    ;second 7-seg display
    decodedtable:
    db (decoded values here)....
    -----------------------------------------------------------

    thats all i got , plzzzzzzzzzzz help me
     
  15. simrantogether

    simrantogether New Member

    Joined:
    May 22, 2006
    Messages:
    433
    Likes:
    4
    Location:
    Bangalore
    Well,

    Well,

    i just want to say that all you require is not more than 2 days work for which you spent so many days..

    the mistake you've done is that you were either not serious or a lot of pressure is on you for other work also..

    it is better to take help of some hobbyist near your home..

    Regards,

    Simran..:)
     
    Last edited: Sep 12, 2007
  16. simrantogether

    simrantogether New Member

    Joined:
    May 22, 2006
    Messages:
    433
    Likes:
    4
    Location:
    Bangalore
    Now also..


    Now also , i ask you to follow my suggestion..

    see my previous post where i had given my links to freewebs.com ..

    download all the four..

    take their print out after converting it into word format..

    and take the help of some college seniors to understand them..

    all is there in that..

    Remember, if you'll not do this .. I feel you'll waste your time..

    Remember one more thing , even if u not fully make this project and submit small modules or parts.. then also your teacher might be happy.. atleast you've applied some effort.. without help of any other..

    Regards,

    Simran..
     
    Last edited: Sep 12, 2007
  17. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,235
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    hi,
    Adding my comments.
    A post like the included quote will NOT get you the response you are asking.

    Most members just get irritated when they see this sort of post.

    Basically,
    You should have started the assignment earlier or you should have sufficient tuition to enable you complete the assignment with just a little help from the forum.

    Anyway, good luck with you project.
     
  18. simrantogether

    simrantogether New Member

    Joined:
    May 22, 2006
    Messages:
    433
    Likes:
    4
    Location:
    Bangalore
    What has..

    See..

    What has happened has happened..

    now look at the following links and convert it into word format..

    and study carefully for two days..

    take help of this forum..

    -----------------------------------------
    Basic circuit:

    http://www.freewebs.com/maheshwankhede/basic.html

    for adc.. just follow ADC 0804

    http://www.freewebs.com/maheshwankhede/adcdac.html

    for LM 35 temperature sensor..

    http://www.freewebs.com/maheshwankhede/sensors.html

    for LCD display...

    http://www.freewebs.com/maheshwankhede/lcd.html


    ---------------------------------

    i hope you should start your work..

    Regards,

    Simran..:)
     
  19. The Light

    The Light New Member

    Joined:
    Aug 24, 2007
    Messages:
    7
    Likes:
    0
    ok thanks , i want to tell u that i hav a group of 10 person.
    but im doing 80% of the job ( hardware + software ) , thats why

    thank u anyway
     
  20. philba

    philba New Member

    Joined:
    Mar 12, 2006
    Messages:
    1,886
    Likes:
    8
    Location:
    Seattle
    this is why I tend not to help students. simran, you have more patience than I. I say point them in the right direction, once. if they can't get there from that, they should switch to liberal arts...
     
  21. simrantogether

    simrantogether New Member

    Joined:
    May 22, 2006
    Messages:
    433
    Likes:
    4
    Location:
    Bangalore
    Let's try

    i hope you are right..

    but i feel that embedded systems and microcontrollers are one of the good fields.. the person can make his career of.. and enjoy his work..

    Lets try best.. so that other people can take maximum out of this field..

    Hope so..

    Regards,

    Simran..:)
     

Share This Page