-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIC32MX4 Modifications & MPLAB Project #4
base: master
Are you sure you want to change the base?
Conversation
Improved performance and ported to the MX4.
Previous update did not include the important changes.
Forgot to include the important changes to main & stepgen. |
These files are a modification from the OSHPARK build. OSHPARK revision needs MCLR & I2C pullup resistors. I2C is optional for now.
Hardware files for the V3 PI Hat. |
PWM's now mapped to the step channels. Enables are now mapped as the step channels E1_Direction is now the master stepper driver enable. X_STEP is still the step because X_ENABLE is defective. OC2-4 are used for PWM OC1 is not used.
Some additional hardware issues on the V3 board at OSHPARK. |
Good looking board. My only comment is it is generally a bad idea to put via's under pads. The reason is due to solder stencils. The via will absorb more solder than the pad will so you need a larger opening in the stencil to put more paste on those pads. It is better to move the via away from the pad so all stencil openings are a consistent size. Obviously if you do not plan on using stencils, this is not an issue. |
refactored to go back to a single call to stepgen. added a macro to make the step generation DRY. reduced the step accumulator to 65536 (not really sure if this is a good idea) increased the core timer rate to 200khz (52% CPU for step generation on 4 Axis) Made the appropriate changes to the HAL. programmable stepwidth is still not supported.
Reached 200KHz. The stepper motor really moves! |
I restored the original step algorithm sans stepwidth adjustment. It is still operating at 200khz.
n9wxu, You are using SYS_FREQ = 80MHz and BASEFREQ = 150KHz with MX470 or MX440? |
@@ -50,11 +50,11 @@ typedef enum { | |||
#define SPIBUFSIZE 20 /* SPI buffer size */ | |||
#define BUFSIZE (SPIBUFSIZE/4) | |||
|
|||
#define STEPBIT 22 /* bit location in DDS accum */ | |||
#define STEPBIT 16 /* bit location in DDS accum */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are sacrificing step resolution over speed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The max speed step frequency is not limited by those settings. In any case I put your algorithm back. Stand by for another pull request.
Sent from my iPhone
On Dec 21, 2015, at 3:51 PM, GP Orcullo [email protected] wrote:
In HAL/picnc.h:
@@ -50,11 +50,11 @@ typedef enum {
#define SPIBUFSIZE 20 /* SPI buffer size */
#define BUFSIZE (SPIBUFSIZE/4)-#define STEPBIT 22 /* bit location in DDS accum /
+#define STEPBIT 16 / bit location in DDS accum */
You are sacrificing step resolution over speed—
Reply to this email directly or view it on GitHub.
I push more code up tonight because it is at 200khz now. Sent from my iPhone
|
This restores the higher resolution steps and keeps the 200khz step rate. |
attempted to speed up the ISR by generating the step pattern in a FIFO
It can't produce more than 1 step ahead reliably so the ISR runs dry when operating with a FIFO.
n9wxu, if You have odroid C1, there is last RT kernel |
The Orange Pi One is a cheaper alternative ;-)
|
how is the state at that project? im looking forwards for this |
I have had time for this project in some time.
If I was starting now, I would use a teensy 4.0 the higher clock speed would speed the step rate considerably.
Joseph Julicher
… On Mar 7, 2020, at 9:06 AM, iosias ***@***.***> wrote:
how is the state at that project? im looking forwards for this
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
i have some trouble with getting the odroid c0 running with linuxcnc... how did you proceed? all the tutorials i found are more than 2 year old and seam not woring anymore cheers |
Hi!
You need my kernel changed to use ethernet on odroid.. please, try on my
Github
Best regards
Em ter, 10 de mar de 2020 04:36, iosias <[email protected]> escreveu:
… [image: 20160402_140117]
<https://cloud.githubusercontent.com/assets/8729496/14235538/badadfb8-f9d7-11e5-9f3d-6e4644746a2a.jpg>
Odroid C0 ready :D
i have some trouble with getting the odroid c0 running with linuxcnc...
how did you proceed? all the tutorials i found are more than 2 year old and
seam not woring anymore
with the prebuilt machinkit image from https://0ptr.link i have trouble
with SPI and network
cheers
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4?email_source=notifications&email_token=ACCTHGG3NAQMIDG6557BJCTRGXUXHA5CNFSM4BW7RGW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOKKR6Y#issuecomment-596945147>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCTHGFTKHAOWKUXMUXMPIDRGXUXHANCNFSM4BW7RGWQ>
.
|
Hi,
In January 2016, I compiled directly on the Odroid C0, in one images from
repo Odroid that year .. this is a good reference to follow the same.
But Guys, recently I saw messages that there is something more recent here
with Tennsy, it is working too?
Em ter., 10 de mar. de 2020 às 12:10, iosias <[email protected]>
escreveu:
… i tried that, but i had problems during the make process.
[image: image]
<https://user-images.githubusercontent.com/19647655/76326873-8bc3fa00-62e9-11ea-8e63-43f8076c5fa1.png>
it seemed related to gcc version 7
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4?email_source=notifications&email_token=ACCTHGEIDZT7H3AS67KV37LRGZJ6HA5CNFSM4BW7RGW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOLZ6XI#issuecomment-597139293>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCTHGBZT2ODMSYITL5YDYDRGZJ6HANCNFSM4BW7RGWQ>
.
|
i tried that, but i still cant compile, there are issues with gcc7, do you have the Odroid c0 running with Picnic? is there a chance to buy a picnic hat? tindie option? ;) |
Improved performance and ported to the MX440.
Temporarily removed the PWM feature.
Added additional inputs to support a derivative HW board.
Increased the step rate to 138khz. 80Mhz is starting to run out of steam at this point.
Getting ready to use the PIC32MX470 to increase the clock speed to 120MHz.
This change is