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

PIC24FV16KM204 regarding RA6

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



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

PIC24FV16KM204 regarding RA6
PostPosted: Thu Aug 08, 2013 12:50 am     Reply with quote

Hi All,

Compiler 5.010.
In the device file: 24FV16KM204.h, the data for PIN_A6 was missing.
Is there a reason why ccs left that port pin(RA6).
I added the line as below.
But the output would not toggle for PIN_A6.
Could someone please help.

Thanks and Regards,
Jai.

24FV16KM204.h
------------------
Code:

#define PIN_A0  5648
#define PIN_A1  5649
#define PIN_A2  5650
#define PIN_A3  5651
#define PIN_A4  5652
#define PIN_A5  5653
#define PIN_A6  5654 <--- this was added by me.
#define PIN_A7  5655
#define PIN_A8  5656
#define PIN_A9  5657
#define PIN_A10  5658
#define PIN_A11  5659


main.h
--------
Code:

#include <H:\Program Files\PICC\Projects\PIC24_proj1\24FV16KM204.h>

#FUSES HS
#FUSES NOWDT                    //No Watch Dog Timer
#FUSES CKSFSM                   //Clock Switching is enabled, fail Safe clock monitor is enabled
#FUSES NOBROWNOUT               //No brownout reset

#device ICSP=1
#use delay(crystal=20000000)

#define LED1 PIN_A6
#define LED2 PIN_A7
#define DELAY 1000


main.c
--------
Code:

#include <main.h>


void main()
{
   setup_adc(ADC_OFF); 
   setup_comparator(NC_NC,NC_NC);
   setup_vref(FALSE);
   setup_low_volt_detect(FALSE);
   //Example blinking LED program
   while(true)
   {
      output_low(LED1);
      output_low(LED2);
      delay_ms(DELAY);
      output_high(LED1);
      output_high(LED2);
      delay_ms(DELAY);
   }

}
RF_Developer



Joined: 07 Feb 2011
Posts: 839

View user's profile Send private message

PostPosted: Thu Aug 08, 2013 1:29 am     Reply with quote

If you read the datasheet, you'll see that on the many versions of this processor family that pin is used for Vddcore/Vcap instead of RA6. In other words RA6 may not be usable on that processor.

Last edited by RF_Developer on Thu Aug 08, 2013 1:52 am; edited 1 time in total
jaikumar



Joined: 15 Dec 2006
Posts: 109

View user's profile Send private message

PostPosted: Thu Aug 08, 2013 1:41 am     Reply with quote

Thank you. I just read the datasheet.
Sorry, Next time will read datasheet before posting.

regards,
jai.
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