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

Post by Enamul »

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..
http://www.matrixmultimedia.com/mmforum ... =26&t=6812
Hope this helps :)
Enamul
Attachments
16F1503.fcd
(9.79 KiB) Downloaded 383 times
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

Post by poweronhand »

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 396 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: Interrupt Not Working for PIC16F1824

Post by Benj »

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

Post by poweronhand »

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

Post by poweronhand »

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

Post by poweronhand »

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 386 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: Interrupt Not Working for PIC16F1824

Post by Benj »

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

Post by poweronhand »

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

Post by poweronhand »

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

Post by poweronhand »

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

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

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

Post by medelec35 »

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:
http://www.matrixmultimedia.com/mmforum ... 04&#p43704
It may help?

Martin
Martin

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

Post by poweronhand »

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:
http://www.matrixmultimedia.com/mmforum ... 04&#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

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Interrupt Not Working for PIC16F1824

Post by medelec35 »

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 305 times
Martin

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

Post by poweronhand »

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

Post by poweronhand »

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

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Interrupt Not Working for PIC16F1824

Post by medelec35 »

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?
Martin

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

Post by poweronhand »

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 18221 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

Post by poweronhand »

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 286 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

Post by poweronhand »

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 279 times

Sanjay Singh
Posts: 23
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

Post by Sanjay Singh »

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: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Interrupt Not Working for PIC16F1824

Post by Benj »

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.

Post Reply