CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

16F876 PIN_B3 and NOLVP question

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
melbogia



Joined: 10 Oct 2004
Posts: 5

View user's profile Send private message

16F876 PIN_B3 and NOLVP question
PostPosted: Tue Oct 12, 2004 11:53 pm     Reply with quote

I have read the FAQ's and still can't make this work Confused 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

View user's profile Send private message

PostPosted: Wed Oct 13, 2004 10:18 am     Reply with quote

anyone?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Oct 13, 2004 10:22 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Oct 13, 2004 7:46 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Oct 13, 2004 7:51 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Oct 13, 2004 8:10 pm     Reply with quote

Haplo, That did it! Very Happy
Is there another bootloader/downloader that will burn/update the configuration bits?
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Oct 13, 2004 8:45 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Oct 13, 2004 9:12 pm     Reply with quote

k, thanks!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group