Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Weird PWM output voltage range with PIC18F4580

Status
Not open for further replies.

mustafahasan

Newbie
Newbie level 3
Joined
Jul 26, 2018
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
91
Hi...
Please I need help, with PIC18F4580.
I am using mikroc with 0.1Mhz with this simple code. the question is why my min and max output voltage in the oscilloscope (i am using proteus) are -2.5v and 2.5v? not 0 and 5 v??

void main()
{
trisc.b2=0; portc.b2=0;
pwm1_init(50000); delay_ms(200); pwm1_start();
while(1)
{
pwm1_set_duty(128);
}
}
 

Attachments

  • problem.png
    problem.png
    115.9 KB · Views: 97

Hi,

Because you used AC input setup instead of DC input setup.

Klaus
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top