HELLO
Please, could you tell us what was the bad connection and how did you solve it? i can't make it go by a week and I've found no solution.
Type: Posts; User: RodSTAR; Keyword(s):
HELLO
Please, could you tell us what was the bad connection and how did you solve it? i can't make it go by a week and I've found no solution.
One thing is just program your ideas into the code. But if your application involves realtime response having complex computations, you may find some interesting problems.
We all know real MIPS in...
Yes :) but originally I didn't consider it because at that time I didn't have 12-bit A/D. your OpAmps suggestion was the one I most liked until I figured a 12 bit reolution.
In fact my UAV board has a dsPIC33F(12bit A/D) and a PIC32 and a math coprocessor for sensors (and other more sensors), maths processing, GPS parsing, coordinates algorythms, and blah blah, in fact...
Considering melanie's and dhouston, last suggestions, I think the simplest, cheapest, noise cleanest, circuit simplest and MIPS faster option is to just connect sensors directly to my MCU/PIC/CPU.....
I'm really amazed on how much options have appeared for the same operation thx all, and I have really learned from all of you, but...
...In my specific application, I must choose the closest...
As PIC is 5v I was thinking to transform electrically all sensors to ranges to 0-5v with a "magical IC" that outputs an analog voltaje (not digital) proportional to the input.
For example if a...
Hello grls & guys
i have a pic18f4431 (obvious 5v) and i want to A/D at the same time:
1.- a 0-3,3v device (accelerometer),
2.- a 0-3,0v device (gyro) and
3.- a 0-5,0v device (thermsistor)
...
PID is a loop. If spring moves something, PID will detect it and it will correct it immediatly. Don't confuse error variable with PWM value. In my project it works fine and it responds to dynamic...
As I understand, this PID checks only position.
To control speed, you should use another routine to control position AMONG TIME (speed), using this PID routine as position control. I did that and...
First step (get), you Get variables from hardware (via pot, encoder, ...)
Second step (control), you correct those variables (PID between desired and got variables)) to reach your desired speed,...
hi krsim, could you share how did you solve qei velocity issue?
i also successfully work with the position data, but i've tried.
i set QEICON.7 = 0 ' velocity mode enabled
VELM VAR QEICON.7...
I forgot to specify... Interrupts don't need to be handled within a loop, they just 'pop-up' in realtime things happen.
I (and many/{all} of us) had exactly that question.
Happily, interrupts were made for that, reacting at specific realtime events, such as: -A/D activity, USART I/O, QEI, Timers, Capture, Keyboard,...
I don't ASM. BTW, A good choice you may consider is to get a cheap and powerfull PIC18Fxx31: 2331 2431 4331 or 4431, wich provide a powerfull hardware Quadrature Encoder Interface (QEI) onchip...
Of course you can. Better than loop, you may want to use interrupts to detect switch activity. Such external interrupt (INTF) or RB port onchange interrupt (RBIF). Don't forget TRIS & PORT settings.
Hi Henrik & Alain;
I'm amazed with both excelent solutions you gave me :). I'll use them in other projects I have in mind.
Nevertheless, Alain's solution can't fit in this particular project,...
LOL so simple ! thank you.
-something like:
...
ON INTERRUPT GOTO IntHandler
...
...
IntHandler:
If PIR1.0=1 then
Hello all again;
In a program I want to do, I want to handle more than an interrupt source, so I enable theese interrupts:
-RB Port Change Interrupt
-Timer1 Overflow Interrupt
in the ON...
I think in a possible solution:
Connect my pulse wire to RB6/T1CKI, that is Timer1 input pin, PORTB. Hope I can use RB Port Change Interrupt at the same time as Timer1 is ON. If it is possible,...
Another detail is that at the same time I want to get pulse rate (to calc speed).
¿ Should I use:
-Timer0 (or timer1) as Timer and
-Timer1 (or timer0) as Counter...
... to feed my variables to...
Hi all;
-In a 16F628A, I receive a pulse into a timer, in counter mode, let's say timer1.
Question:
-Is there any kind of interrupt flag or trick that tells me when it matches a specified count?...
Thank you so much Henrik, now I got it!
I'll test it as soon as I can. Then i'll bother you again :)
I have another question in a new thread, not related to PID, but related to counting position....
hi Henrik;
i see you are a motor control specialist..
first of all thank you for sharing your work on your PID routine. About it i have some questions to understand.
_________
question1:
i don't...
Ladies & gentlemen;
I want a PIC to control 4 other PICs. (...USB PIC to control stepper 4 motors) (18F4550 & 4 16F628A's)
Could someone give me a couple of code lines to read/write data between...