View previous topic :: View next topic |
Author |
Message |
melbogia
Joined: 10 Oct 2004 Posts: 5
|
16F876 PIN_B3 and NOLVP question |
Posted: Tue Oct 12, 2004 11:53 pm |
|
|
I have read the FAQ's and still can't make this work I disabled LVP and still PIN_B3 doesn't work. Here's my code, I will appreciate the help.
Code: | #include <16F876.h>
#use delay(clock=20000000)
#fuses NOLVP
#fuses HS,NOWDT
#use rs232(baud=19200,parity=N,xmit=PIN_C6,rcv=PIN_C7)
void main(void) {
while(1)
output_high(pin_b3);
} |
I thought my PIC was not functioning correctly, but it does on every PIC i try. |
|
|
melbogia
Joined: 10 Oct 2004 Posts: 5
|
|
Posted: Wed Oct 13, 2004 10:18 am |
|
|
anyone? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Oct 13, 2004 10:22 am |
|
|
1. What's your version of the CCS compiler ?
2. Have you tried to set any other pins high besides Pin B3 ?
Does it work ? In other words, have you gotten any other
program to run ?
3. Do you know for sure that your programmer is really programming
the LVP config bit as "disabled" ?
4. What programmer are you using ?
5. Do you have any external hardware connected to Pin B3 ?
ie., an LED, another chip, etc. ?
6. What voltage are you using for Vdd on the PIC ? |
|
|
melbogia
Joined: 10 Oct 2004 Posts: 5
|
|
Posted: Wed Oct 13, 2004 7:46 pm |
|
|
PCM programmer wrote: | 1. What's your version of the CCS compiler ?
2. Have you tried to set any other pins high besides Pin B3 ?
Does it work ? In other words, have you gotten any other
program to run ?
3. Do you know for sure that your programmer is really programming
the LVP config bit as "disabled" ?
4. What programmer are you using ?
5. Do you have any external hardware connected to Pin B3 ?
ie., an LED, another chip, etc. ?
6. What voltage are you using for Vdd on the PIC ? |
Here's all the info you asked for:
I am using PCM version 3.207
I have tried other Pins, they all work except for B3. I know they work because I have an LED connected to the output and it turns ON except when I have a LED connected at Pin B3
How do I find out for sure that my LVP bit is getting disabled? Isn't NOLVP suppose to do that?
I am using PIC downloader 1.08 to download my program on the PIC through RS232.
The voltage at Vdd is 5.03 volts through a 7805 voltage regulator.
Thanks for the help... |
|
|
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
|
|
Posted: Wed Oct 13, 2004 7:51 pm |
|
|
The problem may be because your PIC is already be set to LVP and the bootloader you are using does not update the configuration bits. Burn your program using ICD or any other programmers you have (while making sure you choose NOLVP in their Options window) and test your code again. |
|
|
melbogia
Joined: 10 Oct 2004 Posts: 5
|
|
Posted: Wed Oct 13, 2004 8:10 pm |
|
|
Haplo, That did it!
Is there another bootloader/downloader that will burn/update the configuration bits? |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Wed Oct 13, 2004 8:45 pm |
|
|
Quote: | Is there another bootloader/downloader that will burn/update the configuration bits? |
No, these can't be changed by a bootloader. |
|
|
melbogia
Joined: 10 Oct 2004 Posts: 5
|
|
Posted: Wed Oct 13, 2004 9:12 pm |
|
|
k, thanks! |
|
|
|