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!

  • Now that is a real beaut.

    I just hope it was from a very bright student who wanted to be a bit cheeky with his teacher.

    I once saw some source code where the person didn't realize that decimal and hexadecimal is just different presentations of the same number, and that the C compiler supports hexadecimal constants.

    So the code contained:

    #define HEX_00 0
    ...
    #define HEX_A0 160
    #define HEX_A1 161
    ...
    #define HEX_FF 255
    


    Good to have in case he needed a hexadecimal number and forgot how to translate to decimal :)

    Or maybe he had seen one of the binary declarations that exists here and there, and not realized that a header file with:

    ...
    BIN_0110_1001 0x69
    BIN_0110_1010 0x6a
    ...
    


    exists just because binary numbers aren't part of the standard language, while the compiler has very good hexadecimal support directly in the language standard.

  • So i have to use the delay function inorder for this to work? But how do I create a delay function with AT89S8252?

    Next thing, How do i ensure that my development board is correctly connected other than using the blinking code for testing, are there any other code which i can use for testing?

    Thirdly, I have use meridian software to connect the development board, But when i select COM1 port, the active light will go off and I cannot chose the device from the list. Is this normal?

    The board that i am using is EQ-8051-ST1 is a AT89S8252 chip, which i see from the board.

  • Thou shalt not kill (depending upon the project specifications)

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

  • They will not be introduced until the positronic brain has been released.

    By the way. Asimov later extended with a fourth rule about the good of the many, to avoid freezing and permanently destroyed positronic brains ;)

  • and, of course, he later introduced the "zero law" as well.

  • About PCW, I want to know the hexa code for this thing so that i can configure the output of the port. Because I heard that I need to configure the port so that I can make the LED blink

  • What is PCW?

    Your subject "RE: PCW" seem to imply a continuation of an earlier discussion, but PCW has not been mentioned anywhere earlier in this thread.

    Are you talking about the PCW C compiler?

  • 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

  • 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"