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 uc

Discussion in '8051/8951' started by Sherif Welsen, Oct 3, 2003.

  1. Sherif Welsen

    Sherif Welsen New Member

    Joined:
    Aug 18, 2003
    Messages:
    105
    Likes:
    0
    Location:
    Cairo, Egypt
    Hi every body,

    I wanna get some free link and pdf files on how I can write programs for 8051 using C language.

    I know a little bit how to write the program with assembly, the little about C that helps me to know how to write a program and I have also the ATML datasheet.

    I wanna free links, articles learning 8051 programming in general not the instruction-set itself so I said I have it from the datasheet.

    I'm having the ASM51 as an assembler but I can not debug my code with it, so are there any free debugers that can help me correcting my code if I write it with assembly???

    Thanks in advance
     
  2. kinjalgp

    kinjalgp Active Member

    Joined:
    Oct 28, 2002
    Messages:
    1,851
    Likes:
    3
    Location:
    INDIA/USA
    For debugging you should either use software simulator or a development board.

    Try TS Controls 8051 Simulator. Its free. I don't remember the link. Take Google's help over here :wink:

    If you are interested in devopment board, go to www.pjrc.com . There you'll find some excellent 8051 boards with classic monitor named "PAULMON".
     
  3. bmcculla

    bmcculla New Member

    Joined:
    Sep 5, 2003
    Messages:
    898
    Likes:
    0
    Location:
    California, USA
    Keil has an evaluation C Compiler with a code size limit of 4K - more than enough for a simple application.
    If you're looking for development Kits I'd recomend Cygnal's development boards. Super easy and really fast.
    If you can spend a bit of money Theres a couple of books "C and the 8051" (Schultz is the author), that have code and good explainations for a variety of 8051 applications.

    Brent
     
  4. dave

    Dave New Member

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


     
  5. Sherif Welsen

    Sherif Welsen New Member

    Joined:
    Aug 18, 2003
    Messages:
    105
    Likes:
    0
    Location:
    Cairo, Egypt

    Couldn't I have somthing free ???
     
  6. kinjalgp

    kinjalgp Active Member

    Joined:
    Oct 28, 2002
    Messages:
    1,851
    Likes:
    3
    Location:
    INDIA/USA
  7. mysemcon2000

    mysemcon2000 Member

    Joined:
    Aug 19, 2003
    Messages:
    85
    Likes:
    0
    I am selling an 8051 compatible chip and its loader is easy to build, it is also an in-circuit programmer - DS5000T, cheack http://www.maxim-ic.com.
     
  8. kinjalgp

    kinjalgp Active Member

    Joined:
    Oct 28, 2002
    Messages:
    1,851
    Likes:
    3
    Location:
    INDIA/USA
    DS5000T is a feature-rich uC but its very very costly. Most hobbyists can't afford it. By the way at what cost are you selling it? And also I would like to know why are you selling it? Haven't it performed upto your expectations?
     
  9. Sherif Welsen

    Sherif Welsen New Member

    Joined:
    Aug 18, 2003
    Messages:
    105
    Likes:
    0
    Location:
    Cairo, Egypt
    I couldn't get the TS Controls 8051 Simulator, may any one provide me with the website at which I can download the simulator please ???

    Thanks in advance.
     
  10. kinjalgp

    kinjalgp Active Member

    Joined:
    Oct 28, 2002
    Messages:
    1,851
    Likes:
    3
    Location:
    INDIA/USA
  11. Sherif Welsen

    Sherif Welsen New Member

    Joined:
    Aug 18, 2003
    Messages:
    105
    Likes:
    0
    Location:
    Cairo, Egypt
    Thanks alot kinjalgp, the page www.bit.kuas.edu.tw/~8051/ is really GOOD.

    But I still wanna know somthing:
    Is there any FREE site may learn me how to write a programm for 8051 using C language ???

    Thanks in advance.
     
  12. mysemcon2000

    mysemcon2000 Member

    Joined:
    Aug 19, 2003
    Messages:
    85
    Likes:
    0
    I am now using DS89C420, a faster one. I am selling the DS5K for US$ 100 - negotiable or exchange with other goodies.
     
  13. kinjalgp

    kinjalgp Active Member

    Joined:
    Oct 28, 2002
    Messages:
    1,851
    Likes:
    3
    Location:
    INDIA/USA
    There is no difference or say there is very little difference between the PC (x68) C and C for 8051 or any other uC. So if your fundamentals of normal "C" are clear then you can easily write your code in uC-C. You also have to know architecture of the microcontroller.
     
  14. Sherif Welsen

    Sherif Welsen New Member

    Joined:
    Aug 18, 2003
    Messages:
    105
    Likes:
    0
    Location:
    Cairo, Egypt
    I'm just asking about that,I know that I'll deal with the registers as a variables, but for example it I'm dealing with timer how can I send the TCON, TMOD declaration? also how can i deal with interrupts and so on....

    I hope you can understand what I need and get my point.

    Thanls in advance.
     
  15. kinjalgp

    kinjalgp Active Member

    Joined:
    Oct 28, 2002
    Messages:
    1,851
    Likes:
    3
    Location:
    INDIA/USA
    Ok I got your point. What you do is download either SDCC along with its documentation from http://sdcc.sourceforge.net or get Demo version (2k code limit) of KEIL C Compiler from www.keil.com along with its documentation. In either of the documentation you'll find how to handle interrupts and to load values into SFRs. Basically you write a separate subroutine for interrupt with "interrupt" and "using" keywords. See the syntax in documentation or accompanied C examples. Also SFRs are handled as unsigned char variables so you can directly write into it using statement like TCON = 0x20; etc. Regarding the location of this variable in internal memory is handled by accompanied header files. All you need to do is use appropriate header file in your program.

    Hope this helps.
     
  16. Sherif Welsen

    Sherif Welsen New Member

    Joined:
    Aug 18, 2003
    Messages:
    105
    Likes:
    0
    Location:
    Cairo, Egypt
    I have downloaded SDCC and will start reading its documentations.
    I'll keep in touch with u.

    Regards.
     
  17. Sherif Welsen

    Sherif Welsen New Member

    Joined:
    Aug 18, 2003
    Messages:
    105
    Likes:
    0
    Location:
    Cairo, Egypt
    Hi kinjalgp,

    I've downloaded TS simulator already, but I wanna ask you about somthing. Is there a FREE IDE software deals with 8051 family?

    Thanks in advance
     
  18. kinjalgp

    kinjalgp Active Member

    Joined:
    Oct 28, 2002
    Messages:
    1,851
    Likes:
    3
    Location:
    INDIA/USA
    What kind of IDE do you want? C compiler or assembler IDE?

    SDCC IDE is going to come soon. It is under development while you can find assembly language IDE "RAD51" @ http://www.systronix.com/home.htm . Its free.
     
  19. spyghost

    spyghost New Member

    Joined:
    Apr 8, 2004
    Messages:
    69
    Likes:
    0
    Reads51 Version 4.20

    try rigelcorp's reads51. its a good ide for 8051. i have used it since the first time i used 8051 (back then it was still rchipsim - a dos based 8051 simulator)

    i really like this software... try it... its absolutely free! 8)
     
  20. falleafd

    falleafd New Member

    Joined:
    May 13, 2003
    Messages:
    412
    Likes:
    0
    Location:
    Vietnam
    I'm using pinnacle 5.2, it works good
     
  21. Sherif Welsen

    Sherif Welsen New Member

    Joined:
    Aug 18, 2003
    Messages:
    105
    Likes:
    0
    Location:
    Cairo, Egypt
    Is it FREE?
    How can I downdload it?
     

Share This Page