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

How do I transmit data with the rf12f675 RFPIC

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



Joined: 17 May 2006
Posts: 1
Location: Madrid

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

How do I transmit data with the rf12f675 RFPIC
PostPosted: Wed May 17, 2006 3:25 am     Reply with quote

Hi all
I'm trying to develop an application to send data from a transmitter to a receiver with RF. The problem are when I try to send RF data from the transmitter. I don't know if the rf12f675 is sending the data or not, because I don't know if the sequence of instructions its correctly formed.

The code is as follow.
Code:

#include <12F675F.h>

#device ADC=10
#fuses INTRC_IO,NOWDT,NOPUT,NOPROTECT,NOCPD,NOMCLR
#use delay(clock=4000000)

#define GP0 PIN_A0
#define GP1 PIN_A1
#define GP2 PIN_A2
#define GP3 PIN_A3
#define GP4 PIN_A4
#define GP5 PIN_A5
//#byte OSCCAL = 0x90


#int_AD
AD_isr()
{
   SETUP_ADC(ADC_OFF);
}


void init()
{
   //OSCCAL = 0x80; // set internal oscillator to mid frequency
//   enable_interrupts(GLOBAL);
//   enable_interrupts(INT_AD);

   set_tris_a(0b00111011);
   setup_comparator( NC_NC_NC_NC );
   setup_adc_ports( sAN0|sAN1|VSS_VDD );
   setup_adc( ADC_CLOCK_INTERNAL );   
}

main()
{
   int codigo;
   int value;

   init();
   codigo=15500;
   while ( TRUE ) // blink LED
   {


         set_adc_channel(1);                   
        delay_us(22);                         
        value = read_adc();

        output_high ( GP5 );
        delay_ms (5);

        output_a( codigo );
        output_a( value );                 
        output_low( GP5 );
        setup_adc( ADC_OFF );

        delay_ms( 1000 );
   }
}

The GP2 is the port connected to the DATAAsk.
The GP5 pin is connected to the RFEN to enable the oscillator to modulate the data.

All the elements are from the PICKIT Flash starter kit form microchip.
I use the transmit board came with this Kit.

sorry for my bad english
thanks
zagoaristides



Joined: 08 Jul 2007
Posts: 15
Location: Cordoba - Argentina

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

So?
PostPosted: Thu Apr 29, 2010 9:47 am     Reply with quote

Where can I find examples and info about rf pics?
Armand_ST



Joined: 17 Jun 2010
Posts: 1
Location: Mexico

View user's profile Send private message MSN Messenger

Ayuda con RFPIC12F675
PostPosted: Thu Jun 17, 2010 2:48 pm     Reply with quote

I am new to the forum and I want to know if any of you has established communication with RFPIC's. I'm in a project at the university and have not established communication between the TX and RX. I have the source code but the problem is that it's in assembly and I really do not understand this type of programming.
If anyone of you could guide me, or if anyone of you has any example of this I would appreciate it.

-- Translation added by Forum Moderator

----------
hola soy nuevo en el foro y pues kisiera saber si alguie de ustedes ya establecio comunicacion con RFPIC's, ya que me encuentro en un proyecto de la universidad y no puesdo establecer comunicacion entre el TX y RX, tengo los codigos fuente pero el problema es que estan en ensamblador y la verdad no entiendo ese tipo de programacion.
si alguien de ustedes me pudiera orientar o si alguien de ustedes tiene algun ejemplo de ello se lo agradeceria muxo
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Thu Jun 17, 2010 2:59 pm     Reply with quote

... and now in English please?
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