Sep 26, 2020 #1 M mustafahasan Newbie 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 115.9 KB · Views: 79
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); } }
Sep 26, 2020 #2 KlausST Advanced Member level 7 Joined Apr 17, 2014 Messages 25,155 Helped 4,868 Reputation 9,757 Reaction score 5,535 Trophy points 1,393 Activity points 168,327 Hi, Because you used AC input setup instead of DC input setup. Klaus