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

Need a code for 3-channel PWM!!!

Hello, I am new in this forum (and in the world of µC] and I need the help of a professional! I have to generate a 3-channel PWM signal by means of a XC866 (Infineon). Has anyone got a C-code he could send me by e-mail? A DAVE file would be great, too.

Thanks a lot

Parents
  • Hello,

    Here I assume you are able to run Keil (or your own) monitor on your target h/w board. Then a simple still effective way to go:

    1) Write a very simple application like with main() only in your single-module-project (+asm initialization file of course)
    2) Setup the monitor: go to Project->Options for target "..." -> Debug Tab -> look at right side of the tab, check "Use" radio button, select Keil Monitor-166 Driver -> Then push "Settings" button -> do appropriate configuration
    3) Run Keil, and make sure you are connected to the target in debug mode: in Keil IDE: Debug->Start/Stop Debug Session
    4) Now, go to Keil IDE's Peripherals -> PWM Module -> ... take C16x manual ... and do everything you need, play around, connect the scope to the pins, enjoy ... - you should be able to drive real h/w PWM output

    --- Nikolay.

Reply
  • Hello,

    Here I assume you are able to run Keil (or your own) monitor on your target h/w board. Then a simple still effective way to go:

    1) Write a very simple application like with main() only in your single-module-project (+asm initialization file of course)
    2) Setup the monitor: go to Project->Options for target "..." -> Debug Tab -> look at right side of the tab, check "Use" radio button, select Keil Monitor-166 Driver -> Then push "Settings" button -> do appropriate configuration
    3) Run Keil, and make sure you are connected to the target in debug mode: in Keil IDE: Debug->Start/Stop Debug Session
    4) Now, go to Keil IDE's Peripherals -> PWM Module -> ... take C16x manual ... and do everything you need, play around, connect the scope to the pins, enjoy ... - you should be able to drive real h/w PWM output

    --- Nikolay.

Children