Can you use the functions of pwm. Personally I think putting everything together is a mess. I really liked it several separated h files What is the relationship between the functions of adc. Super Member. Re: xc. This was originally from C18 and it worked well for XC8. It comes from HiTech C, but has been made as compatible as possible with C What do you mean by "use the ADC"? All the PIC's peripheral registers are defined by xc. That includes function calls to do simple configuration etc. I usually recommend people to NOT use thos functions.
It takes longer to work out how to use them correctly than to just drive the peripheral registers directly yourself. I also post at: PicForum. Jo, alla! KR1 Personally I think putting everything together is a mess. The PLIB's have just been phased out, you will not on the relevant webpages for downloading of the compilers that it is still available for download but only supplied for backwards compatability.
If you want to access peripherals with PIC16 devices you should be using MCC to generate all the files you need for you. MCC will generate pwm. Sorry, what I meant is By using xc. Of course as last resource, and plus, I dont know how but I got the source code for the pwm functions :P I can just manipulate the registers, but can those functions be used? Yes you can, but make sure you spell them correctly. Thank You ric for that! I have been searching the sources for ages There is no "open function" that lets you set T2CONbits.
T2CKPS to 1x ergo Should I just go for writing the registers directly or use another function that I dont know of yet? As I said earlier, I dislike those function because you often end up having to look in the source code to find out what they do and don't do for you.
That's why I recommend just reading the datasheet and writing the registers yourself. Certainly use the plib functions as examples of how to do things, but then do it yourself, fully understanding what you are doing. One curious note though Mike 2, 1 1 gold badge 11 11 silver badges 24 24 bronze badges.
Show 5 more comments. Active Oldest Votes. To do this, right-click the project and go to properties. Click the three dots righ next to "Include Directories". Hit apply. Pilha Pilha 31 2 2 bronze badges. Add a comment. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Who is building clouds for the independent developer? Exploding turkeys and how not to thaw your frozen bird: Top turkey questions Featured on Meta.
0コメント