Hi Alain,
It was only test for some my project .....
Yes it was slow but work and it was in my start to play with graphic display with touch screen from Mikro Elektronika.....
It cost 20EUR but...
Type: Posts; User: phoenix_1; Keyword(s):
Hi Alain,
It was only test for some my project .....
Yes it was slow but work and it was in my start to play with graphic display with touch screen from Mikro Elektronika.....
It cost 20EUR but...
OK Darrel ,
I only test ICD on 18F4550.
In Proton+ I was probe and work OK. But I was edit .XML to accept 48Mhz clock and at that freq. need to use 115200 speed in definition of HSEROUT ..
That is...
One question :
If I want to use ICD with 18F4550
DEFINE LOADER_USED 1 ' using MCS+ bootloader
DEFINE OSC 48
I get error from MCSP that can't find OSC48 setup for ICD in any file......
Use these external clock : 11.141 MHz
And these defines:
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
DEFINE HSER_SPBRG 84...
Here is I use it and is very good.
My scope project.
http://www.picbasic.co.uk/forum/attachment.php?attachmentid=4099&stc=1&d=1269018483
Sorry I wasnt look as I must here in forum.
I found and work ok with :
crc = Dat1 ^^ Dat2 ^^ Dat3 ^^ Dat4 ^^ Hex(Adr3)
And second question now is first ;-) is any way to index variables ?
let...
I have RS485 (900 devices with displays and work 100% ok) now I need to implementa 9 more displays as terminals on network and pc send to my pic next:
Chr$(4) + Adr1 + Adr1 + Adr2 + Adr2 + Chr$(2)...
As our friend Darrel Taylor write
http://www.picbasic.co.uk/forum/attachment.php?attachmentid=3875&stc=1&d=1263158154
Here is example :
If you have array = "ABCDE"
And you do next :
A var...
http://www.youtube.com/watch?v=NFAegIl2e_c
Sorry comment is in my language - Serbian.
Regards to all
/Robert
At first look when my electronic work and in practice all is ok.
But I must know if I can find what it is?
If I have next variables in program:
setpoint var word
And when I reset as :
Here is youtube video what I was upload
VIDEO of project
Motor move in pid control loop commanded by 16F877 which is central CPU for future Baloon printing machin which soon finished.
Machin move...
To complicate calculation of position what I was make - no need for that!
I was buy "Running small motors with Pic by Harprit Singh Sandhu" in middle time and there is very good examples and sources...
Maybe someone will be optimise code maybe not.
Here is my last test and all my problems wos on my wrong seting of 18F4431
and wrong calc for position counter.
These code only mowe motor CW but I...
Pic 18F4431 at 40MHz (10MHz xtal x 4 PLL)
Main loop + TMR1 interrupt at 10KHz for QEI module with in interrupt counter for divide 10KHz / 10 to make 1KHz servo operate frequency.
MANY THANKS to Mr....
Hi Henrik,
Yes I was today put all in one interrupt (TMR1 , 16bit and make little trick)
Interrupt fire at 10KHZ but I have counter variable wich increment every interrupt jump and if it not 10...
I runing your PID rutine in 18F4431 and output is locked antiphase , all work like you explain me . I use two interrupt's one for position reding - QEI module and second to calculate PID , in main...
Here is QEI module count set to count from 0 - 999 .
x is number of cyrcle's of QEI module up and down.
QEI variable is final counter..etc
loop:
z = 0
PosHigh = POSCNTH ...
After much our spend it work in interrupt's like Henrik suggest me and I am nearly finish.
Need only one sugget more from peoples here.
Next problem or maybe not :?
QEI counter count in circles...
No I mean it work good and many thanks to you for writing that...
My best regards and I will continue to test it for my machine.
Regards Robert
ok in UHU or any other PID control if POSITION= SETPOINT motor must clip +/- for to make break in position.
when you set SETPOINT increment +1 or +XXX then PID must move motor in that direction and...
here is what I rewrite in incPID
'*******************************************************************************...
I was post my debug code in incPID trade from Henrik..see if you have time pls.
The QEI reading work good with count for position from 0-1000.
The PPWM give good voltage and signal too from 0 - 1024 at 20KHz.
The Henrik PID rutine work good but only when position and setpoint...
Yes I spend these days about 6-7 hour experimenting with PID rutine...
It is the most hard part to make PID to work.....
Soon I will post result of my expiriance...
For now regards and if any...
Hello to all ..
I have PMDC with quadrature encoder and reading encoder from 0-2000 work OK.Command for my logic for motor with Mosfets work on next way:
I use PWM with Duty from 0-1024 (10bit) at...