Include and List Commands?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Include and List Commands?

Post 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;

keshavamurthy k.c
Posts: 18
Joined: Fri Feb 26, 2010 5:05 am
Contact:

Re: Include and List Commands?

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Include and List Commands?

Post by Benj »

Hello,

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

keshavamurthy k.c
Posts: 18
Joined: Fri Feb 26, 2010 5:05 am
Contact:

Re: Include and List Commands?

Post 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
Attachments
timer1.fcf
(8 KiB) Downloaded 254 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Include and List Commands?

Post 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.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Include and List Commands?

Post by Benj »

Here is a program that will trigger on your custom interrupt and return the timer 1 count via rs232.
Attachments
timer1.fcf
(14 KiB) Downloaded 264 times

Post Reply