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

rfPIC12F675

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



Joined: 13 Mar 2004
Posts: 7

View user's profile Send private message

rfPIC12F675
PostPosted: Mon May 17, 2004 5:16 pm     Reply with quote

Has anyone made their own .h file or include file to work with the rfPIC12F675? Any examples would be great. I am using the most current version of PCM.

Thanks in advance!
lucky



Joined: 12 Sep 2003
Posts: 46
Location: South Coast - England

View user's profile Send private message Visit poster's website

RFPIC12F675
PostPosted: Wed May 19, 2004 2:02 am     Reply with quote

Hi, I asked this question to CCS & they told me to use the standard PIC12F675.

Have you got one of the Microchip dev radio boards or have you just got the PIC?

I want to try these out sometime. Shocked
_________________
Lucky
www.mpic3.com - MPIC3 player project, Forum, Downloads, Online Shop
wojc0008



Joined: 13 Mar 2004
Posts: 7

View user's profile Send private message

rfPIC12F675
PostPosted: Wed May 19, 2004 6:13 am     Reply with quote

I have the full eval kit. I tried using the PIC12F675 and programmed it to flash the onboard LED on the 315MHz transmitter and it didn't work. It looks like it is programmed though. My configuration bits are set up correctly (intRC mode.....) I need to review the datasheet and schematic again but I just used the following code and the LED on the transmitter board flashed once:

#include <12f675.h>
#device adc=8
#use delay(clock=4000000)
#define POT0 PIN_A0
#define POT1 PIN_A1
#define TXD PIN_A2
#define PB3 PIN_A3
#define PB4 PIN_A4
#define RFENA PIN_A5
main()
{
output_high(RFENA);
output_high(TXD);
delay_ms(200);
output_low(TXD);
delay_ms(200);
delay_ms(500);
output_low(RFENA);
output_high(TXD);
delay_ms(200);
output_low(TXD);
delay_ms(200);

delay_ms(500);
}
languer



Joined: 09 Jan 2004
Posts: 144
Location: USA

View user's profile Send private message

PostPosted: Wed May 19, 2004 10:26 am     Reply with quote

I would expect it to flash once or twice depending on where is the LED; TXD or RFENA?

You need to enclose your flashing in a loop.

Kind of,
Code:
main()
{
   while ( 1 )
   {
      output_high(RFENA);
      output_high(TXD);
      delay_ms(200);
      output_low(TXD);
      delay_ms(200);
      output_low(RFENA);
      output_high(TXD);
      delay_ms(200);
      output_low(TXD);
      delay_ms(200);

      delay_ms(500);
   }
}

Smile
wojc0008



Joined: 13 Mar 2004
Posts: 7

View user's profile Send private message

PostPosted: Wed May 19, 2004 11:54 am     Reply with quote

Shocked Thanks! I guess I wrote it too fast. I'm sure it will work now. Laughing
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