Page 1 of 1

Include and List Commands?

Posted: Thu Mar 11, 2010 9:35 am
by Benj
Hello,

The best way to learn C is to create programs in Flowcode and then refer to the C code file to see what is being generated. There is a manual on the BoostC compiler available from the "Flowcode v4\Boostc" directory.

Ports and configuration registers have all been defined for you. Simply usse the register name in lower case.

EG.
trisa = 0x00;
porta = 0x55;

You might be better off keeping the value as two bytes to make it easier to send through the RS232.

Eg.

FCV_CCPL = ccpr1l;
FCV_CCPH = ccpr1h;

or to combine into a single integer variable.

FCV_CCP = ccpr1h << 8;
FCV_CCP = FCV_CCP | ccpr1l;

Re: Include and List Commands?

Posted: Thu Mar 11, 2010 11:35 am
by keshavamurthy k.c
thank you for your information
please suggest me .
i am reading from input from pin RC5/CCP1. i want to capture input signal from this RC5/CCP1.captured value i want copied into variable .
i am using pic 16f946 and timer1 of pic micro-controller.i written custom interrupt but it is not working.any suitable example related please send me

Re: Include and List Commands?

Posted: Thu Mar 11, 2010 11:43 am
by Benj
Hello,

Please can you ensure you are posting your questions in the relevant topic. IE the Flowcode topic related to your version.

Re: Include and List Commands?

Posted: Thu Mar 11, 2010 12:04 pm
by keshavamurthy k.c
i written flow code for capture input signal
i am using 16f946 pic micro-controller RC5/ccp1 is capture input

1. IN c-code i configured registers.
osccon=0x77;// initializes internal oscillator
lcdcon=0x00;//reset lcdcon register for port c
trisc.5=1;// bit RC5 configured as a input
t1con=0x23;//i set timer1 con register value
ccp1con=0x04;// i set ccp1con for every falling edge to capture
intcon.PEIE=1;// peripheral interrupt enable bit
intcon.GIE=1;// global peripheral interrupt bit of intcon

2. after i call custom interrupt for capture signal
enabel code
intcon.PEIE=1;
intcon.GIE=1;
pie1=0x00;
pir1=0x00;

handler code
if(pir1&(1<<CCP1IF))
{
FCM_%ccp1();ccp1 is maro function
clear_bit(pir1,CCP1IF);
}

in ISR just i want to copy captured value into some variable and display on computer through RS 232 .
i attached .fcf file please go through it suggest me what can i do

Re: Include and List Commands?

Posted: Thu Mar 11, 2010 12:18 pm
by Benj
Hello,

Again, Please post Flowcode questions into the Flowcode section of the forums. We will not answer Flowcode related questions outside of these topics.

Re: Include and List Commands?

Posted: Tue Mar 16, 2010 9:07 pm
by Benj
Here is a program that will trigger on your custom interrupt and return the timer 1 count via rs232.