Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

pic16f887 portb on mikro c

Status
Not open for further replies.

georgetwo

Member
Hi everyone!
I am just getting close to c language with mikro c compiler with pic16f887 .
At present, Im finding problems trying to initialise my portb pin state change interrupt. I have tried reading datasheet but cant find solution.I only know there is a intcon, config_reg, iocb and cant fix them together .I need ur help to configure It.
thanks
 
You're looking to set RBIE and GIE in the intcon reg, The IOCB sets which pins you want to affect a change. once an interrupt occurs clear RBIF in the intcon reg.

REMEMBER to clear your ANSELH reg as some RB pins are analogue inputs by default...

Sorry!! The option reg is for enabling weak pullups and INT pin triggering on portb
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top