Interrupt Not Working for PIC16F1824

Moderator: Benj

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: Interrupt Not Working for PIC16F1824

Postby Enamul » Tue Aug 14, 2012 11:57 am

Hi,
Sorry for forgetting to post FCD for PIC16f1503..Here you go..you have to put that in FCD folder...open FC you will see this pic in your target pic list..
There is a nice post of Ben regarding how to use hi-tech compiler in FC..
viewtopic.php?f=26&t=6812
Hope this helps :)
Enamul
Attachments
16F1503.fcd
(10.1 KiB) Downloaded 178 times
These users thanked the author Enamul for the post:
Benj (Tue Aug 14, 2012 12:10 pm)
Rating: 5%
 
Enamul
University of Nottingham
enamul4mm@gmail.com

poweronhand
Posts: 21
Joined: Mon Sep 07, 2009 7:09 am
Has thanked: 3 times
Been thanked: 1 time
Contact:

Ext Interrupt Not Working for PIC18f25k80

Postby poweronhand » Wed Jan 23, 2013 4:16 pm

Dear Sir / Madam
I found the RB3 interrupt in 18f25k80 does not work the other interrupts RB0 to RB2 is ok and simulate propertly but not the Int from RB3
please find attached simple test code for your reference
thanks in advance
Roger
Attachments
interupt testing.fcf
(8.5 KiB) Downloaded 179 times

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

Re: Interrupt Not Working for PIC16F1824

Postby Benj » Wed Jan 23, 2013 6:31 pm

Hi Roger,

Is this testing in v4 or in v5?

poweronhand
Posts: 21
Joined: Mon Sep 07, 2009 7:09 am
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Interrupt Not Working for PIC16F1824

Postby poweronhand » Thu Jan 24, 2013 4:12 am

it is on
Flowcode
Professional Version
Flowcode v4.5.18.74
thanks

poweronhand
Posts: 21
Joined: Mon Sep 07, 2009 7:09 am
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Ext Interrupt Not Working for PIC18f25k80

Postby poweronhand » Thu Jan 24, 2013 4:15 am

poweronhand wrote:Dear Sir / Madam
I found the RB3 interrupt in 18f25k80 does not work the other interrupts RB0 to RB2 is ok and simulate propertly but not the Int from RB3
please find attached simple test code for your reference
thanks in advance
Roger

testing on :
Flowcode
Professional Version
Flowcode v4.5.18.74

thanks

poweronhand
Posts: 21
Joined: Mon Sep 07, 2009 7:09 am
Has thanked: 3 times
Been thanked: 1 time
Contact:

unable to comply to asm and hex for 10f222

Postby poweronhand » Thu Jan 24, 2013 10:38 am

Dear Sir /Madam

Can you please let me know if there is a bug on chip 10F222
I can simulate in the flowcode 4 but can't comply to HEX
I have attached the program please check thanks in advance
Roger

the below is the error :
Launching the compiler...
c:\program files (x86)\matrix multimedia\flowcode v4\boostc\boostc_pic16_flowcode.exe -v -t PIC10F222 "ledtest2013.c"
BoostC Optimizing C Compiler Version 7.04 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2011 Pavel Baranov
Copyright(C) 2004-2011 David Hobday
Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited
error: could not open input file 'c:\PROGRA~2\MATRIX~1\FLOWCO~1\boostc\config\PIC10F222.tdf'
ledtest2013.c
Starting preprocessor: c:\PROGRA~2\MATRIX~1\FLOWCO~1\boostc\pp.exe ledtest2013.c -i c:\PROGRA~2\MATRIX~1\FLOWCO~1\boostc\include -d _PIC10F222 -la -c2 -o ledtest2013.pp -v -d _BOOSTC -d _PIC16 -d _CHAR_INDEX
ledtest2013.c(105): error: general error
ledtest2013.c(105): error: failure
failure
.....
Return code = 1
Flowcode was unable to compile the flowchart's C code due to the following errors:
If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.
FINISHED
Attachments
ledtest2013.fcf
(13.5 KiB) Downloaded 174 times

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

Re: Interrupt Not Working for PIC16F1824

Postby Benj » Thu Jan 24, 2013 10:53 am

I found the RB3 interrupt in 18f25k80 does not work the other interrupts RB0 to RB2 is ok and simulate propertly but not the Int from RB3
please find attached simple test code for your reference


Hopefully this is a simulation only problem and it should have been fixed for v5 where we overhauled all the pin based interrupt functionality.

The general error is a bit worrying. Might be worth restarting your PC and trying compilation again.

poweronhand
Posts: 21
Joined: Mon Sep 07, 2009 7:09 am
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: unable to comply to asm and hex for 10f222

Postby poweronhand » Thu Jan 24, 2013 4:46 pm

poweronhand wrote:Dear Sir /Madam

Can you please let me know if there is a bug on chip 10F222
I can simulate in the flowcode 4 but can't comply to HEX
I have attached the program please check thanks in advance
Roger

