Author |
Message |
Topic: PID issues - with Code |
Gabriel
Replies: 15
Views: 14802
|
Forum: General CCS C Discussion Posted: Sat Jan 20, 2024 7:46 am Subject: PID issues - with Code |
Ive added a conditional to the Error calculation.
Basically if im with 0 to 2 counts away from the setpoint just make error =0.
Good enough = 0 error jajajaj
So basically starting from 0 if i set ... |
Topic: PID issues - with Code |
Gabriel
Replies: 15
Views: 14802
|
Forum: General CCS C Discussion Posted: Thu Jan 18, 2024 8:25 am Subject: PID issues - with Code |
i was calling my compute function within the TMR2 ISR which was executing at 8.2ms more or less.
othertimes in dispair i would call Compute_PID() from within the main loop and nothing else... and t ... |
Topic: PID issues - with Code |
Gabriel
Replies: 15
Views: 14802
|
Forum: General CCS C Discussion Posted: Thu Jan 18, 2024 7:33 am Subject: PID issues - with Code |
That makes sense... i may be atributing super powers to PID.
However i see in youtube plenty people reaching precision with similar hardware.
How can i test this?
Should i set this to accept valu ... |
Topic: PID issues - with Code |
Gabriel
Replies: 15
Views: 14802
|
Forum: General CCS C Discussion Posted: Thu Jan 18, 2024 6:51 am Subject: PID issues - with Code |
PWM has to run from fosc/4... so im at the lowest feasable PWM freq. Which impacts my execution time clock so, slower loop times too.
I know its possible to go lower with other osc configurations b ... |
Topic: PID issues - with Code |
Gabriel
Replies: 15
Views: 14802
|
Forum: General CCS C Discussion Posted: Thu Jan 18, 2024 6:16 am Subject: PID issues - with Code |
Ive played for hours with the P/D gains... keeping Integral at 0.
Ajusting loop times too...when semi acceptable peformance is achieved i add some integral... more.hours... no improvement.
Is my m ... |
Topic: PID issues - with Code |
Gabriel
Replies: 15
Views: 14802
|
Forum: General CCS C Discussion Posted: Wed Jan 17, 2024 6:04 pm Subject: PID issues - with Code |
higher/better power supply did not bring any changes... it settles a bit faster, and the motor gets a bit warm when oscilating.
im having the same behaviour, just faster jejejeje... |
Topic: PID issues - with Code |
Gabriel
Replies: 15
Views: 14802
|
Forum: General CCS C Discussion Posted: Wed Jan 17, 2024 4:17 pm Subject: PID issues - with Code |
Im gonna run this again with a 24V psu:
https://www.mouser.com/ProductDetail/MEAN-WELL/SE-1000-24?qs=4Ewz1atfbqKd24YTAQMbSQ%3D%3D
The one on the link to be specific... should be enough to run a ... |
Topic: 18F57Q84 - which CAN driver to use ? |
Gabriel
Replies: 2
Views: 4963
|
Forum: General CCS C Discussion Posted: Tue Jan 16, 2024 4:55 pm Subject: 18F57Q84 - which CAN driver to use ? |
im using a
PIC18F47Q84 with
#include "can-pic18_fd.c"
and a SN65HVD235DR driver with great success...
configuring is a bit tricky but i think it was more a learning curve than it bei ... |
Topic: PID issues - with Code |
Gabriel
Replies: 15
Views: 14802
|
Forum: General CCS C Discussion Posted: Tue Jan 16, 2024 4:35 pm Subject: PID issues - with Code |
Hi all, its been a while.
after 20 years of PICs its time for my first PID proyect...
I got 2 small 12v brushed DC motores with gear reductions and magnetic encoders on the back:
#include < ... |
Topic: ESP8266 - PIC setting WiFi Setup |
Gabriel
Replies: 6
Views: 7225
|
Forum: General CCS C Discussion Posted: Tue Jan 16, 2024 4:11 pm Subject: ESP8266 - PIC setting WiFi Setup |
put the ESP in server mode.
get the PIC to listen for the requests.
handle the request accordingly via the AT commands and parsing in your PIC.
reply to request with HTML code saved in program memo ... |
Topic: loading Txt File to EEPROM |
Gabriel
Replies: 3
Views: 12929
|
Forum: General CCS C Discussion Posted: Mon Jul 25, 2022 10:11 am Subject: loading Txt File to EEPROM |
Hi guys,
anyone have a method of pre-loading into EEPROM a file with data that will be later read by the program as a structure?
The data will be something like:
Phone number
serial number
1 c ... |
Topic: Will I Regret It? |
Gabriel
Replies: 10
Views: 27959
|
Forum: General CCS C Discussion Posted: Sat Jan 01, 2022 8:21 am Subject: Will I Regret It? |
I'd like to suggest you look at the PIC18F47Q43 - and its family.
It has just about every single Peripheral you could ever need, Twice over... 5 UARTS for example.
And the absolute greatest thin ... |
Topic: IEEE floats Modbus - always 0 - CLOSED |
Gabriel
Replies: 13
Views: 36523
|
Forum: General CCS C Discussion Posted: Sat Jan 01, 2022 8:04 am Subject: IEEE floats Modbus - always 0 - CLOSED |
Thank you for your help with this.
As pointed out by Ttelmah (via PM) there is an issue with the ieeefloat.c driver.
If you experience the same, contact CCS! |
Topic: IEEE floats Modbus - always 0 - CLOSED |
Gabriel
Replies: 13
Views: 36523
|
Forum: General CCS C Discussion Posted: Sat Dec 18, 2021 3:10 pm Subject: IEEE floats Modbus - always 0 - CLOSED |
Hi Ttelmah,
thank you for your indepth analisis... I would certainly appreciate your bodge code while ccs responds officially. that is way above my understanding, i dont remember any of my ASM. i d ... |
Topic: IEEE floats Modbus - always 0 - CLOSED |
Gabriel
Replies: 13
Views: 36523
|
Forum: General CCS C Discussion Posted: Thu Dec 16, 2021 1:44 pm Subject: IEEE floats Modbus - always 0 - CLOSED |
ran the same code on an earlier revision of the board using the 18F47Q43, and i have the same problem, ieeetoPIC returns 0 always. |
|