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

programming in LPC2148

Please help me in writing a program for Pulse Generation using PWM techniques for fixed firing angle by using LPC2148 Microcontroller
*Not in C programming

Parents
  • It rather much seems that you are trying to avoid learning so that you can just hand-in someone else's work.

    The way to actually learn would be by studying the documents already listed.

    Here's a basic introduction to Keil's ARM MDK: http://www.keil.com/support/man/docs/gsac/

    Then work trough some simple examples yourself:

    1. Write some code to blink an LED connected to a pin.
    http://www.keil.com/support/man/docs/gsac/GSAC_createApps.htm
    http://www.keil.com/support/man/docs/uv4/uv4_examples.htm

    2. Learn how to use the debugger to step through your simple LED code, look at your variables, etc
    www.keil.com/.../gsac_debugapplication.htm

    3. Learn to use the UART to transmit a fixed "Hello, World" string. Again, practice using the debugger with it.

    4. Adapt your code to be able to send a variable string.
    This will be invaluable for future work - particularly, to send messages to a terminal so that you can see what your code is doing.
    Keep practising with that debugger...

    5. Adapt your code to be able to receive on the UART.
    This is a good basis for learning how to react to events coming from the hardware.

    6. Now study the documentation for your chips Timers. Use a Timer to blink the LED at a fixed rate

    7. Now study the documentation for your chips PWM features. Use that to blink the LED with variable duty cycle

    You're done!

    I guess you could skip straight from 2 to 6 to meet your immediate deadline, but being able to use the UART is really such a basic skill that you should not skimp on it...

Reply
  • It rather much seems that you are trying to avoid learning so that you can just hand-in someone else's work.

    The way to actually learn would be by studying the documents already listed.

    Here's a basic introduction to Keil's ARM MDK: http://www.keil.com/support/man/docs/gsac/

    Then work trough some simple examples yourself:

    1. Write some code to blink an LED connected to a pin.
    http://www.keil.com/support/man/docs/gsac/GSAC_createApps.htm
    http://www.keil.com/support/man/docs/uv4/uv4_examples.htm

    2. Learn how to use the debugger to step through your simple LED code, look at your variables, etc
    www.keil.com/.../gsac_debugapplication.htm

    3. Learn to use the UART to transmit a fixed "Hello, World" string. Again, practice using the debugger with it.

    4. Adapt your code to be able to send a variable string.
    This will be invaluable for future work - particularly, to send messages to a terminal so that you can see what your code is doing.
    Keep practising with that debugger...

    5. Adapt your code to be able to receive on the UART.
    This is a good basis for learning how to react to events coming from the hardware.

    6. Now study the documentation for your chips Timers. Use a Timer to blink the LED at a fixed rate

    7. Now study the documentation for your chips PWM features. Use that to blink the LED with variable duty cycle

    You're done!

    I guess you could skip straight from 2 to 6 to meet your immediate deadline, but being able to use the UART is really such a basic skill that you should not skimp on it...

Children