Click here to Skip to main content
15,916,835 members
Home / Discussions / Hardware & Devices
   

Hardware & Devices

 
AnswerRe: Amplifier and Speaker Pin
Jochen Arndt20-Jun-17 23:58
professionalJochen Arndt20-Jun-17 23:58 
AnswerRe: Questions about ATtiny85 Pin
Gerry Schmitz7-Jun-17 3:32
mveGerry Schmitz7-Jun-17 3:32 
QuestionDisk drive identification - compact flash vs. CFast Pin
charlieg24-May-17 17:34
charlieg24-May-17 17:34 
AnswerRe: Disk drive identification - compact flash vs. CFast Pin
Gerry Schmitz25-May-17 9:48
mveGerry Schmitz25-May-17 9:48 
GeneralRe: Disk drive identification - compact flash vs. CFast Pin
charlieg27-May-17 11:58
charlieg27-May-17 11:58 
GeneralRe: Disk drive identification - compact flash vs. CFast Pin
Gerry Schmitz27-May-17 13:25
mveGerry Schmitz27-May-17 13:25 
QuestionDiscussing with me about my program Pin
ling19958-May-17 22:17
ling19958-May-17 22:17 
AnswerRe: Discussing with me about my program Pin
Jochen Arndt8-May-17 22:40
professionalJochen Arndt8-May-17 22:40 
What kind of answer do you expect?

You are mainly setting configuration registers which can't be improved.

The only code portion that can be improved is the loop in your int_clk() function. The final clearing of the OFIFG bits can be omitted because those are already cleared when the loop terminates. The inner for loop seems to be unnecessary when _NOP() does what it indicates (just do nothing while the processor runs) and there is no requirement for a delay between consecutive writes to the IFG1 register.

Then that function can be:
void int_clk()
{
    BCSCTL1&=~XT2OFF; //open XT oscillator
    BCSCTL2|=SELM1+SELS;//MCLK 8M and SMCLK 1M
    do
    {
        IFG1 &= ~OFIFG; //clean the wrong sign of vibration
    }
    while ((IFG1 & OFIFG) != 0); //If sign is 1,continue to wait
}

QuestionDoes ADAS evaluation board come with app to view ECT signals? Pin
(Mike) ipscone 28-Apr-17 10:57
(Mike) ipscone 28-Apr-17 10:57 
AnswerRe: Does ADAS evaluation board come with app to view ECT signals? Pin
Peter_in_278028-Apr-17 15:06
professionalPeter_in_278028-Apr-17 15:06 
Questiondebugging NDIS packet sniffer Pin
ForNow27-Apr-17 13:12
ForNow27-Apr-17 13:12 
AnswerRe: debugging NDIS packet sniffer Pin
Randor 27-Apr-17 18:33
professional Randor 27-Apr-17 18:33 
AnswerRe: debugging NDIS packet sniffer Pin
Munchies_Matt28-Apr-17 5:06
Munchies_Matt28-Apr-17 5:06 
QuestionThe troubles about PIC18F87K22 Pin
ling199530-Mar-17 23:00
ling199530-Mar-17 23:00 
QuestionWhich Build would you recommend? Pin
LovesCSharp14-Mar-17 5:48
LovesCSharp14-Mar-17 5:48 
AnswerRe: Which Build would you recommend? Pin
Richard Andrew x6414-Mar-17 6:51
professionalRichard Andrew x6414-Mar-17 6:51 
GeneralRe: Which Build would you recommend? Pin
LovesCSharp14-Mar-17 9:09
LovesCSharp14-Mar-17 9:09 
AnswerRe: Which Build would you recommend? Pin
Eddy Vluggen14-Mar-17 8:02
professionalEddy Vluggen14-Mar-17 8:02 
GeneralRe: Which Build would you recommend? Pin
LovesCSharp14-Mar-17 9:10
LovesCSharp14-Mar-17 9:10 
GeneralRe: Which Build would you recommend? Pin
Eddy Vluggen14-Mar-17 9:26
professionalEddy Vluggen14-Mar-17 9:26 
AnswerRe: Which Build would you recommend? Pin
Randor 17-Mar-17 10:31
professional Randor 17-Mar-17 10:31 
Generalhp officejet 6500 support Pin
peterkyle21-Feb-17 15:15
peterkyle21-Feb-17 15:15 
GeneralRe: hp officejet 6500 support Pin
Richard MacCutchan21-Feb-17 23:19
mveRichard MacCutchan21-Feb-17 23:19 
QuestionEditing of a DVD burner's firmware Pin
F900616-Jan-17 7:56
F900616-Jan-17 7:56 
AnswerRe: Editing of a DVD burner's firmware Pin
Richard MacCutchan16-Jan-17 21:46
mveRichard MacCutchan16-Jan-17 21:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.