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 support@ccsinfo.com

problem output RB6 RB7 PIN

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



Joined: 27 Apr 2011
Posts: 2
Location: Spain

View user's profile Send private message AIM Address

problem output RB6 RB7 PIN
PostPosted: Wed Apr 27, 2011 1:49 am     Reply with quote

hi all, I can not activate the pins RB6 and RB7 as output.
The following example activates RB1. RB7 is always 0 volts.
The programming of the PIC with MPLAB ICD3 performed using MPLAB IDE.
Any ideas?
Code:

#include <16F818.h>
#FUSES NOWDT , NOPUT, INTRC_IO  , MCLR  , NOBROWNOUT , NOLVP  , NOCPD , NOWRT, NODEBUG,NOPROTECT
#use delay(clock=8000000)

void main()
{
   setup_oscillator(OSC_8MHZ);

    while(true){
      if (input(PIN_A4)) {
      output_high(PIN_B1);
      output_high(PIN_B7);
      }
      else{
      output_low(PIN_B1);
      output_low(PIN_B7);
      }
    }
}
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Wed Apr 27, 2011 4:55 am     Reply with quote

It works correctly with recent CCS C version. If you have an old version, check the actual fuse settings in MPLAB.
temtronic



Joined: 01 Jul 2010
Posts: 9200
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Apr 27, 2011 5:30 am     Reply with quote

ALSO be sure to set the MPLAB Project ,'build configuration' to 'release' from 'debug' , recompile (F10), then burn the PIC with that code.
ebalvis



Joined: 27 Apr 2011
Posts: 2
Location: Spain

View user's profile Send private message AIM Address

Problem solved.
PostPosted: Wed Apr 27, 2011 4:23 pm     Reply with quote

Project-> Build configuration-> release. Rebuild.
Thank you very much.
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