EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / Well iam using mikroC pro as

Well iam using mikroC pro as

|

Microcontroller › PIC › pwm with pic 16f877a › Well iam using mikroC pro as

May 13, 2012 at 2:32 am #7779
Basit Ali
Participant

Well iam using mikroC pro as my compiler an here are the code.s iam using to set up my frq iam using this

 

PWM1_init();

 

an for changing the duty iam using

 

PWM1_Set_Duty();

 

iam doing the incriment and decrement in the duty properly its working fine 0-255

 

but iam having some problem with the frq varying

 

 

 if(RD1_Bit) {
                           Delay_ms(10);
                           PWM1_init(1000);
                           PWM1_Set_Duty();
                                                                          
                    }

 

atm iam just runing it like this but i want to do proper increment and decrement in the frq like 1khz to 50khz

 

with the help on 2 buttons

RSS Recent Posts

  • What is involved to convert a small town to fiber optic? December 11, 2025
  • volkswagen car stereo model rcd310 December 11, 2025
  • Dog fence help December 11, 2025
  • anyone recognizes this laser diode? December 10, 2025
  • How to power motors for lumbar support? December 10, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise