pic 18f47k40 timer interrupt problem
Moderator: Benj
-
- Posts: 52
- Joined: Fri Apr 07, 2017 1:55 am
- Location: Greece
- Has thanked: 16 times
- Been thanked: 14 times
- Contact:
pic 18f47k40 timer interrupt problem
Hi,
I am working with a pic18F47k40 device and I am getting errors while trying to compile in .hex. (see attached pic)
In simulation everything works fine.
Project compiles fine into .hex and runs ok in hardware if I do not use timer interupts, timers or interrupts in general.
Can this problem be related to PIC32 interrupts problem?
viewtopic.php?f=63&t=18182
Thank you.
I am working with a pic18F47k40 device and I am getting errors while trying to compile in .hex. (see attached pic)
In simulation everything works fine.
Project compiles fine into .hex and runs ok in hardware if I do not use timer interupts, timers or interrupts in general.
Can this problem be related to PIC32 interrupts problem?
viewtopic.php?f=63&t=18182
Thank you.
- Attachments
-
- Untitled1.png
- (54.3 KiB) Downloaded 6104 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: pic 18f47k40 timer interrupt problem
Hello,
Thanks for letting us know.
Thanks for letting us know.
No this is just a register naming problem in the device definition file. Let me investigate for you and it should be a relatively easy fix.Can this problem be related to PIC32 interrupts problem?
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
-
- Posts: 52
- Joined: Fri Apr 07, 2017 1:55 am
- Location: Greece
- Has thanked: 16 times
- Been thanked: 14 times
- Contact:
Re: pic 18f47k40 timer interrupt problem
Thank you very much for your prompt response.
I have also noticed some PWM component properties (PWM pin, Remap pin) cannot be configured.
Thanks
I have also noticed some PWM component properties (PWM pin, Remap pin) cannot be configured.
Thanks
- 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: pic 18f47k40 timer interrupt problem
Hello,
Right here are some updated definition files for the device family which should solve all the timer interrupt related compile errors and hopefully provide some PWM pins.
Right here are some updated definition files for the device family which should solve all the timer interrupt related compile errors and hopefully provide some PWM pins.
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
-
- Posts: 52
- Joined: Fri Apr 07, 2017 1:55 am
- Location: Greece
- Has thanked: 16 times
- Been thanked: 14 times
- Contact:
Re: pic 18f47k40 timer interrupt problem
Amazing!
I will test tomorrow and confirm but I am quite confident it is going to work
Many thanks!
I will test tomorrow and confirm but I am quite confident it is going to work
Many thanks!
-
- Posts: 52
- Joined: Fri Apr 07, 2017 1:55 am
- Location: Greece
- Has thanked: 16 times
- Been thanked: 14 times
- Contact:
Re: pic 18f47k40 timer interrupt problem
Hi,
Timer interrupts tested and working on hardware except timer0.
Interrupt On Change (IOC) produces the same compiler errors like TimerInterupt did.
Also on the options menu only RB4-7 and only on both edges is available to choose from, while in the datasheet Port A, B, C and pinRE3, rising or falling edge are available.
Interrupt on PIN (INTn pin) produces the same compiler errors like TimerInterupt did.
Also in the properties menu there is no option to choose any pin (port A and B can be chosen according to datasheet)
ADC input using EBM003_Thermistor component always defaults to AN0 (RA0) on harware regardless what channel is choosen in component properties.
PWM output does not work on hardware I tried everything . PWM output on 16f690 hardware works ok.
I have noticed Mplab Code Configurator lets you configure PWM3 on RA0-5 and PORTD, PWM4 on RA0-5 and PORTC.
I have also noticed that it uses the PPS module in the code it produses in order to configure all the pins. (I dont know if that helps)
Any help would be appreciated.
Thanks
Timer interrupts tested and working on hardware except timer0.
Interrupt On Change (IOC) produces the same compiler errors like TimerInterupt did.
Also on the options menu only RB4-7 and only on both edges is available to choose from, while in the datasheet Port A, B, C and pinRE3, rising or falling edge are available.
Interrupt on PIN (INTn pin) produces the same compiler errors like TimerInterupt did.
Also in the properties menu there is no option to choose any pin (port A and B can be chosen according to datasheet)
ADC input using EBM003_Thermistor component always defaults to AN0 (RA0) on harware regardless what channel is choosen in component properties.
PWM output does not work on hardware I tried everything . PWM output on 16f690 hardware works ok.
I have noticed Mplab Code Configurator lets you configure PWM3 on RA0-5 and PORTD, PWM4 on RA0-5 and PORTC.
I have also noticed that it uses the PPS module in the code it produses in order to configure all the pins. (I dont know if that helps)
Any help would be appreciated.
Thanks
- 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: pic 18f47k40 timer interrupt problem
Hello,
Thanks for letting me know.
Investigating the other issues now.
Thanks for letting me know.
Hopefully Timer 0 should also be working now.Timer interrupts tested and working on hardware except timer0.
Interrupt On Change (IOC) produces the same compiler errors like TimerInterupt did.
These should also now be fixed and configurable.Interrupt on PIN (INTn pin) produces the same compiler errors like TimerInterupt did.
Investigating the other issues now.
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
-
- Posts: 52
- Joined: Fri Apr 07, 2017 1:55 am
- Location: Greece
- Has thanked: 16 times
- Been thanked: 14 times
- Contact:
Re: pic 18f47k40 timer interrupt problem
Hex compile test with INTon Pin
I could not get timer0int to work
Thank you for your great support I will investigate the rest when i come back from work.
I could not get timer0int to work
Thank you for your great support I will investigate the rest when i come back from work.
- Attachments
-
- 12.png
- (11.48 KiB) Downloaded 6043 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: pic 18f47k40 timer interrupt problem
Hello,
I'm not getting those compile errors any more with the latest definitions so hopefully they are fixed, maybe you need to re-open Flowcode?
I have improved the PWM CAL component now so that the alternate remap pin banks are now available for you to use.
The file needs to be copied into your "Flowcode 7/Components" directory before restarting Flowcode.
I'll see if I can find out now why the PWM is not firing up for you, probably due to the timer differences on these devices.
I'm not getting those compile errors any more with the latest definitions so hopefully they are fixed, maybe you need to re-open Flowcode?
I have improved the PWM CAL component now so that the alternate remap pin banks are now available for you to use.
The file needs to be copied into your "Flowcode 7/Components" directory before restarting Flowcode.
I'll see if I can find out now why the PWM is not firing up for you, probably due to the timer differences on these devices.
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
-
- Posts: 52
- Joined: Fri Apr 07, 2017 1:55 am
- Location: Greece
- Has thanked: 16 times
- Been thanked: 14 times
- Contact:
Re: pic 18f47k40 timer interrupt problem
I am very sorry.
My mistake on unpacking and replacing the files
Timer0 tested and works nicely on the hardware
IOC fixed and works on the harware.
INTn Pin fixed and works on hardware.
Very nice job with INTnPin and IOC pin select properties.
About the PWM Im getting this compiler error Please have a look at the code mplab code configurator produses for CCP1-2 and PWM3-4
I will try to use the C code block and some or all of the genarated code in the attachment to enable the PWM. I hope it doesnt explode or anything
Anyway
Thanks alot for your support!
My mistake on unpacking and replacing the files
Timer0 tested and works nicely on the hardware
IOC fixed and works on the harware.
INTn Pin fixed and works on hardware.
Very nice job with INTnPin and IOC pin select properties.
About the PWM Im getting this compiler error Please have a look at the code mplab code configurator produses for CCP1-2 and PWM3-4
I will try to use the C code block and some or all of the genarated code in the attachment to enable the PWM. I hope it doesnt explode or anything
Anyway
Thanks alot for your support!
- Attachments
-
- mcc_generated_files.rar
- (151.01 KiB) Downloaded 272 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: pic 18f47k40 timer interrupt problem
Thanks for letting me know.
Hopefully the last set of updates files here. These should fix the compilation errors for channels 3 and 4 and also allow the PWM to spring into life on all channels and timer options.
Let me know how you get on.
Hopefully the last set of updates files here. These should fix the compilation errors for channels 3 and 4 and also allow the PWM to spring into life on all channels and timer options.
Let me know how you get on.
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
-
- Posts: 52
- Joined: Fri Apr 07, 2017 1:55 am
- Location: Greece
- Has thanked: 16 times
- Been thanked: 14 times
- Contact:
Re: pic 18f47k40 timer interrupt problem
Thanks Benj!
Compilation errors gone.
Sadly , I could not get a PWM output to work though
Thanks for your help!
Compilation errors gone.
Sadly , I could not get a PWM output to work though
Thanks for your help!