Page 1 of 1

12F683 Interrupts and PWM

Posted: Mon Feb 16, 2009 12:12 pm
by Benj
Dear MM.

I have written a small program in FC3 and the target is the 12f683.

I am having problems configuring the ports on the chip. I cant seem to configure an Interrupt pin on any of the pins? I drag the interrupt across to the chart but it only gives me port RB0 which isn't listed on the chip diagram. Do I have to do some jiggery pokerie in a custom interrupt?

Also i the same program I am trying to output PWM on pin GP2 but am not sure how to do it.

If I compile and load onto a 16f877a it works perfectly.

If you could point me in the right direction it would be greatly appreciated.

Regards...Jules

Re: 12F683 Interrupts and PWM

Posted: Mon Feb 16, 2009 12:40 pm
by Benj
Hello

Yes the Interrupt names are a legacy problem in Flowcode V3. Interrupt RB0 is really GPIO2, RBPortChange is really GPIO port change.

I have included an updated FCD file which allows for GPIO port change masking. Simply replace the file in your Flowcode V3/FCD directory with the file attached below.

Re: 12F683 Interrupts and PWM

Posted: Tue Feb 17, 2009 8:14 pm
by jules
Thanks for that Benj.

I downloaded the fcd file and overwrote the existing one on my pc.

I then created the flowcode from scratch after selecting 12f683 but I still don't understand which pin I can create a button interrupt on? Also I am not able to establish if we are getting PWM out of pin GP2 on the 12f683.

Sorry to be a pain on this. I seem to have a conceptual block on this smaller PIC and flowcode.

Regds...Jules

Re: 12F683 Interrupts and PWM

Posted: Wed Feb 18, 2009 5:47 pm
by Benj
Hello Jules

From looking at the device datasheet both the interrupt and the PWM share pin GPIO2. I have attached an updated version of the FCD file which will allow you to use the PortB interrupt (GPIO instead of PortB) and mask off the pins that you wish to use for interrupting.

Hope this helps.