otherwise Posted February 12, 2007 Share Posted February 12, 2007 I'm taking Kinesiology in Uni so Basically anything to do with Human Anatomy, Physiology or Exercise I could help with. If you would like my(specific) help PM me and I'll get back to you ASAP. If not I'll check this tread ~daily. Link to comment Share on other sites More sharing options...
serge2k Posted February 12, 2007 Share Posted February 12, 2007 I don't wanna do my work :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: anyway... I have to program an LED to flash with a duty cycle that changes every time a button is pressed. 0 then 33 then 67 then 100% then back to zero. I have some sort of bug, the LED works until I get to the 67% I think... here: #include <p18cxxx.h> #include <timers.h> #include "osc.h" #pragma config WDT = OFF #pragma config OSC = INTIO7 // puts osc/4 on pin 14 #pragma config MCLRE = OFF #pragma config LVP = OFF #pragma config PBADEN = OFF // Necessary if RB0 … RB3 used as IO. int checkButton(int buttonState); int i; void main(void) { set_osc_32MHz(); // select 32 MHz oscillator speed TRISBbits.TRISB0 = 0; // Configure as an output for an LED TRISDbits.TRISD0 = 1; // Configure as an button PORTDbits.RD0 = 0; PORTBbits.RB0 = 0; i = 0; while(1) { i = checkButton(i); // for 0% duty cycle if (i==0) { PORTBbits.RB0 = 0; } // for 33% duty cycle if (i == 1) { OpenTimer0(TIMER_INT_OFF & T0_SOURCE_INT & T0_16BIT & T0_PS_1_32); WriteTimer0(0); PORTBbits.RB0 = 0; while( ReadTimer0() < 18800) { checkButton(i); } CloseTimer0(); OpenTimer0(TIMER_INT_OFF & T0_SOURCE_INT & T0_16BIT & T0_PS_1_32); WriteTimer0(0); PORTBbits.RB0 = 1; while( ReadTimer0() < 6200) { checkButton(i); } CloseTimer0(); } // for 50% duty cycle if (i == 2) { OpenTimer0(TIMER_INT_OFF & T0_SOURCE_INT & T0_16BIT & T0_PS_1_32); WriteTimer0(0); PORTBbits.RB0 = 0; while( ReadTimer0() < 12500) { checkButton(i); } CloseTimer0(); OpenTimer0(TIMER_INT_OFF & T0_SOURCE_INT & T0_16BIT & T0_PS_1_32); WriteTimer0(0); PORTBbits.RB0 = 1; while( ReadTimer0() < 12500) { checkButton(i); } CloseTimer0(); } // for 67% duty cycle if (i == 3) { OpenTimer0(TIMER_INT_OFF & T0_SOURCE_INT & T0_16BIT & T0_PS_1_32); WriteTimer0(0); PORTBbits.RB0 = 0; while( ReadTimer0() < 6200) { checkButton(i); } CloseTimer0(); OpenTimer0(TIMER_INT_OFF & T0_SOURCE_INT & T0_16BIT & T0_PS_1_32); WriteTimer0(0); PORTBbits.RB0 = 1; while( ReadTimer0() < 18800) { checkButton(i); } CloseTimer0(); } // for 100% duty cycle if (i == 4) { PORTBbits.RB0 = 1; } } } int checkButton(int buttonState) { if (PORTDbits.RD0 == 1) { buttonState++; } if (buttonState > 4) { buttonState = 0; } return (buttonState); } Link to comment Share on other sites More sharing options...
Krnuckfan Posted February 12, 2007 Share Posted February 12, 2007 ^^What the hell is that? Link to comment Share on other sites More sharing options...
acalund Posted February 12, 2007 Share Posted February 12, 2007 If u want to be a tutor, please fill in this forum: Grade level: 1st year University Type of subject u specialize: Biology(zoology in particular), English, Chemistry, Physics, and Calculus Fundamentals Current grade in subject: In midterms currently. How active can you be: Message me or post on this board and I'll get back to you as soon as I can (if I know how to do the problem Hours u're available: Varied. What more can you offer: Have some early Canadian history knowledge, and am a very competent paper editor (ie. grammar, sentence/paragraph structure, spelling, punctuation) Link to comment Share on other sites More sharing options...
AstroTurf Posted February 12, 2007 Share Posted February 12, 2007 I don't wanna do my work :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: anyway... I have to program an LED to flash with a duty cycle that changes every time a button is pressed. 0 then 33 then 67 then 100% then back to zero. I have some sort of bug, the LED works until I get to the 67% I think... here: #include <p18cxxx.h> #include <timers.h> #include "osc.h" #pragma config WDT = OFF #pragma config OSC = INTIO7 // puts osc/4 on pin 14 #pragma config MCLRE = OFF #pragma config LVP = OFF #pragma config PBADEN = OFF // Necessary if RB0 … RB3 used as IO. int checkButton(int buttonState); int i; void main(void) { set_osc_32MHz(); // select 32 MHz oscillator speed TRISBbits.TRISB0 = 0; // Configure as an output for an LED TRISDbits.TRISD0 = 1; // Configure as an button PORTDbits.RD0 = 0; PORTBbits.RB0 = 0; i = 0; while(1) { i = checkButton(i); // for 0% duty cycle if (i==0) { PORTBbits.RB0 = 0; } // for 33% duty cycle if (i == 1) { OpenTimer0(TIMER_INT_OFF & T0_SOURCE_INT & T0_16BIT & T0_PS_1_32); WriteTimer0(0); PORTBbits.RB0 = 0; while( ReadTimer0() < 18800) { checkButton(i); } CloseTimer0(); OpenTimer0(TIMER_INT_OFF & T0_SOURCE_INT & T0_16BIT & T0_PS_1_32); WriteTimer0(0); PORTBbits.RB0 = 1; while( ReadTimer0() < 6200) { checkButton(i); } CloseTimer0(); } // for 50% duty cycle if (i == 2) { OpenTimer0(TIMER_INT_OFF & T0_SOURCE_INT & T0_16BIT & T0_PS_1_32); WriteTimer0(0); PORTBbits.RB0 = 0; while( ReadTimer0() < 12500) { checkButton(i); } CloseTimer0(); OpenTimer0(TIMER_INT_OFF & T0_SOURCE_INT & T0_16BIT & T0_PS_1_32); WriteTimer0(0); PORTBbits.RB0 = 1; while( ReadTimer0() < 12500) { checkButton(i); } CloseTimer0(); } // for 67% duty cycle if (i == 3) { OpenTimer0(TIMER_INT_OFF & T0_SOURCE_INT & T0_16BIT & T0_PS_1_32); WriteTimer0(0); PORTBbits.RB0 = 0; while( ReadTimer0() < 6200) { checkButton(i); } CloseTimer0(); OpenTimer0(TIMER_INT_OFF & T0_SOURCE_INT & T0_16BIT & T0_PS_1_32); WriteTimer0(0); PORTBbits.RB0 = 1; while( ReadTimer0() < 18800) { checkButton(i); } CloseTimer0(); } // for 100% duty cycle if (i == 4) { PORTBbits.RB0 = 1; } } } int checkButton(int buttonState) { if (PORTDbits.RD0 == 1) { buttonState++; } if (buttonState > 4) { buttonState = 0; } return (buttonState); } Link to comment Share on other sites More sharing options...
Darkstar Posted February 12, 2007 Share Posted February 12, 2007 whats 2+2? Link to comment Share on other sites More sharing options...
Darkstar Posted February 13, 2007 Share Posted February 13, 2007 WOW NO QUESTIONS ABOUT HMK FOR 2 HOURS Link to comment Share on other sites More sharing options...
serge2k Posted February 13, 2007 Share Posted February 13, 2007 whats 2+2? Link to comment Share on other sites More sharing options...
dutchsoccerfan Posted February 13, 2007 Share Posted February 13, 2007 thats cause everyone is just getting home no one does homework when they get home Link to comment Share on other sites More sharing options...
dutchsoccerfan Posted February 13, 2007 Share Posted February 13, 2007 hockey_champ_2006 wrote: whats 2+2? 5 Link to comment Share on other sites More sharing options...
Relics Posted February 13, 2007 Share Posted February 13, 2007 5 Link to comment Share on other sites More sharing options...
Rough Neck Posted February 13, 2007 Share Posted February 13, 2007 No... no... It's 22... Link to comment Share on other sites More sharing options...
kazin! Posted February 13, 2007 Share Posted February 13, 2007 A cubic crystal is being grown in a laboratory. Find the instantaneous rate of change when x = 4. I know how to do these types of questions, but an equation isn't given. It says cubic crystal...do I assume it's y = x^3? The answer is 48 mm^3/mm, or 48 mm^2 Link to comment Share on other sites More sharing options...
Darkstar Posted February 13, 2007 Share Posted February 13, 2007 ...your wrong...its 2 squared. Link to comment Share on other sites More sharing options...
kazin! Posted February 13, 2007 Share Posted February 13, 2007 Disregard that question, I guess you just assume y= x^3. Link to comment Share on other sites More sharing options...
Relics Posted February 13, 2007 Share Posted February 13, 2007 ...your wrong...its 2 squared. Link to comment Share on other sites More sharing options...
Kesler Is Bestler Posted February 13, 2007 Share Posted February 13, 2007 THANKS A LOT GUYS I JUST FAILED THE TEST WORTH 20% OF MY GRADE Link to comment Share on other sites More sharing options...
Relics Posted February 13, 2007 Share Posted February 13, 2007 lol! This is almost sig-worthy Link to comment Share on other sites More sharing options...
kazin! Posted February 13, 2007 Share Posted February 13, 2007 OK. This one I'm actually stuck on. I promise ! If a tank holds 1000L of water, which takes an hour to drain from the bottom of the tank, then the volume V of water remaining in the tank after t minutes is: V = 1000( 1 - t/60 )^2 0 < t < 60. Find the rate at which the water is flowing out of the tank (the instantaneous rate of change of V with respect to t) after 10 min. The answer is 250L/min. No derivative rules may be used to show work. (chapter 1 still) Thanks in advance. Link to comment Share on other sites More sharing options...
More-is-on Posted February 13, 2007 Author Share Posted February 13, 2007 Updating on the tutors later... I'm hiring more. I need to finish my french first. Can someone tell me how to say: "No, u can't go to the washroom." in french? I have the yes one, and I'm too stupid to get the no answer. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.