the below is the error :
Launching the compiler...
c:\program files (x86)\matrix multimedia\flowcode v4\boostc\boostc_pic16_flowcode.exe -v -t PIC10F222 "ledtest2013.c"
BoostC Optimizing C Compiler Version 7.04 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2011 Pavel Baranov
Copyright(C) 2004-2011 David Hobday
Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited
error: could not open input file 'c:\PROGRA~2\MATRIX~1\FLOWCO~1\boostc\config\PIC10F222.tdf'
ledtest2013.c
Starting preprocessor: c:\PROGRA~2\MATRIX~1\FLOWCO~1\boostc\pp.exe ledtest2013.c -i c:\PROGRA~2\MATRIX~1\FLOWCO~1\boostc\include -d _PIC10F222 -la -c2 -o ledtest2013.pp -v -d _BOOSTC -d _PIC16 -d _CHAR_INDEX
ledtest2013.c(105): error: general error
ledtest2013.c(105): error: failure
failure
.....
Return code = 1
Flowcode was unable to compile the flowchart's C code due to the following errors:
If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.
FINISHED


Thanks for your reply i am trying to restart the computer and try again ,can u tell me what about this issue above ?
thanks

poweronhand
Posts: 21
Joined: Mon Sep 07, 2009 7:09 am
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Interrupt Not Working for PIC16F1824

Postby poweronhand » Thu Jan 24, 2013 4:47 pm

Benj wrote:
I found the RB3 interrupt in 18f25k80 does not work the other interrupts RB0 to RB2 is ok and simulate propertly but not the Int from RB3
please find attached simple test code for your reference


Hopefully this is a simulation only problem and it should have been fixed for v5 where we overhauled all the pin based interrupt functionality.

The general error is a bit worrying. Might be worth restarting your PC and trying compilation again.


BTW do you mean that i need to upgrade to V5?
thanks

poweronhand
Posts: 21
Joined: Mon Sep 07, 2009 7:09 am
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Interrupt Not Working for PIC16F1824

Postby poweronhand » Thu Jan 24, 2013 4:56 pm

Hi Benj
I restarted the computer both issue are the same is there any thing i can look at ? thanks
Roger

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8812
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2558 times
Been thanked: 3712 times
Contact:

Re: unable to comply to asm and hex for 10f222

Postby medelec35 » Thu Jan 24, 2013 5:06 pm

poweronhand wrote:Can you please let me know if there is a bug on chip 10F222
I can simulate in the flowcode 4 but can't comply to HEX


Hi poweronhand,
Have you read this:
viewtopic.php?f=46&t=11717&p=43704&#p43704
It may help?

Martin
These users thanked the author medelec35 for the post:
poweronhand (Fri Jan 25, 2013 4:50 pm)
Rating: 5%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

poweronhand
Posts: 21
Joined: Mon Sep 07, 2009 7:09 am
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Interrupt Not Working for PIC16F1824

Postby poweronhand » Thu Jan 24, 2013 6:08 pm

medelec35 wrote:[quote="poweronhand"
Can you please let me know if there is a bug on chip 10F222
I can simulate in the flowcode 4 but can't comply to HEX


Hi poweronhand,
Have you read this:
viewtopic.php?f=46&t=11717&p=43704&#p43704
It may help?

Martin[/quote]

Thanks Martin
i did followed the instruction it made improvement but still not comply becasue of errors please see below :
Launching the compiler...
C:\Program Files (x86)\HI-TECH Software\PICC\9.83\bin\picc.exe --CHIP=10F222 -N48 1ledtest2013.c
1ledtest2013.c: main()
418: while (!(FCV_SOLHI < == 0))
^ (195) expression syntax
422: delay_us(50);
^ (194) ")" expected
447: while (!(FCV_SOLLO < == 0))
^ (195) expression syntax
451: delay_us(50);
^ (194) ")" expected
1ledtest2013.c:
463: }
^ (285) no identifier in declaration
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
466: mainendloop: goto mainendloop;
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
467: }
^ (285) no identifier in declaration
^ (374) missing basic type; int assumed (warning)
^ (314) ";" expected
HI-TECH C Compiler for PIC10/12/16 MCUs (PRO Mode) V9.83
Copyright (C) 2011 Microchip Technology Inc.
Licensed for evaluation purposes only.
This licence will expire on Mon, 11 Mar 2013.
(908) exit status = 1

Return code = 1

Flowcode was unable to compile the flowchart's C code due to the following errors:


If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.

FINISHED

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8812
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2558 times
Been thanked: 3712 times
Contact:

Re: Interrupt Not Working for PIC16F1824

Postby medelec35 » Thu Jan 24, 2013 6:24 pm

Hi poweronhand ,
Can you give this a try please, and let me know how you get on.

Martin
Attachments
ledtest2013V2.fcf
(9.5 KiB) Downloaded 143 times
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

poweronhand
Posts: 21
Joined: Mon Sep 07, 2009 7:09 am
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Interrupt Not Working for PIC16F1824

Postby poweronhand » Fri Jan 25, 2013 8:00 am

