portF4 to portf7 is not coming
Moderator: Benj
-
- Posts: 18
- Joined: Fri Feb 26, 2010 5:05 am
portF4 to portf7 is not coming
hi
i am keshav new user of flow code .
i am doing project battery monitoring system using pic 16f946 micro controller in portf4 to portf7 pin is coming in panel edit properties.
how to configure internal register of pic micro. i am using portc5 as a input for capture mode,i have to set the ccp1con register capture mode at falling edge. how to set these register?
please reply
i am keshav new user of flow code .
i am doing project battery monitoring system using pic 16f946 micro controller in portf4 to portf7 pin is coming in panel edit properties.
how to configure internal register of pic micro. i am using portc5 as a input for capture mode,i have to set the ccp1con register capture mode at falling edge. how to set these register?
please reply
-
- Posts: 18
- Joined: Fri Feb 26, 2010 5:05 am
Re: portF4 to portf7 is not coming
i attached image .
portF have 8 I/O pins in this image portF I/O pin only 4 pins .
i used all port F pins as a input tell me how to configure portF4 to portF7.
portF have 8 I/O pins in this image portF I/O pin only 4 pins .
i used all port F pins as a input tell me how to configure portF4 to portF7.
- Attachments
-
- portfpins.zip
- (117.3 KiB) Downloaded 288 times
-
- Posts: 18
- Joined: Fri Feb 26, 2010 5:05 am
timer0 programming
hi
i am using 16f946 pic micro-controller.
i am doing simple project using timer0 interrupt should be enable every 100msec port c pin should be high and low . i written flow code for that one its coming error like this
F:\flowcode\moniteringsystem\timer0.c(146:2): error: unknown identifier 'cr_bit'
F:\flowcode\moniteringsystem\timer0.c(146:2): error: failed to generate expression
F:\flowcode\moniteringsystem\timer0.c(147:2): error: unknown identifier 'cr_bit'
F:\flowcode\moniteringsystem\timer0.c(147:2): error: failed to generate expression
F:\flowcode\moniteringsystem\timer0.c(149:2): error: unknown identifier 'st_bit'
F:\flowcode\moniteringsystem\timer0.c(149:2): error: failed to generate expression
F:\flowcode\moniteringsystem\timer0.c(150:2): error: unknown identifier 'st_bit'
F:\flowcode\moniteringsystem\timer0.c(150:2): error: failed to generate expression
F:\flowcode\moniteringsystem\timer0.c(183:6): error: unknown identifier 'ts_bit'
F:\flowcode\moniteringsystem\timer0.c(183:6): error: failed to generate expression
F:\flowcode\moniteringsystem\timer0.c(183:32): error: unknown identifier 'ts_bit'
F:\flowcode\moniteringsystem\timer0.c(183:32): error: failed to generate expression
F:\flowcode\moniteringsystem\timer0.c(183:6): error: invalid operand 'ts_bit(intcon, 0x0002) '
F:\flowcode\moniteringsystem\timer0.c(183:32): error: invalid operand 'ts_bit(intcon, 0x0005)'
F:\flowcode\moniteringsystem\timer0.c(183:29): error: failed to generate expression
timer0.c success
failure
Return code = 1
some one please help me.
i am using 16f946 pic micro-controller.
i am doing simple project using timer0 interrupt should be enable every 100msec port c pin should be high and low . i written flow code for that one its coming error like this
F:\flowcode\moniteringsystem\timer0.c(146:2): error: unknown identifier 'cr_bit'
F:\flowcode\moniteringsystem\timer0.c(146:2): error: failed to generate expression
F:\flowcode\moniteringsystem\timer0.c(147:2): error: unknown identifier 'cr_bit'
F:\flowcode\moniteringsystem\timer0.c(147:2): error: failed to generate expression
F:\flowcode\moniteringsystem\timer0.c(149:2): error: unknown identifier 'st_bit'
F:\flowcode\moniteringsystem\timer0.c(149:2): error: failed to generate expression
F:\flowcode\moniteringsystem\timer0.c(150:2): error: unknown identifier 'st_bit'
F:\flowcode\moniteringsystem\timer0.c(150:2): error: failed to generate expression
F:\flowcode\moniteringsystem\timer0.c(183:6): error: unknown identifier 'ts_bit'
F:\flowcode\moniteringsystem\timer0.c(183:6): error: failed to generate expression
F:\flowcode\moniteringsystem\timer0.c(183:32): error: unknown identifier 'ts_bit'
F:\flowcode\moniteringsystem\timer0.c(183:32): error: failed to generate expression
F:\flowcode\moniteringsystem\timer0.c(183:6): error: invalid operand 'ts_bit(intcon, 0x0002) '
F:\flowcode\moniteringsystem\timer0.c(183:32): error: invalid operand 'ts_bit(intcon, 0x0005)'
F:\flowcode\moniteringsystem\timer0.c(183:29): error: failed to generate expression
timer0.c success
failure
Return code = 1
some one please help me.
- 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: portF4 to portf7 is not coming
Sorry The updated FCD file I sent you is for version 4.2 of Flowcode and will not work in previous versions. You should be able to download and upgrade to the latest release by visiting the Flowcode product page.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 18
- Joined: Fri Feb 26, 2010 5:05 am
- 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: portF4 to portf7 is not coming
Hello
If you simply want to be able to read the count on the timer then you can simply declare an INT variable in flowcode called timerval and then use the following code in a C code icon.
FCV_TIMERVAL = tmr1h << 8;
FCV_TIMERVAL = FCV_TIMERVAL | tmr1l;
If you simply want to be able to read the count on the timer then you can simply declare an INT variable in flowcode called timerval and then use the following code in a C code icon.
FCV_TIMERVAL = tmr1h << 8;
FCV_TIMERVAL = FCV_TIMERVAL | tmr1l;
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 18
- Joined: Fri Feb 26, 2010 5:05 am
Re: portF4 to portf7 is not coming
actually i am giving input frequency signal into RC5/ccp1 of pic 16f946 micro controller .i want to capture input signal every falling edge.
Timer1 will starts the count . after completion of capture signal timer1 register count value copied into ccpr1h and ccpr1l register please guide me how to do this function.
i have to set ccp1con register for falling edge is it necessary ?
Timer1 will starts the count . after completion of capture signal timer1 register count value copied into ccpr1h and ccpr1l register please guide me how to do this function.
i have to set ccp1con register for falling edge is it necessary ?
- 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: portF4 to portf7 is not coming
Hello
The device datasheet should be able to tell you exactly how to do this though it may take a long winded approach to explaining it all. When I am doing custom things like this I generally do a google search to see if I can find a reference project to base my code on. Always nice to have an example to base your work on. Eg all you are after is how to configure the timer 1 registers.
The device datasheet should be able to tell you exactly how to do this though it may take a long winded approach to explaining it all. When I am doing custom things like this I generally do a google search to see if I can find a reference project to base my code on. Always nice to have an example to base your work on. Eg all you are after is how to configure the timer 1 registers.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 18
- Joined: Fri Feb 26, 2010 5:05 am
- 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: portF4 to portf7 is not coming
Hello,
There is a quick start manual available from the inside of your Flowcode DVD case.
There is also an online course available from here.
http://www.matrixmultimedia.com/lc_microcontroller.php
There is also a help file available from the following directory.
"C:\Program Files\Matrix Multimedia\Flowcode v3\FlowEN.hlp"
"C:\Program Files\Matrix Multimedia\Flowcode v4\Help\FlowEN.hlp"
The BoostC compiler manual can also be found here.
"C:\Program Files\Matrix Multimedia\Flowcode vx\BoostC\BoostC.pdf"
There is also a book by Bert Van Damn available that details several projects from start to finish using Flowcode.
Any further help then we have the forums for questions.
Please search for posts first as the problem has probably been covered before.
There is a quick start manual available from the inside of your Flowcode DVD case.
There is also an online course available from here.
http://www.matrixmultimedia.com/lc_microcontroller.php
There is also a help file available from the following directory.
"C:\Program Files\Matrix Multimedia\Flowcode v3\FlowEN.hlp"
"C:\Program Files\Matrix Multimedia\Flowcode v4\Help\FlowEN.hlp"
The BoostC compiler manual can also be found here.
"C:\Program Files\Matrix Multimedia\Flowcode vx\BoostC\BoostC.pdf"
There is also a book by Bert Van Damn available that details several projects from start to finish using Flowcode.
Any further help then we have the forums for questions.
Please search for posts first as the problem has probably been covered before.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 18
- Joined: Fri Feb 26, 2010 5:05 am
Re: portF4 to portf7 is not coming
hello
I have a following query
1. I want to capture input signal from port RC5/ccp1 pin for every falling edge for this I written c-code
trisc<5>=1;
ccpcon=0x04;// for every falling edge
any other initialization required ?
2. after I will call custom interrupt timer1 roll over I written in custom interrupt
Enable code:
intcon.PEIE=1;
intcon.GIE=1;
t1con=0x49;
pie1.TMR1E=1;
disable code:
pie1.tmr1ie=0;
handler code:
if(pir1&(1<<TMR1IF))
{
FCM_%n();
clear_bit(pir1,TMR1IF);
}
Timer1 interrupt is available in interrupt properties .custom interrupt for timer1 roll over is required?
3.in timer1 ISR I written c-code
FCV_CCP_1=TMR1L|(TMR1H<<8);
This flow code is not working. How to capture signal for every falling edge in timer1.
You have these type of example please send me. If i go through my pic 16f946 controller datasheet initialization of all register is correct.
I have a following query
1. I want to capture input signal from port RC5/ccp1 pin for every falling edge for this I written c-code
trisc<5>=1;
ccpcon=0x04;// for every falling edge
any other initialization required ?
2. after I will call custom interrupt timer1 roll over I written in custom interrupt
Enable code:
intcon.PEIE=1;
intcon.GIE=1;
t1con=0x49;
pie1.TMR1E=1;
disable code:
pie1.tmr1ie=0;
handler code:
if(pir1&(1<<TMR1IF))
{
FCM_%n();
clear_bit(pir1,TMR1IF);
}
Timer1 interrupt is available in interrupt properties .custom interrupt for timer1 roll over is required?
3.in timer1 ISR I written c-code
FCV_CCP_1=TMR1L|(TMR1H<<8);
This flow code is not working. How to capture signal for every falling edge in timer1.
You have these type of example please send me. If i go through my pic 16f946 controller datasheet initialization of all register is correct.
- 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: portF4 to portf7 is not coming
Hello
1) Firstly this line of code will probably not work.
trisc<5>=1;
This should instead look line this.
set_bit(trisc, 5);
or
trisc.5 = 1;
2) Enabling the timer interrupt will setup the timer for counting from the internal clock. You should have a look at the code that is generated and then look at the specific registers that are used in the device datasheet to see how to modify these for your application.
3) The interrupt will fire when the timer value rolls over. eg from 0xffff to 0x0000 therefore you will not have to collect the count value. If you wish to collect the count value at regular periods then maybe look at some timer 0 examples. Eg when inside the timer 0 routine read the timer 1 count register.
1) Firstly this line of code will probably not work.
trisc<5>=1;
This should instead look line this.
set_bit(trisc, 5);
or
trisc.5 = 1;
2) Enabling the timer interrupt will setup the timer for counting from the internal clock. You should have a look at the code that is generated and then look at the specific registers that are used in the device datasheet to see how to modify these for your application.
3) The interrupt will fire when the timer value rolls over. eg from 0xffff to 0x0000 therefore you will not have to collect the count value. If you wish to collect the count value at regular periods then maybe look at some timer 0 examples. Eg when inside the timer 0 routine read the timer 1 count register.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel