Page 1 of 1

Flowcode v4 interrupt bugs

Posted: Mon Jul 16, 2012 3:13 pm
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

Re: Flowcode v4 interrupt bugs

Posted: Mon Jul 16, 2012 4:41 pm
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.

Re: Flowcode v4 interrupt bugs

Posted: Mon Jul 16, 2012 4:57 pm
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