this seem comply ok let me see if it can be programmed.
i can see what you have change Thanks much for your help but how come it doesn't work the way I set in the first place?
it simulate ok tho
:o

poweronhand
Posts: 21
Joined: Mon Sep 07, 2009 7:09 am
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Interrupt Not Working for PIC16F1824

Postby poweronhand » Fri Jan 25, 2013 8:34 am

Benj wrote:
I found the RB3 interrupt in 18f25k80 does not work the other interrupts RB0 to RB2 is ok and simulate propertly but not the Int from RB3
please find attached simple test code for your reference


Hopefully this is a simulation only problem and it should have been fixed for v5 where we overhauled all the pin based interrupt functionality.

The general error is a bit worrying. Might be worth restarting your PC and trying compilation again.

Hi Benj
Can you tell me how do i fix the interrupt problem on simulation ? thanks

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8812
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2558 times
Been thanked: 3712 times
Contact:

Re: Interrupt Not Working for PIC16F1824

Postby medelec35 » Fri Jan 25, 2013 8:39 am

poweronhand wrote:Thanks much for your help but how come it doesn't work the way I set in the first place?


Hi poweronhand,
For some reason Hitec did not like Loop until.
After changing to Loop while (appears to be the standard method?), flowchart compiles ok.
Maybe someone from @mm knows the reason?
These users thanked the author medelec35 for the post:
poweronhand (Fri Jan 25, 2013 4:50 pm)
Rating: 5%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

poweronhand
Posts: 21
Joined: Mon Sep 07, 2009 7:09 am
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Interrupt Not Working for PIC16F1824

Postby poweronhand » Sat Jan 26, 2013 9:47 am

hi medelec ,
i just try to compile it to the chip and it shows an error on the hex file is our side the chips memory range, then i made a new simple program to turn on a port but still saying that can u tell me where can it possibly went wrong thanks
Attachments
Capture.JPG
Capture.JPG (129.47 KiB) Viewed 9201 times

poweronhand
Posts: 21
Joined: Mon Sep 07, 2009 7:09 am
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Interrupt Not Working for 10F222

Postby poweronhand » Tue Jan 29, 2013 8:52 am

Hi Benj,
I have upgraded to V5 and compiled the same program and it has errors as below i am using pic development board Version 3
it simulated ok but fail to program , it that mean that each time i program a chip i have to go to the c code and make change myself?
i have attached the program it self
thanks in advance
Roger


BoostC Optimizing C Compiler Version 7.04 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2011 Pavel Baranov
Copyright(C) 2004-2011 David Hobday

Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited

error: could not open input file 'C:\PROGRA~2\Flowcode\v5\Tools\boostc\config\PIC10F222.tdf'

ledtest2013V2.c
Starting preprocessor: C:\PROGRA~2\Flowcode\v5\Tools\boostc\pp.exe ledtest2013V2.c -i C:\PROGRA~2\Flowcode\v5\Tools\boostc\include -d _PIC10F222 -la -c2 -o ledtest2013V2.pp -v -d _BOOSTC -d _PIC16 -d _CHAR_INDEX


.

C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_ADC.c(2682): error: missing right brace
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_ADC.c(2674): error: general error
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_ADC.c(2674): error: variable name expected
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_ADC.c(2674): error: general error
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_ADC.c(2674): error: variable name expected
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_ADC.c(2674): error: general error
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_ADC.c(2674): error: variable name expected
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_ADC.c(2674): error: general error
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_ADC.c(2674): error: failure

failure
Return code = 1
Flowcode was unable to compile the flowchart's C code due to the following errors:


If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.


FINISHED
Attachments
ledtest2013V2.fcf
(9.5 KiB) Downloaded 136 times

poweronhand
Posts: 21
Joined: Mon Sep 07, 2009 7:09 am
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Interrupt Not Working for PIC10f222

Postby poweronhand » Tue Jan 29, 2013 9:34 am

Hi Benj,
i also made a simple program to turn on a led on a port it still fail to program and complie
i also check the folder C:\Program Files (x86)\Flowcode\v5\Tools\boostc\config
and there is not 10F222 tdf listed do i need and how to get that in ?
thanks
Roger
Attachments
test chip.fcf
(5.5 KiB) Downloaded 132 times

Sanjay Singh
Posts: 17
Joined: Fri Jun 08, 2012 10:54 am
Location: India
Has thanked: 10 times
Been thanked: 3 times
Contact:

Re: Interrupt Not Working for PIC16F1824

Postby Sanjay Singh » Mon Nov 18, 2013 4:58 am

Hello Enamul,

Will it be possible for you to provide the FCD for PIC16F1503 if it is ready.

Regards,

San

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

Re: Interrupt Not Working for PIC16F1824

Postby Benj » Mon Nov 18, 2013 10:22 am

Hi Roger,

The 10F devices will not compile with the BoostC compiler because they are not supported. You need to use the HiTech compiler workaround to allow your code to compile to these devices.

The 16F1503 device is not currently supported in BoostC. I could maybe make a FCD that is compatible with HiTech.