500khz circuit

Discussion in 'Embedded Systems and Microcontrollers' started by kachung30, Apr 12, 2010.

  1. kachung30

    Thread Starter New Member

    Feb 3, 2010
    6
    0
    how to use 8051 create a 500khz and come with assembly language?
    Otherwise,use other way to create.
    Thank You!
     
  2. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    It is not difficult to get 500KHz output with the right sort of 8051 variance. You just turn on a port pin and later turn it off. Repeat the process and you'll get 500KHz.

    However, it is most impossible for the second part of your problem as people usually do that type of activity via fancy imagination or photos from adult magazine.

    Never heard of any guy doing that thinking of "assembly language".
     
  3. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    Oh jeeeeze... never knew you have that in u ....I like it .....:D
     
  4. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    I just did my best to answer the question as accurately as possible. :D

    How would you have answered it, Rif@@?
     
  5. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    to tell u the truth, it is better not to tell, I tend to have a short fuse towards some .....well u know what I mean....
     
  6. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Some people swear to use only assembler language, and despite all kind of high level languages. But a true assembler fetishist, that is something new to me.
    By the way I guess it is meant that you use the internal timers in this assignment. Have you tried some googling/use of internet for the programming part of your question.
     
  7. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    .... I have always been one to take on the impossible, and am now studying assembler. ;)...

    I dont know how the girlfriend will explain this to her friends..."He dumped me for assembler!!, boo-hoo-hoo"

    If you want an 500KHz signal, it may be easier to start with a 4MHz xtal and use counters to divide by 4 then 2. That will give you a 1MHz signal after the divide by 4, then a 500KHz signal after the divide by 2.

    If this IS a homework problem, you are going to have to basically do the same thing, using code, depending on your clock signal.
     
  8. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,648
    764
    If the OP wrote it like this, he is not aware of the meaning, so most probably could not even uderstand the jokes. Until he starts searching some dictionaries of popular English or whatever.
     
    Last edited: Apr 13, 2010
  9. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    That's just show narrow mindedness.

    Each type of programming language exists for a good reason, which other languages cannot fill or replace. For assembly it is small code size, speed and precise timing.

    How else can one produce a 50.02Hz signal, using high level language?

    On some occasions one particular language is a better choice than the other. With the modern compilers, it is easy to use assembly language within the complex language structure of C to get the best of both worlds.
     
  10. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Do not take it to seriously(narrow mindedness etc), it was just to build up my joke, so I could make the punchline:rolleyes:
     
  11. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    No, t06afre. The post is a general comment not directed to you at all.

    At the opposite of the spectrum, I know of many people who swear to learn and use only high level languages and despise people using assembly language.
     
  12. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Use them all. There is a reason you can compile them together.. you can call ASM functions from C, basic, etc.. There are better ways to do different things in each language. If you want to do complex math, ASM isn't the way to go.
     
Loading...