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

Speaker simulator

i urgently need a speaker simulator program for the project. i try searching my intrnet but cannot find much that is good.
please someone must have some like anyone have library or source code for it?

Parents Reply Children
  • i didnot change your code.
    whose code? what code? post (a link to) it.

    i go again and led is not bright but same code ?
    what do you mean by "go again"? power down/power up? reset? loop?

    more words do not make you appear stupid, they make you appear clear

    Erik

  • "i put on the led to the port pin"

    What does that mean?!

    Trying to describe electronic circuits in words is a really Bad Idea.
    Upload a schematic (circuit diagram) to somewhere accessible, and post a link to it.

    "it lit bright but then wend down"

    Again, what does "wend down" mean??

    Did you use a series resistor, or other current-limiting device?
    If not, it could well be that it "lit bright" until the LED and/or the port driver blew up - so it will obviously never work again!

  • yes it is not your code it is mine

    i start the code again and the led is not bright but it was before

  • A LED that is connected directly to a processor pin without a series resistor is likely to light up very bright, but for a limited time.

    Very few LED are suitable for direct connection to 3.3V and the problem is evern worse if you have a processor with 5V output logic.

  • you told me too put led to the port pin

    what is series resestor? i look in help for compiler but can not find

  • "what is series resestor?"

    Oh dear!

    This is basic electronics. You need to put the software aside for a while, and learn about basic electronics.
    Or stick to a purely software-only project.

    " i look in help for compiler but can not find"

    Of course you can't: it's part of your target hardware - it has nothing whatsoever to do with the compiler.

  • I looked in manual for car and couldn't find how to clean bath tub. What did I do wrong?

    How much time have you spent with Google? Have you tried to google for information about how to use a LED? Have you tried to google for LED and resistor? Have you googled for series resistor? Have you googled for LED and FAQ? Have you noted that a number of places that sells LEDs also sells resistors? Are you activelly looking for information, or do you think it is better to invite someone to get to your house and do all jobs for you? This alternative may be easier, but such people want to get payed!

    Connect a LED to a pin does not mean that there are one - and only one - way to connect it. The LED has two pins. One pin _may_ be connected directly to a processor pin, potentially with a series resistor in between. The other pin _may_ be connected to VCC or to GND, potentially with a series resistor in between. The resistance of that series resistor depends on the output-high voltage of the processor pin OR the VCC value. And it depends on the voltage the specific LED requires. And it depends on how many mA you want to feed to the LED. Different LED requires different amount of current (mA) to light. Some are more efficient. Some are less efficient. Some support very high currents. Some support a very limited current. The world is full of variables. They must all be taken care of to get a final solution. You have not posted a single fact - so not a single variable has been given a known value. Hence, there is not anyone on this list who can help you. The big problem here is that you seem incapable of helping yourself too. You seem to make random assumptions, instead of starting with facts and build from a known base.

  • You said you spoke to a lecturer about this.

    Clearly, the lecturer assumed that you understood these things.

    As Erik observed earlier, either this 'lecturer' is asking you to do things he has not covered (which is unreasonable), or you have not been applying yourself to your course...

  • "you told me too put led to the port pin"

    Nobody on this forum told you to "put led to the port pin"

    You said the LED was suggested by a lecturer - didn't he say how to connect it? If you didn't know, why didn't you ask him?

  • i think i go back and make sound bcoz i think it is eesier

  • you told me to set that port pin to the appropreate level so i did and now you said i am not right

    now it does not work

    i tell my lecterer you make mistake and not me!

  • "you told me to set that port pin to the appropreate level"

    True - but nobody said how to connect the LED!

    You were asked now you connected the LED!

    "i tell my lecterer you make mistake and not me!"

    So you don't think your lecturer will be able to read this thread and see for himself...?

  • As you clearly don't know what you're doing with the hardware, it will be just as easy for you to blow up more port pins with mis-connected speakers as with mis-connected LEDs...!

  • i think i go back and make sound bcoz i think it is eesier
    1) You will NEVER get anywhere if you, when something does not go your way, switch to something else
    2) A LED is easier than sound.
    3) There is no easy way, "skipping the basics" will get you nowhere
    4) What does "bcoz" mean is it Urdu or Swahili?

    from your first post:
    I urgently need .... source code for it?

    later in the thread:
    how can i ... has someone a sample code

    Every request in this thread for you to show what you have, has gone unanswered.

    My guess is that you have not done diddlysquat and am totally incapable of doing, but just keep pushing in the hope that a fried pigeon (ready to deliver schematic and code) will fly in through the window.

    Erik