Flowcode v4 interrupt bugs

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
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Flowcode v4 interrupt bugs

Post by Enamul »

Hi team,
I have seen that there are quite a lot of bugs in 12 series and 16 series smaller pics. They don't simulate RA2INT which flowcode v4 shows RB0INT although there is no PORTB in those microcontrollers. Some of the PICs with PORTA change on interrupt neither simulate nor work in hardware.
I have changed couple of those FCD files. To have your attention I have uploaded here one for PIC 16f676 in which there is no PORTB..so no RB0 rather RA2INT which doesn't simulate in FCv4 but works in hardware. PORTA change on interrupt shown as PORTB which neither simulate nor work in hardware..

I have modified it and now RA2INT simulate and works in hardware and PORTA change on interrupt works in hardware but not simulate..Can you help me to modify FCD for simulation as well. :)

Code: Select all

[Interrupts]
;first 3 should always be 1=TMR0, 2=RB0INT, 3=PORTB
;any other interrupts need to also have this set: "st_bit(intcon,PEIE);\n"
GeneralInit="st_bit(intcon,GIE);\n"
Count=4
1=TMR0
2=RA2INT
3=PORTA
4=TMR1
and

Code: Select all

[RA2INT]
Name="INT"
for PORTA

Code: Select all

[PORTA]
Name="PORT"
To enable porta change on interrupt in any particular pin..use the following code in the beginning of the program..

Code: Select all

ioca = 0x01; //To enable RA0..so change accordingly
Thanks,
Enamul
Last edited by Enamul on Mon Jul 16, 2012 5:09 pm, edited 2 times in total.
Enamul
University of Nottingham
enamul4mm@gmail.com

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: Flowcode v4 interrupt bugs

Post by Benj »

Hello Enamul,

Thanks for all the work you have put into this to support our users and allow the interrupts to work correctly on the hardware in v4.

For v5 we overhauled the FCD and the Flowcode exe a great deal to allow for much better interrupt support in simulation and through to the end code on the hardware.

In v4 I believe the INT0 pin is always fixed to RB0 and the port change is fixed to the upper 4 pins of PortB regardless of the device and there is no way to change this. Timer simulation is also a bit flaky in v4 but much better in v5.

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: Flowcode v4 interrupt bugs

Post by Enamul »

Hi,
:!: I see..that's why PORT change on interrupt doesn't simulate on V4 for those PICs.
Thanks for the information,
Enamul
Enamul
University of Nottingham
enamul4mm@gmail.com

Post Reply