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.

Port B RB4 - RB7 Interrupts on CCS C need example

Status
Not open for further replies.

glenjoy

Banned
Joined
Jan 1, 2004
Messages
962
Helped
72
Reputation
146
Reaction score
20
Trophy points
1,298
Location
Philippines
Activity points
0
if(!bit_test(portb,1 )

Can someone give me an example on using the RB4 to RB7 interrupts on CCS C.

Do they act as individual inputs executing 4 different ISR when triggered?

Thanks.
Glenjoy
 

Try the CCS Forum
hxxp://www.ccsinfo.com/forum/

As far as I rembember any one of these pins constitute a general port B interrupt.
 

/***entegreterbiyecisi@yahoo.com***/
#int_rb
sensor(){
if (bit_test(port_b,7)) {ca=1;}
if (bit_test(port_b,6)) {ne=1;}
change=1;}
/***entegreterbiyecisi@yahoo.com***/
void main() {

enable_interrupts(int_rb);
/***entegreterbiyecisi@yahoo.com***/
while(true){

if(!input(dwn)){ //start
dsp_data=0;
change=false;
data_bitti=false;
output_high(role_1);
/***entegreterbiyecisi@yahoo.com***/
while(!data_bitti){
while(!change){
dsp_yaz(10);
if(!input(up)){ //stop
goto stop;}}
/***entegreterbiyecisi@yahoo.com***/
if(dsp_data<9999){
dsp_data++;
dsp_ayir(dsp_data);
change=false;
/***entegreterbiyecisi@yahoo.com***/
if(dsp_data>=role1_data){
output_low(role_1);}
if(dsp_data>role1_data){
/***entegreterbiyecisi@yahoo.com***/
data_bitti=true;
change=true;
}}}} }}
/*************************entegreterbiyecisi@yahoo.com******************************/
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top