Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 27, 2024, 06:40:42 06:40


Login with username, password and session length


Pages: [1]
Print
Author Topic: What's different between "INTCON" in bank0 and bank1,2,3  (Read 12132 times)
0 Members and 4 Guests are viewing this topic.
arash
Active Member
***
Offline Offline

Posts: 111

Thank You
-Given: 2
-Receive: 0


« on: February 25, 2006, 05:25:57 05:25 »

Hi guys
I have 2 question.
1-What's different between "INTCON" in bank0 and bank1,2,3 ? ----(16F877)
2-How can i enable just tmr0 interrupt not portb interrupt? ----(16F877)
Logged
parallaxis
Junior Member
**
Offline Offline

Posts: 77

Thank You
-Given: 3
-Receive: 3


« Reply #1 on: February 25, 2006, 09:55:28 09:55 »

1. There is no diferrence. INTCON is mirrored in all banks because of simply access (like with PCL, STATUS, FSR etc. registers) - in Datasheet is written: "Some frequently used Special Function Registers from one bank may be mirrored in another bank for code reduction and quicker access." (16F877A datasheet, pages 16-17, chapter "2.2 Data Memory Organization")

2. You must have value with bit 7=1, bit=1 and bit3=0, e.g. 0xA0 in INCON register. (16F877A datasheet, page 24, "2.2.2.4. INTCON register")

(valid for 16F877A. There can be differences between 16F877 and 16F877A, better consult datasheets and errata, but I think diferrences does not affect INTCON.)
Logged
arash
Active Member
***
Offline Offline

Posts: 111

Thank You
-Given: 2
-Receive: 0


« Reply #2 on: February 26, 2006, 05:21:07 17:21 »

That helped me.
Thank you
Logged
Zaphod Beeblebrox
Active Member
***
Offline Offline

Posts: 143

Thank You
-Given: 26
-Receive: 103



« Reply #3 on: February 27, 2006, 08:46:24 08:46 »

Little note: The major difference between 877 and 877A from a programmer's point of view is in configuration bits settings, eg. different Flash Protection scheme.
But if you correctly choose the device in MPLAB you don't need to care much of those differences, MPLAB does most of the job for you automatically.
Logged

Black holes are where the God divided by zero...
Don't panic!
parallaxis
Junior Member
**
Offline Offline

Posts: 77

Thank You
-Given: 3
-Receive: 3


« Reply #4 on: February 27, 2006, 08:00:19 20:00 »

Thanks Zaphod for your correction, I wasn't sure... But I remember there are some differences between 877 and 877A affecting building ICD2 clones Smiley
Logged
Zaphod Beeblebrox
Active Member
***
Offline Offline

Posts: 143

Thank You
-Given: 26
-Receive: 103



« Reply #5 on: February 28, 2006, 06:53:59 18:53 »

Oh, I see, just FYI - I use ICD2 clone (this one) at home along with the original ICD2 at work and haven't found any problem using 877 and 877A as well as any other PIC I've been using. Even PIC18Fxxxx series works on both ICDs just fine.
P.S.: I use Hi-Tech PICC for PIC16Fxxx and Microchip C18 for PIC18Fxxxx + PICos18 RTOS without any problem.

Good luck.
« Last Edit: February 28, 2006, 06:56:03 18:56 by Zaphod Beeblebrox » Logged

Black holes are where the God divided by zero...
Don't panic!
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC