Hi Martin.
As suggested by you, changed the setting in config, prepared a HEX file and programmed on chip, but no output. Port C.5 is showing LOW on oscilloscope. Please see attached config screen shot.
Regards.
Juzar
Welcome to the E-blocks forum
Re: Welcome to the E-blocks forum
Hi Martin,
Kindly see attached compiler options screen shot. Its showing PICKIT2 as default, please check whether it is creating any issue while programming the chip on E-block-006V9.
Regards
Juzar.
Kindly see attached compiler options screen shot. Its showing PICKIT2 as default, please check whether it is creating any issue while programming the chip on E-block-006V9.
Regards
Juzar.
- Attachments
-
- compiler optn.pdf
- (271.95 KiB) Downloaded 945 times
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Welcome to the E-blocks forum
Hi JUZAR,
There is a bug within PIC_CAL_PWM.c that appears to be affecting PWM with various target devices, yours included.
Can you take a look at this post please.
Once you have replaced the PIC_CAL_PWM.c file then all should be working as normal.
Martin
There is a bug within PIC_CAL_PWM.c that appears to be affecting PWM with various target devices, yours included.
Can you take a look at this post please.
Once you have replaced the PIC_CAL_PWM.c file then all should be working as normal.
Martin
Martin
Re: Welcome to the E-blocks forum
Hi Martin.
Copied the PIC_CAL_PWM.c and tested the software on PIC16F684, its now working. Further tried on PIC16F1824 and it worked well.
Kindly ignore my previous message dated May 15, 2016 along with attachment, because even that software is now running properly.
Thanks for your support.
Regards.
Juzar.
Copied the PIC_CAL_PWM.c and tested the software on PIC16F684, its now working. Further tried on PIC16F1824 and it worked well.
Kindly ignore my previous message dated May 15, 2016 along with attachment, because even that software is now running properly.
Thanks for your support.
Regards.
Juzar.
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Welcome to the E-blocks forum
Hi Juzar,
You're welcome.
Glad PWM is now working for you.
Thanks for the update.
Martin
You're welcome.
Glad PWM is now working for you.
Thanks for the update.
Martin
Martin
Re: Welcome to the E-blocks forum
Hi Martin.
After getting PWM successful, a further step in flow code was to write a flowcode for zero cross detector. I am facing problem as under.
1) Input Frequency range 20 Hz to 60 Hz, square wave from opto isolator.
2) Enabled Interrupt routing using INT pin in PIC16F1824. square input was given to INT Pin No. 11 on port A2.
3) In macro routing PWM was enabled to generate 800 micro second pulse and than PWM was disabled.
4) I have used a push button to detect the rising edge. So on simulation the PWM is giving output when ever push button is pressed. But on actual circuit it is not working.
5) Attached flowcode file.
Now the problem is there is no output pulses at rising edge of input frequency. Kindly check whether the flowcode routing is correct or there is any issue which is restricting INT pin to detect input frequency. Also would like to share with you that the opto isolator used is slow type so the rising and falling edges of input frequency has approximately 1 ms delay from 0 V to 5 V.
Awaiting your reply at the earliest.
Regards
Juzar
After getting PWM successful, a further step in flow code was to write a flowcode for zero cross detector. I am facing problem as under.
1) Input Frequency range 20 Hz to 60 Hz, square wave from opto isolator.
2) Enabled Interrupt routing using INT pin in PIC16F1824. square input was given to INT Pin No. 11 on port A2.
3) In macro routing PWM was enabled to generate 800 micro second pulse and than PWM was disabled.
4) I have used a push button to detect the rising edge. So on simulation the PWM is giving output when ever push button is pressed. But on actual circuit it is not working.
5) Attached flowcode file.
Now the problem is there is no output pulses at rising edge of input frequency. Kindly check whether the flowcode routing is correct or there is any issue which is restricting INT pin to detect input frequency. Also would like to share with you that the opto isolator used is slow type so the rising and falling edges of input frequency has approximately 1 ms delay from 0 V to 5 V.
Awaiting your reply at the earliest.
Regards
Juzar
- Attachments
-
- zerocrossdemo.fcfx
- (6.92 KiB) Downloaded 752 times
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Welcome to the E-blocks forum
Hi Juzar,
Sorry for late reply.
Have you got any further or do you still require help?
Sorry for late reply.
Have you got any further or do you still require help?
Martin
Re: Welcome to the E-blocks forum
Dear Martin.
Yes, I need your support. Since I was not successful with INT pin, so I made a zero cross detector using straight forward routine as per attachment. Its working perfectly fine, but problem is, it will be required to continuously monitor in main routine both rising and falling edges so that no pulses are missed. I tried by using INT pin of PIC16F1824 but no output or it was giving random or missing pulses. Kindly guide me how to use INT pin to generate accurate filtered zero crossing pulse from 20 Hz to 60 Hz.
In the attached flowcode, once rising edge is detected a 1 ms zero crossing detector pulse is generated. In order to filter out noise, I have read the ADC Average byte, so please advise whether it will help in filtering the noise.
Presently I am writing flowcodes for individual requirement, which will be further combined to finish entire project. Therefore my intention is to minimize use of main routine and give responsibility to timers & interrupts where ever applicable.
Awaiting your reply at the earliest.
Regards.
Juzar.
Yes, I need your support. Since I was not successful with INT pin, so I made a zero cross detector using straight forward routine as per attachment. Its working perfectly fine, but problem is, it will be required to continuously monitor in main routine both rising and falling edges so that no pulses are missed. I tried by using INT pin of PIC16F1824 but no output or it was giving random or missing pulses. Kindly guide me how to use INT pin to generate accurate filtered zero crossing pulse from 20 Hz to 60 Hz.
In the attached flowcode, once rising edge is detected a 1 ms zero crossing detector pulse is generated. In order to filter out noise, I have read the ADC Average byte, so please advise whether it will help in filtering the noise.
Presently I am writing flowcodes for individual requirement, which will be further combined to finish entire project. Therefore my intention is to minimize use of main routine and give responsibility to timers & interrupts where ever applicable.
Awaiting your reply at the earliest.
Regards.
Juzar.
- Attachments
-
- zerocrossdemo1.fcfx
- (6.84 KiB) Downloaded 701 times