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.

Generate limited frequency. need help.

Status
Not open for further replies.

Stas Mamaischi

Newbie level 6
Newbie level 6
Joined
Apr 24, 2014
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
60
Hi. Can anyoane tell me how i can generate limited frequency between 310-630 rpm ? If i have 310-630 rpm in 0.2 second . Thank you forward . I use pic16f886 .

Code:
TRISB = 0x00;
PORTB =0x00;
T1CKPS1 = 1;
T1ckps0 = 0; //prescale 4;
T1OSCEN = 0;
TMR1CS = 0;
GIE = 1;
PEIE = 1;
TMR1IE =1 ;
TMR1ON =1;
TMR1H = 0b11001101;TMR1L=0b11100001; //52705
while(1){
                  }
interrupt count(){
if(TMR1IF){
TMR1H= 0b11001101;TMR1L=0b11100001;
RB1=!RB1;

 }
else {
 TMR1H =0b11100110;TMR1L=0b01011101; //58973

RB1=!RB1;
}
TMRIF=0;
}
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top