This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nid help on LED blinking

i have problem with the led blinking. I using the exmaple program given by keil using uVision3. When i run the program, the LED on the development board didnt blink, it just stay on! wat should i do?

thanks!

Parents
  • captain, what about the three rules of robotics... ;-)

    If a 'robot' implements Asimov's three Laws, its OS was most likely written by Microsoft, Apple, or Ben & Jerry's All Natural Coding Company.

    Elsewhere, especially in the despot 3rd world like North Korea, or any communist country, Asimov's Law wouldn't be coded up with zeal.

    The real-world variation to Isaac Asimov three laws of robotics is
    the "Kim Jung Mao Tse-Stalin" Three Laws of Robotics:

    1. A robot may not injure a human being or, through inaction, allow a
       human being to come to harm.
    
    2. All Robots are to comply with The Higher Utopian Government (THUG)
    
    3. Rule 2 supersedes Rule 1.
    

    My rule-book against [coding] radicals does have a Human Safety Factors Section. No reference to Isaac though.

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

Reply
  • captain, what about the three rules of robotics... ;-)

    If a 'robot' implements Asimov's three Laws, its OS was most likely written by Microsoft, Apple, or Ben & Jerry's All Natural Coding Company.

    Elsewhere, especially in the despot 3rd world like North Korea, or any communist country, Asimov's Law wouldn't be coded up with zeal.

    The real-world variation to Isaac Asimov three laws of robotics is
    the "Kim Jung Mao Tse-Stalin" Three Laws of Robotics:

    1. A robot may not injure a human being or, through inaction, allow a
       human being to come to harm.
    
    2. All Robots are to comply with The Higher Utopian Government (THUG)
    
    3. Rule 2 supersedes Rule 1.
    

    My rule-book against [coding] radicals does have a Human Safety Factors Section. No reference to Isaac though.

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

Children
  • Vince,
    You are the perfect warrior: Combining a poetic soul with cutting edge deadly accuracy...!

  • Thanks for the compliment (that helps with my 'ego troubles')

    "cutting edge deadly accuracy"

    You have no idea... oh, wait... here's some "Killer Apps" I wrote a while ago...

    (No 8051s were harmed in the making of these films. If you are a Ti DSP fan, you might avert your eyes.)

    (no, I don't work for Raytheon).

    NOTE: 1.8MB video
    www.raytheon.com/.../cms04_022892.wmv
    
    
    CAUTION: LARGE FILE 36MB video...
    www.raytheon.com/.../rtn_rms_ps_excalibur_video2.wmv
    

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

  • Vince,
    Is this the new GPS guided artillery shell? I saw a TV program about it (I this is was on Discovery Science but I am not sure). They said something about the very high angle it hits its target, so that the bad guys cannot hide behind buildings!

  • "Is this the new GPS guided artillery shell?"

    There are several of these GPS guided/assisted gun-launched systems. XM982 was only one of the trail-blazers. Don't forget: it has to be designed to handle the 'Howitzer' launch and balloting forces--you've heard of rugged-ized computers?

    "I saw a TV program about it"

    Yes, they've been on "Future Weapons" and other History / Discovery channel shows. XM982 gets most of the limelight right now.

    The first video is a munition that hasn't been on those shows: yet (that I know of).

    Its funny how I'll watch these shows and be surprised that they're showing 'my stuff.' (There are huge teams of engineers working on these, I think we all take total ownership of these projects).

    There is usually a few years of lag between development and 'public release.' It used to be a lot longer, now its only a few years---uh well for some projects.

    The high-angle thing is just one of many possible capabilities of these types of rounds. They can alter their trajectories to help prevent the enemy from knowing the launch points. In addition (the video sort of shows this, but you'd have to know it) you can launch them at staggered times and places, yet they can hit the target(s) 'simultaneously'.

    The first video has IR capability: it can hit a moving target, so the GPS helps get to the target area while the IR does the terminal maneuvering. (the convoy on-the-move can still be shelled).

    "...hide behind buildings!"

    That type of high angle of attack allows the bad-guy bunker between the tall buildings get nailed. ...without also taking out the hospitals, day-care centers, shopping mall, code-monkey diploma mills, etc.

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

  • “I Am Become Death, The Shatterer Of Worlds"

  • Vince,
    I hope you were not offended by this famous quote. It was meant as a compliment! By the way, for the sake of the ill-informed, "I Am Become Death, The Shatterer Of Worlds" is a quote from the Bhagavad Gita, uttered by Robert Oppenheimer 63 years ago today, on the occasion of the first nuclear weapon's test in New Mexico. It just crossed my mind.

  • Gita outta here! No offense taken.

    But don't give Oppenheimer a Baum rap. He ensured that the good guys (aka USA) had it first.

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

  • Hmm no such thing? So is there any hexa code for port 1 or 2 of the development board so that i can enable the port to send output to the LED

  • So is there any hexa code for port 1 or 2 of the development board so that i can enable the port to send output to the LED
    depends on current requirements
    depends on LED configuration
    depends on ...

    Erik

  • "So is there any hexa code for port 1 or 2 [...]"

    I somehow get the impression that the language fools you. This is not similar to a "cheat code" or "access code" that you get from someone and that allows you to activate a new feature.

    Hexadecimal numbers are just a different way of writing a number. No need to use hexadecimal numbers. An 8-bit port can handle a number between 0 and 255 (8 bits represents 2^8 = 256 states).

    You must know what you have connected to different pins of a port. Then you must calculate what number to write to the port to tell if a pin is input or output. And you must calculate what pins to drive high or low. And you must calculate what pins you are interested in when reading a port.

    Note that your processor pins may not require any special setting to change the individual pins between input or output. But your datasheet will tell you.

    And you have still not told what your PCW is?

  • And you have still not told what your PCW is?

    Hell, maybe PSW (does it even exist on a C51...?)

  • Sorry it should be control word, not PCW. Hmm can tell me where to find the formular to calculate the whether the pin is input or output?

  • Yes. The formula is simple:

    a*1 + b*2 + c*4 + d*8 + e*16 + f*32 + g*64 + h*128
    

    You have eight bits. Each having a bit position, i.e. a value of 1, 2, 4, 8, 16, 32, 64 or 128. The datasheet will tell what happens if you write a one or a zero to the bit. And it will tell if the relevant port has a data direction register, or if it only supports a open-drain transistor with a weak pull-up.

    Now add together the relevant bit values. You do not post and ask how to sum the money to pay at the cafeteria. No need to ask how to sum the individual bits for the I/O ports either. And you should also be able to find a huge amount of sample code that shows how to use port pins as inputs and/or outputs. How much time have you spent reading datasheets and code in the week since this thread started? You should be quite comfortable with this by now.

  • oo so this formula is a representation of CW right? which determine which port is input and which port is output rite? thanks alot!

  • i saw this digram on how control word works.
    Link: www.sharpmz.org/.../8255ovview.htm

    It says that the bit can control which port to work. So do i need to use binary for the program or just use hexadecimal/decimal will do?

    One more thing, my data sheet does not clearly tell which hexadecimal is for control work. Because without the hexadecimal for the CW, i am not able to program the port using the formula that u gave me.