hi,
any example of application using dsPIC??
if it is just driving specific motor application would be wasted for dsPIC??
thanks
Type: Posts; User: photoelectric; Keyword(s):
hi,
any example of application using dsPIC??
if it is just driving specific motor application would be wasted for dsPIC??
thanks
hi,
long time no see :D
after many times checking on my pwm using osiloskope, i found out that the pattern of the pwm isnt fixed according to the lookup table value while the PIC is running....
hi all,
Is it possible??i mean all the command listed in the PBP green book can be used for dsPIC??
thanks
Hi,
thank you for the example.
Then, i add-up CCP1CON = %00000000 in the interrupt handler in order to turn off the pwm for a while. Turns out that after it come back to normal operation, the pwm...
Hi,
OIC. tq
So, i notice that the led will turn off whenever the faultsignal is change BUT after a few milisec it turns ON back.
The problem on my design is that i dont know how much time the...
hi,
i try to test my simple interrupt on my real PIC simulation.
below is my codes:
led VAR PORTC.4
TRISB.0 = 1 'set port bo to input
ON INTERRUPT GoTo myint '...
hi,
OK i will play it using LED first. The port B0 that i declare says that when the fault signal detect 5V is the normal operation, when suddenly changes to 0v, port B0 automatically goes to my...
Hi,
i read the ON INTERRUPT section on PBP book and still trying to understand it.
if i want to implement an interrupt command on my codes, should i declare the interrupt in the main loop?
...
Hi,
tq for explaining.
Yes, actually i want to try adding 2 types of circuit protection system into my previous codes.
type 1 is basically come from outside signal called fault signal. when...
Hi,
Tq again,
can i say if i want set AN9-AN13 to digital , i need to set the register value ADCON1 = 6 ?
sry for this newbie question, still trying to learn this PIC things etc..
correct me if...
hi,
im back :)
tq for your advice. i change the port b to digital by just adding:
adcon1 = 7
then it works fine. Actually, i only follow the example in the PBP book and i dint really...
Hi,
its works on simulator for all phases but in real world only phase 3 as i mention before.
i think its the pin portb.4 and portb.3 on the PIC16F737 but im not sure.
A) yes, i have check the...
Hi,
ive just test it on real physical PIC and found out that phase 1 and phase 2 works fine but phase 3 wont work very well.
As you can see from the attached named Phase 1 shows the correct...
Hi,
yes, i set all the pin state 1st but outside the main loop, i simulate it and my switching and my 3 phases channel all works ok.
i will test it in the real physical PIC tmrw and see the...
hi,
i compile the additional example of yours into my codes and it works ok but at the toggle part dint works well.
attached is the simulation using the real pic simulation named result:
as...
Hi,
my explanation is same like coding below:
defineosc 20
DUTY1 var word
DUTY2 var word
FREK var word
Hi,
Thanks again for the example. This is my 1st time using PIC Basic pro languange and im trying very hard to learn it. hope you can assist me more in the future.
i test it and it works fine for...
Hi,
Im still trying to understand your explaination.
So i have to use count command?
can you give me an example of code for me to refer to?
photoelectric
hi,
thks for the explanation, now my pwm works fines.
attached is my currently pwm pattern for ccp1 and ccp2.
NOw, i want to shift the CH2 pwm about 1/3 of the duration of the CH1 pwm which is
...
hi, yes you are correct, i test it on real physical and it works fine.
But i dint really understand on how you calculate the execution of my FOR NEXT loop. Can you explain a liltle bit detailed on...
yes, i remove the pause statement because i think adding it causing the pwm duty longer then the original pwm duty, hence changing my pwm pattern.
can we actually pause below 1 ms since i know pause...
hi,
i stick with prescaler 4 and alrdy key in my dutycycle in my lookup using command lookup2 since it can support til 10bits wide.
below is my complete coding for 1 channel PWM:
DEFINE OSC 20...
ok i got the idea right now.
what about value in the lookup table? is it 8 bit wide or more because
from my calculation of duty cycle:
let say 50%
prescaler 4
PR2+1 =250
so duty2 = 250*4*0.5...
tq again,
got your point now.
let say i use prescaler 1 for maximum resolution, my PR2+1 should be 1000.
So , let say i want to put 50% duty cycle in my lookup, my duty2 value should be:
...
thank you for the explaning,
so, can i conclude that it doesnt matter to set prescale 1,4 or 16 since the value of PR2 will be change??
for instance,
prescale = 16 ,PWM freq =5kHz for 20M Fosc...