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
12F683 Interrupts and PWM
- 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:
12F683 Interrupts and PWM
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- 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: 12F683 Interrupts and PWM
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.
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.
- Attachments
-
- 12F683.fcd
- (5.86 KiB) Downloaded 364 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: 12F683 Interrupts and PWM
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
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
- Attachments
-
- led dim 12f683.fcf
- My file for your reference
- (9.5 KiB) Downloaded 352 times
- 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: 12F683 Interrupts and PWM
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.
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.
- Attachments
-
- 12F683.fcd
- (6.02 KiB) Downloaded 391 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel