phoenix prasanna
Newbie level 6
- Joined
- Aug 19, 2013
- Messages
- 13
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 81
This is the code i m using to get 6 pulse PWM output using PIC18F4520 with 20MHz Fosc,50Hz PWM freq and 50% duty cycle bt m nt getting these values please help....!
thank u !
thank u !
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 void main() { TRISA = 0xFF ; TRISB = 0 ; // set PORTC as output PORTB = 0 ; // clear PORTC TRISC = 0 ; TRISD = 0 ; TRISE = 0 ; while(1) // forever { PORTB=0x03 ; // mosfet 1&2 ON Delay_ms(10); PORTB=0x06; // mosfet 2&3 ON Delay_ms(10); PORTB=0x0c; // mosfet 3&4 ON Delay_ms(10); PORTB=0x18; // mosfet 4&5 ON Delay_ms(10); PORTB=0x30; // mosfet 5&6 ON Delay_ms(10); PORTB=0x21; // mosfet 6&1 ON Delay_ms(10); } }
Last edited by a moderator: