View previous topic :: View next topic |
Author |
Message |
wojc0008
Joined: 13 Mar 2004 Posts: 7
|
rfPIC12F675 |
Posted: Mon May 17, 2004 5:16 pm |
|
|
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
|
RFPIC12F675 |
Posted: Wed May 19, 2004 2:02 am |
|
|
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. _________________ Lucky
www.mpic3.com - MPIC3 player project, Forum, Downloads, Online Shop |
|
|
wojc0008
Joined: 13 Mar 2004 Posts: 7
|
rfPIC12F675 |
Posted: Wed May 19, 2004 6:13 am |
|
|
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
|
|
Posted: Wed May 19, 2004 10:26 am |
|
|
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);
}
} |
|
|
|
wojc0008
Joined: 13 Mar 2004 Posts: 7
|
|
Posted: Wed May 19, 2004 11:54 am |
|
|
Thanks! I guess I wrote it too fast. I'm sure it will work now. |
|
|
|