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.

hello every body, i am looking some help for generating sawtooth using pic18f4431

Status
Not open for further replies.

medastar

Newbie level 6
Newbie level 6
Joined
Jul 3, 2013
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
78
Hello every body, i am looking some help for generating sawtooth using pic18f4431.i have attached the code.

Thanks inadvance
 

Attachments

  • genarating sawtooth and sinwave.txt
    2.6 KB · Views: 121

What is your problem?
Code do not work?
Or you do not understand how it work, if code work?
Or?!?


Best regards,

Mr.Cube
 

Hello Mr Cube,first i would like to thank you for help,the code doesnt give me what i am looking for.my aim is to generate sawtooth and also sinwave with different period and then compare sawtooth with sinwave to get sinusoidal pwm output signal from the pic.Expected pwm is attached
 

Attachments

  • Untitled.png
    Untitled.png
    97.2 KB · Views: 126
Last edited:

hello

First remark

i suppose int is size for signed int 16 bits ,as for C18 MPLAB , isn't it ?

you are using int (so signed int maxi=+32767) for counter1 value (and other int variables)
and test with
Code:
if (counter1 <=32000000) {....

use long int instead of int...
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top