Author |
Message |
Topic: which is faster, direct division or alternate |
darryl_co
Replies: 13
Views: 20935
|
Forum: General CCS C Discussion Posted: Sun Mar 13, 2016 10:13 am Subject: which is faster, direct division or alternate |
Also how to find the time or number of cycles taken for such functions?
This post explains how to use the MPLAB (vs. 8.92) Stopwatch feature
to find out how many cycles (and microseconds) it takes t ... |
Topic: which is faster, direct division or alternate |
darryl_co
Replies: 13
Views: 20935
|
Forum: General CCS C Discussion Posted: Sun Mar 13, 2016 8:06 am Subject: Single Multiplication |
Thanks Ttelmah, I had come across that maths calculations time but did not bookmark it and was searching on google but didn't find it. Thanks to you, I finally found it. As per your suggestions, I th ... |
Topic: which is faster, direct division or alternate |
darryl_co
Replies: 13
Views: 20935
|
Forum: General CCS C Discussion Posted: Sat Mar 12, 2016 2:14 am Subject: which is faster, direct division or alternate |
If I need to divide a variable by 3, which of the two methods are faster and preferable while writing code
1) x/3
OR
2) x/2-x/4 x/8-x/16 x/32-x/64
Also how to find the time or number of cycles t ... |
Topic: Easy method of percentage calculation |
darryl_co
Replies: 33
Views: 52895
|
Forum: General CCS C Discussion Posted: Sun Dec 13, 2015 2:36 am Subject: Easy method of percentage calculation |
Thanks once again Ttelmah |
Topic: Easy method of percentage calculation |
darryl_co
Replies: 33
Views: 52895
|
Forum: General CCS C Discussion Posted: Sat Dec 12, 2015 11:52 pm Subject: MCLR pin |
hi, If I do not use the MCLR pin and set the fuse to NOMCLR, do I still have to tie the pin to plus line via a resistor? Can I leave the pin open? or I have to tie it to ground via a resistor. Does ... |
Topic: Easy method of percentage calculation |
darryl_co
Replies: 33
Views: 52895
|
Forum: General CCS C Discussion Posted: Thu Dec 10, 2015 10:02 am Subject: Easy method of percentage calculation |
I will surely consider the 12f1840 as soon as I complete my first project. As per your description I feel I should have started on this chip. Meanwhile just looking out for some sample C code for 12f ... |
Topic: Easy method of percentage calculation |
darryl_co
Replies: 33
Views: 52895
|
Forum: General CCS C Discussion Posted: Wed Dec 09, 2015 11:30 pm Subject: delay for Crystal |
If I use a 20MHz Crystal do I need to change #use delay(clock=4M) to 20M |
Topic: Easy method of percentage calculation |
darryl_co
Replies: 33
Views: 52895
|
Forum: General CCS C Discussion Posted: Tue Dec 01, 2015 7:21 am Subject: Easy method of percentage calculation |
SORRY |
Topic: Easy method of percentage calculation |
darryl_co
Replies: 33
Views: 52895
|
Forum: General CCS C Discussion Posted: Tue Dec 01, 2015 4:43 am Subject: Easy method of percentage calculation |
It will.
Tested simulation in proteus. The output GP1 and GP2 just pauses. I don't get the start up delay. |
Topic: Easy method of percentage calculation |
darryl_co
Replies: 33
Views: 52895
|
Forum: General CCS C Discussion Posted: Tue Dec 01, 2015 3:46 am Subject: Easy method of percentage calculation |
Thank you once again user Ttelmah.
I modified the code and changed the call for alarm(); and now it works fine. Only thing left is, on MCLR pin being pulled low, to reset the code, start from the beg ... |
Topic: Easy method of percentage calculation |
darryl_co
Replies: 33
Views: 52895
|
Forum: General CCS C Discussion Posted: Tue Dec 01, 2015 3:15 am Subject: Easy method of percentage calculation |
yes I made
step==254 and also tried step<255 |
Topic: Easy method of percentage calculation |
darryl_co
Replies: 33
Views: 52895
|
Forum: General CCS C Discussion Posted: Tue Dec 01, 2015 2:57 am Subject: Easy method of percentage calculation |
Sorry but still the outputs GP4 and GP5 remain LOW(OFF) |
Topic: Easy method of percentage calculation |
darryl_co
Replies: 33
Views: 52895
|
Forum: General CCS C Discussion Posted: Tue Dec 01, 2015 1:57 am Subject: Purpose of code |
what I am trying to make is a small induction heater.My plan was to drive the load coil using MOSFETS driven by MOSFET driver IC.There would be limitations with the voltage source used and the load co ... |
Topic: Setting the pins as input or output of PIC12F675 |
darryl_co
Replies: 6
Views: 14490
|
Forum: General CCS C Discussion Posted: Mon Nov 30, 2015 11:08 am Subject: Setting the pins as input or output of PIC12F675 |
One More help. for the code output_toggle(GP1); how to get GP2=!GP1 if gp1 is high than gp2 is low |
Topic: Setting the pins as input or output of PIC12F675 |
darryl_co
Replies: 6
Views: 14490
|
Forum: General CCS C Discussion Posted: Sun Nov 29, 2015 11:23 pm Subject: Setting the pins as input or output of PIC12F675 |
I do have that manual. I searched it but was still not able to understand so I requested for example. The pic is 8 bit. GP0, 1,2,4,5 are input /output and GP3 is MCLR pin only input |
|