I am working on a project that reads the status of 6 inputs, performs mathematical calculations based on the number of high inputs and data stored in EEPROM, and displays the result on 3, 7 segment displays. A signal on RB0 then decreases the value by one with each rising edge pulse. This is set up as the RB0 interrupt.
I am using the internal RC clock.
All worked well, until I made a few adjustments (to remove leading zeros from the displays). When I came to re program the new code to the chip, I got the message that the device hadn't been erased, I ok'd this and the chip programmed ok.
Now when in circuit, the program stops when it gets to the RB0 INT stage.
I have moved the RB0 interrupt to various parts of my program but it still doesn't work.
I have tried erasing the chip manually prior to programming it, it still doesn't work.
Could the 2 problems be actually related?
Is it possible that my chip has developed a fault? (Unfortunately I do not have any spares to confirm this at the moment.)
Thanks in advance for any advice.
Carl.
RB0 Interrupt on a PIC16f887
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: RB0 Interrupt on a PIC16f887
Hiya sptcarl
Are you using the internal oscillator and master clear enable is set for digital input ?
If so take a look at:
http://www.matrixmultimedia.com/mmforum ... 37&p=20028
Since your device is related to 16F883, it could affect you. But I can't say that is a 100% fact.
Therefore you can assume it has not been programmed.
Are you using the internal oscillator and master clear enable is set for digital input ?
If so take a look at:
http://www.matrixmultimedia.com/mmforum ... 37&p=20028
Since your device is related to 16F883, it could affect you. But I can't say that is a 100% fact.
When I get that message, I always assume it means: Since target not erased when it should have been, then there is a problem with the communication between programmer and the target device.sptcarl wrote: I got the message that the device hadn't been erased
Therefore you can assume it has not been programmed.
Yes I do believe sosptcarl wrote: Could the 2 problems be actually related?
Martin
Re: RB0 Interrupt on a PIC16f887
Hey medelec35,
thanks for the suggestions,( and taking the time to reply) but I'm using master clear set as external. So I guess that wont apply to me? I will give it a go though just in case.
What I don't get though, is that I wasn't getting the erase message this morning when all was working ok.
I really need to get into the habit of saving each revision of my program with a new name, then I could have simply gone back to this mornings version to see if that still works!!!
thanks for the suggestions,( and taking the time to reply) but I'm using master clear set as external. So I guess that wont apply to me? I will give it a go though just in case.
What I don't get though, is that I wasn't getting the erase message this morning when all was working ok.
I really need to get into the habit of saving each revision of my program with a new name, then I could have simply gone back to this mornings version to see if that still works!!!
medelec35 wrote:Hiya sptcarl
Are you using the internal oscillator and master clear enable is set for digital input ?
If so take a look at:
http://www.matrixmultimedia.com/mmforum ... 37&p=20028
Since your device is related to 16F883, it could affect you. But I can't say that is a 100% fact.When I get that message, I always assume it means: Since target not erased when it should have been, then there is a problem with the communication between programmer and the target device.sptcarl wrote: I got the message that the device hadn't been erased
Therefore you can assume it has not been programmed.
Yes I do believe sosptcarl wrote: Could the 2 problems be actually related?
Re: RB0 Interrupt on a PIC16f887
Problem solved!
It was a faulty RB0 pin!
I was so adamant that it was due to a change I made in the program, I completely overlooked the obvious solution of writing a simple program to test the device!
I feel rather stupid now! I guess thats what 21 years of designing, making, and fault finding anusement game electronics does to you!
It was a faulty RB0 pin!
I was so adamant that it was due to a change I made in the program, I completely overlooked the obvious solution of writing a simple program to test the device!
I feel rather stupid now! I guess thats what 21 years of designing, making, and fault finding anusement game electronics does to you!