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 #7759
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

  • How to repair this plug in connector where wires came loose May 17, 2025
  • Lightbox circuit May 17, 2025
  • Fuel Auto Shutoff May 17, 2025
  • Kawai KDP 80 Electronic Piano Dead May 17, 2025
  • Python help with keystroke entries May 17, 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